From 61b0ba33f02d0a561585694ef5b48c420caecbec Mon Sep 17 00:00:00 2001 From: Frank Warmerdam Date: Fri, 6 Apr 2001 02:53:24 +0000 Subject: [PATCH] Fixed SCRIPT_SH/SHELL handling. --- Makefile.in | 3 ++- configure | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Makefile.in b/Makefile.in index 64166b3e..52ce8f65 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ #! smake -# $Header: /cvs/maptools/cvsroot/libtiff/Makefile.in,v 1.19 2001-04-03 05:17:02 warmerda Exp $ +# $Header: /cvs/maptools/cvsroot/libtiff/Makefile.in,v 1.20 2001-04-06 02:53:24 warmerda Exp $ # # @WARNING@ # @@ -38,6 +38,7 @@ SRCDIR = @SRCDIR@ # @SETMAKE@ SHELL = @SCRIPT_SH@ +SCRIPT_SH = @SCRIPT_SH@ NULL = ECHO = echo GENDIST = ${TOOLROOT}/usr/sbin/gendist diff --git a/configure b/configure index f426e536..3cf622e0 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #!/bin/sh -# $Header: /cvs/maptools/cvsroot/libtiff/configure,v 1.13 2001-04-03 05:17:02 warmerda Exp $ +# $Header: /cvs/maptools/cvsroot/libtiff/configure,v 1.14 2001-04-06 02:53:58 warmerda Exp $ # # Tag Image File Format (TIFF) Software # @@ -152,7 +152,7 @@ do -target|--target) ac_prev=TARGET;; -target=*|--target=*) TARGET="$ac_optarg" ;; -version|--version) - echo "This is TIFF configure $Revision: 1.13 $" + echo "This is TIFF configure $Revision: 1.14 $" exit 0 ;; -help|--help) usage; exit 0;; @@ -634,18 +634,22 @@ EOF boom fi +# Find sh (likely /bin/sh or /usr/bin/sh), and put in SCRIPT_SH + +test -z "${SCRIPT_SH-}" && SCRIPT_SH=`findAppDef sh $PATH sh` + # # Check whether or not $MAKE automatically sets MAKE # in the Makefiles. If not, we add an explicit define # for places where recursive calls are made. # if [ -z "${SETMAKE-}" ]; then - if (cat<<'EOF' -SHELL=/bin/sh + if (sed "s;@SHELL@;$SCRIPT_SH;" <<'EOF' +SHELL=@SHELL@ all: @if [ -n "${MAKE}" ] ; then echo "make sets make" ; fi EOF -) | $MAKE -f - | grep "make sets make" > /dev/null ; then +) | tee out.sh | $MAKE -f - | grep "make sets make" > /dev/null ; then SETMAKE= else Note "Looks like $MAKE does not setup MAKE in Makefiles, will compensate." @@ -921,7 +925,7 @@ main() *(buf1 + j) = rand(); fd = open("conftestmmap", O_CREAT | O_RDWR, 0666); write(fd, buf1, i2); - mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_VARIABLE | MAP_PRIVATE, fd, 0); + buf2 = mmap(NULL, i, PROT_READ|PROT_WRITE, MAP_VARIABLE|MAP_PRIVATE, fd, 0); for (j = 0; j < i; ++j) if (*(buf1 + j) != *(buf2 + j)) exit(1); @@ -1249,7 +1253,6 @@ Note "Selecting programs used during installation." # test -z "${CHMOD-}" && CHMOD=`findAppDef chmod $PATH chmod` test -z "${LN-}" && LN=`findAppDef ln $PATH ln` -test -z "${SCRIPT_SH-}" && SCRIPT_SH=`findAppDef sh $PATH sh` test -z "${SED-}" && SED=`findAppDef sed $PATH sed` test -z "${STRIP-}" && STRIP=`findAppDef strip $PATH strip` @@ -1287,7 +1290,7 @@ fi if [ -z "${INSTALL-}" ]; then case $TARGET in *-irix*) INSTALL=`findApp install /sbin:$PATH`;; - *) INSTALL='${SHELL} ../port/install.sh';; + *) INSTALL='${SCRIPT_SH} ../port/install.sh';; esac fi