diff options
author | H.Merijn Brand <h.m.brand@xs4all.nl> | 2001-01-02 12:24:39 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-04 19:58:01 +0000 |
commit | 5d644a95a83c17f944a3ee1d65367ece4f9ca1a7 (patch) | |
tree | 9bbfb92dd7996b2237280ef7363b87778e5204b9 /Configure | |
parent | 604c6cffb2ad24b362713b025d661f1de3f1e109 (diff) | |
download | perl-5d644a95a83c17f944a3ee1d65367ece4f9ca1a7.tar.gz |
AIX builtin test -h is broken, changes based on
Subject: [PATCH] 8297. Symlink stuff breaks on AIX 4 bsh
Message-Id: <20010102093747.A6F7.H.M.BRAND@hccnet.nl>
p4raw-id: //depot/perl@8317
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 48 |
1 files changed, 32 insertions, 16 deletions
@@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Thu Dec 21 18:12:08 EET 2000 [metaconfig 3.0 PL70] +# Generated on Thu Jan 4 21:51:16 EET 2001 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <<EOF @@ -146,6 +146,11 @@ true) ;; esac +case "$newsh" in +'') sh_c="sh -c" ;; +*) sh_c="$newsh -c" ;; +esac + : if needed set CDPATH to a harmless value that is not chatty : avoid bash 2.02 problems with empty CDPATH. case "$CDPATH" in @@ -176,6 +181,7 @@ useposix='' d_bsd='' d_eunice='' d_xenix='' +sh_c='' eunicefix='' Mcc='' ar='' @@ -1084,7 +1090,7 @@ EOM esac : see if sh knows # comments -if `$sh -c '#' >/dev/null 2>&1`; then +if `$sh_c '#' >/dev/null 2>&1`; then shsharp=true spitshell=cat xcat=/bin/cat @@ -2059,7 +2065,8 @@ test) echo "Hopefully test is built into your sh." ;; *) - if `sh -c "PATH= test true" >/dev/null 2>&1`; then + if `$sh_c "PATH= test true" >/dev/null 2>&1`; then + echo "Using the test built into your sh." echo "Using the test built into your sh." test=test _test=test @@ -2176,17 +2183,25 @@ case "$lns" in echo "Checking how to test for symbolic links..." >&4 $lns blurfl sym if $test "X$issymlink" = X; then - if $test -h sym 2>/dev/null; then - issymlink=-h - fi + $sh_c "PATH= test -h sym" >/dev/null 2>&1 + if test $? = 0; then + issymlink="test -h" + fi + fi + if $test "X$issymlink" = X; then + $sh_c "$test -h sym" >/dev/null 2>&1 + if test $? = 0; then + issymlink="$test -h" + echo "Your builtin 'test -h' may be broken, I'm using external '$test -h'." >&4 + fi fi if $test "X$issymlink" = X; then if $test -L sym 2>/dev/null; then - issymlink=-L + issymlink="$test -L" fi fi if $test "X$issymlink" != X; then - echo "You can test for symbolic links with $issymlink." >&4 + echo "You can test for symbolic links with '$issymlink'." >&4 else echo "I do not know how you can test for symbolic links." >&4 fi @@ -2224,7 +2239,7 @@ $define|true|[yY]*) read filename test -z "$filename" && break if test -f $filename; then - if test $issymlink $filename; then + if $issymlink $filename; then rm -f $filename fi fi @@ -4138,8 +4153,8 @@ and I got the following output: EOM dflt=y -if sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then - if sh -c './try' >>try.msg 2>&1; then +if $sh_c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then + if $sh_c './try' >>try.msg 2>&1; then xxx=`./try` case "$xxx" in "Ok") dflt=n ;; @@ -7121,7 +7136,7 @@ echo "Figuring out host name..." >&4 case "$myhostname" in '') cont=true echo 'Maybe "hostname" will work...' - if tans=`sh -c hostname 2>&1` ; then + if tans=`$sh_c hostname 2>&1` ; then myhostname=$tans phostname=hostname cont='' @@ -7144,17 +7159,17 @@ if $test "$cont"; then fi if $test "$cont"; then echo 'No, maybe "uuname -l" will work...' - if tans=`sh -c 'uuname -l' 2>&1` ; then + if tans=`$sh_c 'uuname -l' 2>&1` ; then myhostname=$tans phostname='uuname -l' else echo 'Strange. Maybe "uname -n" will work...' - if tans=`sh -c 'uname -n' 2>&1` ; then + if tans=`$sh_c 'uname -n' 2>&1` ; then myhostname=$tans phostname='uname -n' else echo 'Oh well, maybe I can mine it out of whoami.h...' - if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then + if tans=`$sh_c $contains' sysname $usrinc/whoami.h' 2>&1` ; then myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'` phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h" else @@ -7255,7 +7270,7 @@ case "$myhostname" in esac case "$dflt" in .) echo "(No help from resolv.conf either -- attempting clever guess)" - dflt=.`sh -c domainname 2>/dev/null` + dflt=.`$sh_c domainname 2>/dev/null` case "$dflt" in '') dflt='.';; .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;; @@ -16434,6 +16449,7 @@ selectminbits='$selectminbits' selecttype='$selecttype' sendmail='$sendmail' sh='$sh' +sh_c='$sh_c' shar='$shar' sharpbang='$sharpbang' shmattype='$shmattype' |