Efficiency patchlet for pp_aassign()
[p5sagit/p5-mst-13.2.git] / Configure
index c8ee9f6..1d5ae4a 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -304,6 +304,7 @@ d_getppid=''
 d_getprior=''
 d_gnulibc=''
 d_htonl=''
+d_inetaton=''
 d_isascii=''
 d_killpg=''
 d_link=''
@@ -957,7 +958,11 @@ silent=''
 extractsh=''
 override=''
 knowitall=''
+
 rm -f optdef.sh
+cat >optdef.sh <<EOS
+$startsh
+EOS
 
 : option parsing
 while test $# -gt 0; do
@@ -1191,6 +1196,7 @@ esac"
 
 : now set up to do reads with possible shell escape and default assignment
 cat <<EOSC >myread
+$startsh
 xxxm=\$dflt
 $myecho
 ans='!'
@@ -1643,6 +1649,7 @@ EOM
        $test -f /dnix && osname=dnix
        $test -f /lynx.os && osname=lynxos
        $test -f /unicos && osname=unicos && osvers=`$uname -r`
+       $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
        $test -f /bin/mips && /bin/mips && osname=mips
        $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
                $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
@@ -1700,6 +1707,9 @@ EOM
                        *) osvers=$tmp;;
                        esac
                        ;;
+               *dc.osx) osname=dcosx
+                       osvers="$3"
+                       ;;
                dnix) osname=dnix
                        osvers="$3"
                        ;;
@@ -1768,7 +1778,7 @@ EOM
                ultrix) osname=ultrix
                        osvers="$3"
                        ;;
-               osf1)   case "$5" in
+               osf1|mls+)      case "$5" in
                                alpha)
                                        osname=dec_osf
                                        osvers=`echo "$3" | sed 's/^[vt]//'`
@@ -2025,7 +2035,7 @@ if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
        tarch=`arch`"-$osname"
 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
        if uname -m > tmparch 2>&1 ; then
-               tarch=`$sed -e 's/ *$//' -e 's/ /_/g'
+               tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
                        -e 's/$/'"-$osname/" tmparch`
        else
                tarch="$osname"
@@ -2115,7 +2125,10 @@ chmod +x filexp
 $eunicefix filexp
 
 : now set up to get a file name
-cat <<'EOSC' >getfile
+cat <<EOS >getfile
+$startsh
+EOS
+cat <<'EOSC' >>getfile
 tilde=''
 fullpath=''
 already=''
@@ -2514,7 +2527,10 @@ else
 fi
 
 : set up the script used to warn in case of inconsistency
-cat <<'EOSC' >whoa
+cat <<EOS >whoa
+$startsh
+EOS
+cat <<'EOSC' >>whoa
 dflt=y
 echo " "
 echo "*** WHOA THERE!!! ***" >&4
@@ -3910,6 +3926,8 @@ case "$libs" in
                        :
                elif try=`./loc lib$thislib$lib_ext X $libpth`; $test -f "$try"; then
                        :
+               elif try=`./loc $thislib$lib_ext X $libpth`; $test -f "$try"; then
+                       :
                elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
                        :
                elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
@@ -4090,6 +4108,10 @@ elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
        eval $xscan;\
        $contains '^fprintf$' libc.list >/dev/null 2>&1; then
                eval $xrun
+elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
+       eval $xscan;\
+       $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+               eval $xrun
 else
        nm -p $* 2>/dev/null >libc.tmp
        $grep fprintf libc.tmp > libc.ptf
@@ -4675,6 +4697,9 @@ if "$useshrplib"; then
        solaris|netbsd)
                xxx="-R $shrpdir"
                ;;
+       freebsd)
+               xxx="-Wl,-R$shrpdir"
+               ;;
        linux|irix*)
                xxx="-Wl,-rpath,$shrpdir"
                ;;
@@ -5129,11 +5154,13 @@ case "$myhostname" in
                                echo "(Attempting domain name extraction from $tans)"
                                : Why was there an Egrep here, when Sed works?
                                : Look for either a search or a domain directive.
-                               dflt=.`$sed -n -e 's/^search[   ]*\(.*\)/\1/p' $tans \
-                                       | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
+                               dflt=.`$sed -n -e 's/   / /g' \
+                                 -e 's/^search  *\([^ ]*\).*/\1/p' $tans \
+                                 | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
                                case "$dflt" in
-                               .)      dflt=.`$sed -n -e 's/^domain[   ]*\(.*\)/\1/p' $tans \
-                                               | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
+                               .) dflt=.`$sed -n -e 's/        / /g' \
+                                    -e 's/^domain  *\([^ ]*\).*/\1/p' $tans \
+                                    | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
                                        ;;
                                esac
                        fi
@@ -6394,7 +6421,9 @@ main()
 }
 EOCP
        if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then
-               echo "$startsh" >mtry
+               cat <<EOS >mtry
+$startsh
+EOS
                echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
                chmod +x mtry
                ./mtry >/dev/null 2>&1
@@ -6430,7 +6459,7 @@ EOCP
                *) echo "However, your read() returns '$status' on EOF??";;
                esac
                val="$define"
-               if test "$status" -eq "$rd_nodata"; then
+               if test "$status" = "$rd_nodata"; then
                        echo "WARNING: you can't distinguish between EOF and no data!"
                        val="$undef"
                fi
@@ -6628,6 +6657,10 @@ set d_strchr; eval $setvar
 val="$vali"
 set d_index; eval $setvar
 
+: check whether inet_aton exists
+set inet_aton d_inetaton
+eval $inlibc
+
 : Look for isascii
 echo " "
 $cat >isascii.c <<'EOCP'
@@ -9031,6 +9064,7 @@ main()
                printf("int\n");
        else 
                printf("long\n");
+       fflush(stdout);
        exit(0);
 }
 EOM
@@ -9926,6 +9960,7 @@ d_gettimeod='$d_gettimeod'
 d_gnulibc='$d_gnulibc'
 d_htonl='$d_htonl'
 d_index='$d_index'
+d_inetaton='$d_inetaton'
 d_isascii='$d_isascii'
 d_killpg='$d_killpg'
 d_link='$d_link'