[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Fix buildcheck.sh on Solaris

From: <subversion-dev_at_thewrittenword.com>
Date: 2001-12-17 00:58:46 CET

On Sat, Dec 15, 2001 at 12:01:45AM -0800, Justin Erenkrantz wrote:
> The /bin/sh on Solaris does not seem to support the
> $(which glibtool...) semantics. Furthermore, converting it to
> `which glibtool libtool...` on Solaris does not work either as
> which does not send "not found" errors to stderr but to stdout.
> This results in $libtool set to "glibtool not found" even when
> libtool is in the path.
>
> So, the following must be applied to get buildcheck.sh to
> work on Solaris. -- justin

/usr/xpg4/bin/sh will give you $() on Solaris. I think what you should
check for is a POSIX-compatible shell and run buildcheck.sh with that.
I'm not 100% sure POSIX defines $() though.

I've attached an autoconf macro, AC_PROG_SHELL, written by Paul
Eggert, that should find you a POSIX-compatible shell. I'm not sure
about the license for this macro so I've cc'ed Paul Eggert for
clarification.

-- 
albert chin (china@thewrittenword.com)
-- snip snip
#serial 1
# Check for a working (i.e. POSIX-compatible) shell.
# Written by Paul Eggert <eggert@twinsun.com>,
# from an idea suggested by Albert Chin-A-Young <china@thewrittenword.com>.
AC_DEFUN(AC_PROG_SHELL,
  [AC_MSG_CHECKING(for a POSIX-compliant shell)
   AC_CACHE_VAL(ac_cv_path_shell,
     [ac_cv_path_shell=no
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy=/bin:/usr/bin:/usr/bin/posix:/usr/xpg4/bin:$PATH
      for ac_dir in $ac_dummy; do
	for ac_base in sh bash ksh sh5; do
	  case "$ac_dir" in
	  /*)
	    if ("$ac_dir/$ac_base" -c '
		  # Test the noclobber option,
		  # using the portable POSIX.2 syntax.
		  set -C
		  rm -f conftest.c || exit
		  >conftest.c || exit
		  >|conftest.c || exit
		  !>conftest.c || exit
	        ') 2>/dev/null; then
	      ac_cv_path_shell="$ac_dir/$ac_base"
	      break
	    fi
	    ;;
	  esac
	done
	if test "$ac_cv_path_shell" != no; then
	  break
	fi
      done
      IFS="$ac_save_ifs"])
   AC_MSG_RESULT($ac_cv_path_shell)
   SHELL=$ac_cv_path_shell
   if test "$SHELL" = no; then
     SHELL=/bin/sh
     AC_MSG_WARN(Using $SHELL, even though it is not POSIX-compliant)
   fi
   AC_SUBST(SHELL)])
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:53 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.