This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate Memoize 0.64. Few tweaks were required in
[perl5.git] / Configure
index 4531138..d8e406f 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Thu Apr 19 03:28:20 EET DST 2001 [metaconfig 3.0 PL70]
+# Generated on Sat Jun 16 19:06:04 EET DST 2001 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -165,6 +165,11 @@ ccversion=''
 ccsymbols=''
 cppccsymbols=''
 cppsymbols=''
+from=''
+run=''
+targetarch=''
+to=''
+usecrosscompile=''
 perllibs=''
 dynamic_ext=''
 extensions=''
@@ -273,6 +278,7 @@ lib_ext=''
 obj_ext=''
 path_sep=''
 afs=''
+afsroot=''
 alignbytes=''
 ansi2knr=''
 archlib=''
@@ -307,7 +313,6 @@ cpplast=''
 cppminus=''
 cpprun=''
 cppstdin=''
-crosscompile=''
 d__fwalk=''
 d_access=''
 d_accessx=''
@@ -332,6 +337,7 @@ d_csh=''
 full_csh=''
 d_cuserid=''
 d_dbl_dig=''
+d_dbminitproto=''
 d_difftime=''
 d_dlerror=''
 d_dlopen=''
@@ -357,6 +363,7 @@ d_fds_bits=''
 d_fgetpos=''
 d_flexfnam=''
 d_flock=''
+d_flockproto=''
 d_fork=''
 d_fpos64_t=''
 d_frexpl=''
@@ -447,6 +454,7 @@ d_mktime=''
 d_mmap=''
 mmaptype=''
 d_modfl=''
+d_modfl_pow32_bug=''
 d_mprotect=''
 d_msg=''
 d_msgctl=''
@@ -477,6 +485,7 @@ d_seekdir=''
 d_telldir=''
 d_readlink=''
 d_readv=''
+d_realpath=''
 d_recvmsg=''
 d_rename=''
 d_rmdir=''
@@ -529,6 +538,7 @@ d_sigaction=''
 d_sigprocmask=''
 d_sigsetjmp=''
 d_sockatmark=''
+d_sockatmarkproto=''
 d_msg_ctrunc=''
 d_msg_dontroute=''
 d_msg_oob=''
@@ -543,6 +553,8 @@ socketlib=''
 d_socklen_t=''
 d_socks5_init=''
 d_sqrtl=''
+d_sresgproto=''
+d_sresuproto=''
 d_statblks=''
 d_statfs_f_flags=''
 d_statfs_s=''
@@ -579,6 +591,7 @@ d_strtouq=''
 d_strxfrm=''
 d_symlink=''
 d_syscall=''
+d_syscallproto=''
 d_sysconf=''
 d_system=''
 d_tcgetpgrp=''
@@ -597,6 +610,7 @@ d_semctl_semid_ds=''
 d_semctl_semun=''
 d_union_semun=''
 d_usleep=''
+d_usleepproto=''
 d_ustat=''
 d_vfork=''
 usevfork=''
@@ -635,6 +649,9 @@ h_sysfile=''
 i_arpainet=''
 db_hashtype=''
 db_prefixtype=''
+db_version_major=''
+db_version_minor=''
+db_version_patch=''
 i_db=''
 i_dbm=''
 i_rpcsvcdbm=''
@@ -816,6 +833,7 @@ api_subversion=''
 api_version=''
 api_versionstring=''
 patchlevel=''
+perl_patchlevel=''
 revision=''
 subversion=''
 version=''
@@ -949,6 +967,7 @@ usesocks=''
 d_oldpthreads=''
 use5005threads=''
 useithreads=''
+usereentrant=''
 usethreads=''
 incpath=''
 mips_type=''
@@ -1014,6 +1033,7 @@ locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
 inclwanted=''
 
 groupstype=''
+libnames=''
 : change the next line if compiling for Xenix/286 on Xenix/386
 xlibpth='/usr/lib/386 /lib/386'
 : Possible local library directories to search.
@@ -1042,6 +1062,7 @@ libswanted_uselargefiles=''
 : set usemultiplicity on the Configure command line to enable multiplicity.
 : set usesocks on the Configure command line to enable socks.
 : set usethreads on the Configure command line to enable threads.
+usereentrant='undef'
 : full support for void wanted by default
 defvoidused=15
 
@@ -1106,17 +1127,17 @@ if `$sh -c '#' >/dev/null 2>&1`; then
        spitshell=cat
        xcat=/bin/cat
        test -f $xcat || xcat=/usr/bin/cat
-       echo "#!$xcat" >try
-       $eunicefix try
-       chmod +x try
-       ./try > today
+       echo "#!$xcat" >sharp
+       $eunicefix sharp
+       chmod +x sharp
+       ./sharp > today
        if test -s today; then
                sharpbang='#!'
        else
-               echo "#! $xcat" > try
-               $eunicefix try
-               chmod +x try
-               ./try > today
+               echo "#! $xcat" > sharp
+               $eunicefix sharp
+               chmod +x sharp
+               ./sharp > today
                if test -s today; then
                        sharpbang='#! '
                else
@@ -1136,28 +1157,28 @@ else
        echo "I presume that if # doesn't work, #! won't work either!"
        sharpbang=': use '
 fi
-rm -f try today
+rm -f sharp today
 
 : figure out how to guarantee sh startup
 case "$startsh" in
 '') startsh=${sharpbang}${sh} ;;
 *)
 esac
-cat >try <<EOSS
+cat >sharp <<EOSS
 $startsh
 set abc
 test "$?abc" != 1
 EOSS
 
-chmod +x try
-$eunicefix try
-if ./try; then
+chmod +x sharp
+$eunicefix sharp
+if ./sharp; then
        : echo "Yup, it does."
 else
        echo "Hmm... '$startsh' does not guarantee sh startup..."
        echo "You may have to fix up the shell scripts to make sure $sh runs them."
 fi
-rm -f try
+rm -f sharp
 
 
 : Save command line options in file UU/cmdline.opt for later use in
@@ -1499,10 +1520,10 @@ esac
 
 : script used to extract .SH files with variable substitutions
 cat >extract <<'EOS'
-CONFIGDOTSH=true
+PERL_CONFIG_SH=true
 echo "Doing variable substitutions on .SH files..."
-if test -f $src/MANIFEST; then
-       set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH$'`
+if test -f MANIFEST; then
+       set x `awk '{print $1}' < MANIFEST | grep '\.SH$'`
 else
        echo "(Looking for .SH files under the source directory.)"
        set x `(cd $src; find . -name "*.SH" -print)`
@@ -1585,7 +1606,7 @@ true)
        echo " "
        . UU/extract
        rm -rf UU
-       echo "Done."
+       echo "Extraction done."
        exit 0
        ;;
 esac
@@ -2142,7 +2163,7 @@ int main(int argc, char *argv[]) {
   return 0;
 }
 EOM
-    if $cc -o try $ccflags try.c; then
+    if $cc -o try $ccflags $ldflags try.c; then
        :
     else
         echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
@@ -2289,6 +2310,163 @@ $define|true|[yY]*)
        ;;
 esac
 
+
+case "$usecrosscompile" in
+$define|true|[yY]*)
+        croak=''
+       case "$cc" in
+       *-*-gcc) # A cross-compiling gcc, probably.
+           targetarch=`echo $cc|sed 's/-gcc$//'`
+           ar=$targetarch-ar
+           # leave out ld, choosing it is more complex
+           nm=$targetarch-nm
+           ranlib=$targetarch-ranlib
+           ;;
+       esac
+       case "$targetarch" in
+       '') echo "Cross-compiling: you should define targetarch." >&4; croak=y ;;
+       esac
+       case "$usrinc" in
+       '') echo "Cross-compiling: you should define usrinc." >&4; croak=y ;;
+       esac
+       case "$incpth" in
+       '') echo "Cross-compiling: you should define incpth." >&4; croak=y ;;
+       esac
+       case "$libpth" in
+       '') echo "Cross-compiling: you should define libpth." >&4; croak=y ;;
+       esac
+       case "$targethost" in
+       '') echo "Cross-compiling: targethost not defined." >&4; croak=y ;;
+       esac
+       case "$targetdir" in
+       '') echo "Cross compiling: targetdir not defined." >&4; croak=y ;;
+       esac
+       locincpth=''
+       loclibpth=''
+       case "$croak" in
+       y) exit 1 ;;
+       esac
+       case "$src" in
+       /*) run=$src/Cross/run
+           to=$src/Cross/to
+           from=$src/Cross/from
+           ;;
+       *)  pwd=`test -f ../Configure & cd ..; pwd`
+           run=$pwd/Cross/run
+           to=$pwd/Cross/to
+           from=$pwd/Cross/from
+           ;;
+       esac
+       case "$targetrun" in
+       '') targetrun=ssh ;;
+       esac
+       case "$targetto" in
+       '') targetto=scp ;;
+       esac
+       case "$targetfrom" in
+       '') targetfrom=scp ;;
+       esac
+       run=$run-$targetrun
+       to=$to-$targetto
+       from=$from-$targetfrom
+       case "$targetuser" in
+       '') targetuser=root ;;
+       esac
+       case "$targetfrom" in
+       scp)    q=-q ;;
+       *)      q='' ;;
+       esac
+       case "$targetrun" in
+       ssh|rsh)
+           cat >$run <<EOF
+#!/bin/sh
+exe=\$1
+shift
+$to \$exe
+$targetrun -l $targetuser $targethost "cd $targetdir && ./\$exe \$@"
+EOF
+           ;;
+       *)  echo "Cross-compiling: unknown targetrun '$targetrun'" >&4
+           exit 1
+           ;;
+       esac
+       case "$targetto" in
+       scp|rcp)
+           cat >$to <<EOF
+#!/bin/sh
+for f in \$@
+do
+  $targetto $q \$f $targetuser@$targethost:$targetdir/. || exit 1
+done
+exit 0
+EOF
+           ;;
+       cp) cat >$to <<EOF
+#!/bin/sh
+cp \$@ $targetdir/.
+EOF
+           ;;
+       *)  echo "Cross-compiling: unknown targetto '$targetto'" >&4
+           exit 1
+           ;;
+       esac
+       case "$targetfrom" in
+       scp|rcp)
+         cat >$from <<EOF
+#!/bin/sh
+for f in \$@
+do
+  $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
+done
+exit 0
+EOF
+           ;;
+       cp) cat >$from <<EOF
+#!/bin/sh
+for f in \$@
+do
+  cp $targetdir/\$f . || exit 1
+done
+exit 0
+EOF
+           ;;
+       *)  echo "Cross-compiling: unknown targetfrom '$targetfrom'" >&4
+           exit 1
+           ;;
+       esac
+       if test ! -f $run; then
+           echo "Cross-compiling: target 'run' script '$run' not found." >&4
+       else
+           chmod a+rx $run
+       fi
+       if test ! -f $to; then
+           echo "Cross-compiling: target 'to' script '$to' not found." >&4
+       else
+           chmod a+rx $to
+       fi
+       if test ! -f $from; then
+           echo "Cross-compiling: target 'from' script '$from' not found." >&4
+       else
+           chmod a+rx $from
+       fi
+       if test ! -f $run -o ! -f $to -o ! -f $from; then
+           exit 1
+       fi
+       cat >&4 <<EOF
+Cross-compiling: Using
+       $run-ssh
+       $to-ssh
+       $from-ssh
+EOF
+       ;;
+*)     run=''
+       to=:
+       from=:
+       usecrosscompile='undef'
+       targetarch=''
+       ;;
+esac
+
 : see whether [:lower:] and [:upper:] are supported character classes
 echo " "
 case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
@@ -2683,6 +2861,14 @@ EOM
                fi
        fi
        
+        case "$targetarch" in
+        '') ;;
+        *)  hostarch=$osname
+            osname=`echo $targetarch|sed 's,^[^-]*-,,'`
+            osvers=''
+            ;;
+        esac
+
        : Now look for a hint file osname_osvers, unless one has been
        : specified already.
        case "$hintfile" in
@@ -2757,7 +2943,7 @@ EOM
                elif $test -f $src/hints/$file.sh; then
                        . $src/hints/$file.sh
                        $cat $src/hints/$file.sh >> UU/config.sh
-               elif $test X$tans = X -o X$tans = Xnone ; then
+               elif $test X"$tans" = X -o X"$tans" = Xnone ; then
                        : nothing
                else
                        : Give one chance to correct a possible typo.
@@ -3146,7 +3332,7 @@ fi
 
 echo " "
 echo "Checking for GNU cc in disguise and/or its version number..." >&4
-$cat >gccvers.c <<EOM
+$cat >try.c <<EOM
 #include <stdio.h>
 int main() {
 #ifdef __GNUC__
@@ -3159,8 +3345,8 @@ int main() {
        exit(0);
 }
 EOM
-if $cc -o gccvers $ccflags $ldflags gccvers.c; then
-       gccversion=`./gccvers`
+if $cc -o try $ccflags $ldflags try.c; then
+       gccversion=`$run ./try`
        case "$gccversion" in
        '') echo "You are not using GNU cc." ;;
        *)  echo "You are using GNU cc $gccversion."
@@ -3178,7 +3364,7 @@ else
                ;;
        esac
 fi
-$rm -f gccvers*
+$rm -f try try.*
 case "$gccversion" in
 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
 esac
@@ -3217,6 +3403,15 @@ case "$ccname" in
 '') ccname="$cc" ;;
 esac
 
+case "$gccversion" in
+'') ;;
+*)  case "$ccflags" in
+    *-Wall*) ;;
+    *) ccflags="$ccflags -Wall" ;;
+    esac
+    ;;
+esac
+
 : see how we invoke the C preprocessor
 echo " "
 echo "Now, how can we feed standard input to your C preprocessor..." >&4
@@ -4062,7 +4257,10 @@ none) ccflags='';;
 esac
 
 : the following weeds options from ccflags that are of no interest to cpp
-cppflags="$ccflags"
+case "$cppflags" in
+'') cppflags="$ccflags" ;;
+*)  cppflags="$cppflags $ccflags" ;;
+esac
 case "$gccversion" in
 1*) cppflags="$cppflags -D__GNUC__"
 esac
@@ -4185,15 +4383,15 @@ $cat >> try.msg <<EOM
 I used the command:
 
        $*
-       ./try
+       $run ./try
 
 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
-               xxx=`./try`
+       if $sh -c "$run ./try" >>try.msg 2>&1; then
+               xxx=`$run ./try`
                case "$xxx" in
                "Ok") dflt=n ;;
                *)      echo 'The program compiled OK, but produced no output.' >> try.msg
@@ -4315,7 +4513,7 @@ echo " "
 case "$intsize" in
 '')
        echo "Checking to see how big your integers are..." >&4
-       $cat >intsize.c <<'EOCP'
+       $cat >try.c <<'EOCP'
 #include <stdio.h>
 int main()
 {
@@ -4325,9 +4523,9 @@ int main()
        exit(0);
 }
 EOCP
-       set intsize
-       if eval $compile_ok && ./intsize > /dev/null; then
-               eval `./intsize`
+       set try
+       if eval $compile_ok && $run ./try > /dev/null; then
+               eval `$run ./try`
                echo "Your integers are $intsize bytes long."
                echo "Your long integers are $longsize bytes long."
                echo "Your short integers are $shortsize bytes long."
@@ -4354,7 +4552,7 @@ EOM
        fi
        ;;
 esac
-$rm -f intsize intsize.*
+$rm -f try try.*
 
 : see what type lseek is declared as in the kernel
 rp="What is the type used for lseek's offset on this system?"
@@ -4374,7 +4572,7 @@ int main()
 EOCP
 set try
 if eval $compile_ok; then
-       lseeksize=`./try`
+       lseeksize=`$run ./try`
        echo "Your file offsets are $lseeksize bytes long."
 else
        dflt=$longsize
@@ -4407,7 +4605,7 @@ int main() {
 EOCP
 set try
 if eval $compile_ok; then
-       yyy=`./try`
+       yyy=`$run ./try`
        case "$yyy" in
        '')     fpossize=4
                echo "(I can't execute the test program--guessing $fpossize.)" >&4
@@ -4486,7 +4684,7 @@ int main()
 EOCP
                set try
                if eval $compile_ok; then
-                       lseeksize=`./try`
+                       lseeksize=`$run ./try`
                        $echo "Your file offsets are now $lseeksize bytes long."
                else
                        dflt="$lseeksize"
@@ -4511,7 +4709,7 @@ int main() {
 EOCP
                set try
                if eval $compile_ok; then
-                       yyy=`./try`
+                       yyy=`$run ./try`
                        dflt="$lseeksize"
                        case "$yyy" in
                        '')     echo " "
@@ -4657,7 +4855,7 @@ int main()
 EOCP
        set try
        if eval $compile_ok; then
-               ptrsize=`./try`
+               ptrsize=`$run ./try`
                echo "Your pointers are $ptrsize bytes long."
        else
                dflt='4'
@@ -4701,7 +4899,7 @@ int main()
 EOCP
        set try
        if eval $compile_ok; then
-               longlongsize=`./try$exe_ext`
+               longlongsize=`$run ./try`
                echo "Your long longs are $longlongsize bytes long."
        else
                dflt='8'
@@ -5124,7 +5322,7 @@ esac
 
 echo " "
 echo "Checking for GNU C Library..." >&4
-cat >gnulibc.c <<EOM
+cat >try.c <<EOM
 #include <stdio.h>
 int main()
 {
@@ -5135,15 +5333,15 @@ int main()
 #endif
 }
 EOM
-set gnulibc
-if eval $compile_ok && ./gnulibc; then
+set try
+if eval $compile_ok && $run ./try; then
        val="$define"
        echo "You are using the GNU C Library"
 else
        val="$undef"
        echo "You are not using the GNU C Library"
 fi
-$rm -f gnulibc*
+$rm -f try try.*
 set d_gnulibc
 eval $setvar
 
@@ -5249,7 +5447,6 @@ case "$libc" in
        esac
        ;;
 esac
-libnames='';
 case "$libs" in
 '') ;;
 *)  for thislib in $libs; do
@@ -5656,7 +5853,7 @@ int main()
 EOCP
        set try
        if eval $compile_ok; then
-               doublesize=`./try`
+               doublesize=`$run ./try`
                echo "Your double is $doublesize bytes long."
        else
                dflt='8'
@@ -5700,7 +5897,7 @@ EOCP
        set try
        set try
        if eval $compile; then
-               longdblsize=`./try$exe_ext`
+               longdblsize=`$run ./try`
                echo "Your long doubles are $longdblsize bytes long."
        else
                dflt='8'
@@ -5784,6 +5981,10 @@ case "$myarchname" in
        archname=''
        ;;
 esac
+case "$targetarch" in
+'') ;;
+*)  archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
+esac
 myarchname="$tarch"
 case "$archname" in
 '') dflt="$tarch";;
@@ -5910,12 +6111,17 @@ esac
 prefix="$ans"
 prefixexp="$ansexp"
 
+case "$afsroot" in
+'')    afsroot=/afs ;;
+*)     afsroot=$afsroot ;;
+esac
+
 : is AFS running?
 echo " "
 case "$afs" in
 $define|true)  afs=true ;;
 $undef|false)  afs=false ;;
-*)     if test -d /afs; then
+*)     if test -d $afsroot; then
                afs=true
        else
                afs=false
@@ -5998,6 +6204,7 @@ if $test -r $rsrc/patchlevel.h;then
        api_revision=`awk '/define[     ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
        api_version=`awk '/define[      ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
        api_subversion=`awk '/define[   ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
+       perl_patchlevel=`grep ',"DEVEL[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'`
 else
        revision=0
        patchlevel=0
@@ -6005,8 +6212,19 @@ else
        api_revision=0
        api_version=0
        api_subversion=0
+       perl_patchlevel=0
+       $echo "(You do not have patchlevel.h.  Eek.)"
+fi
+if $test -r $rsrc/.patch ; then  
+       if $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then
+               perl_patchlevel=`cat $rsrc/.patch`
+       fi
 fi
-$echo "(You have $package version $patchlevel subversion $subversion.)"
+case "$perl_patchlevel" in
+0)  ;;
+'') $echo "(You have $package version $patchlevel subversion $subversion.)" ;;
+*)  $echo "(You have $package version $patchlevel subversion $subversion patchlevel $perl_patchlevel.)" ;;
+esac
 case "$osname" in
 dos|vms)
        : XXX Should be a Configure test for double-dots in filenames.
@@ -6277,12 +6495,13 @@ eval $inhdr
 : determine which malloc to compile in
 echo " "
 case "$usemymalloc" in
-''|[yY]*|true|$define) dflt='y' ;;
-*)     dflt='n' ;;
-esac
-case "$ptrsize" in
-4) ;;
-*) dflt='n' ;;
+[yY]*|true|$define)    dflt='y' ;;
+[nN]*|false|$undef)    dflt='n' ;;
+*)     case "$ptrsize" in
+       4) dflt='y' ;;
+       *) dflt='n' ;;
+       esac
+       ;;
 esac
 rp="Do you wish to attempt to use the malloc that comes with $package?"
 . ./myread
@@ -6675,13 +6894,13 @@ fi
 : Find perl5.005 or later.
 echo "Looking for a previously installed perl5.005 or later... "
 case "$perl5" in
-'')    for tdir in `echo "$binexp:$PATH" | $sed "s/$path_sep/ /g"`; do
+'')    for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do
                : Check if this perl is recent and can load a simple module
-               if $test -x $tdir/perl && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
+               if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
                        perl5=$tdir/perl
                        break;
-               elif $test -x $tdir/perl5 && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
-                       perl5=$tdir/perl
+               elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
+                       perl5=$tdir/perl5
                        break;
                fi
        done
@@ -6746,14 +6965,14 @@ else {
 EOPL
 chmod +x getverlist
 case "$inc_version_list" in
-'')    if test -x "$perl5"; then
+'')    if test -x "$perl5$exe_ext"; then
                dflt=`$perl5 getverlist`
        else
                dflt='none'
        fi
        ;;
 $undef) dflt='none' ;;
-*)  dflt="$inc_version_list" ;;
+*)  eval dflt=\"$inc_version_list\" ;;
 esac
 case "$dflt" in
 ''|' ') dflt=none ;;
@@ -6940,7 +7159,7 @@ int main() {
                exit(1); /* fail */
 }
 EOM
-               if $cc $ccflags try.c >/dev/null 2>&1 && ./a.out; then
+               if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
                        cat <<EOM
 You appear to have ELF support.  I'll use $cc to build dynamic libraries.
 EOM
@@ -7985,7 +8204,7 @@ int main() {
 EOCP
        set try
        if eval $compile; then
-               yyy=`./try$exe_ext`
+               yyy=`$run ./try`
                case "$yyy" in
                123.456)
                        sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
@@ -8002,17 +8221,17 @@ if $test X"$sPRIfldbl" = X; then
 #include <stdio.h>
 int main() {
   long double d = 123.456;
-  printf("%.3llf\n", d);
+  printf("%.3Lf\n", d);
 }
 EOCP
        set try
        if eval $compile; then
-               yyy=`./try$exe_ext`
+               yyy=`$run ./try`
                case "$yyy" in
                123.456)
-                       sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
-                       sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
-                       echo "We will use %llf."
+                       sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
+                       sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
+                       echo "We will use %Lf."
                        ;;
                esac
        fi
@@ -8024,17 +8243,17 @@ if $test X"$sPRIfldbl" = X; then
 #include <stdio.h>
 int main() {
   long double d = 123.456;
-  printf("%.3Lf\n", d);
+  printf("%.3llf\n", d);
 }
 EOCP
        set try
        if eval $compile; then
-               yyy=`./try$exe_ext`
+               yyy=`$run ./try`
                case "$yyy" in
                123.456)
-                       sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
-                       sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
-                       echo "We will use %Lf."
+                       sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
+                       sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
+                       echo "We will use %llf."
                        ;;
                esac
        fi
@@ -8051,7 +8270,7 @@ int main() {
 EOCP
        set try
        if eval $compile; then
-               yyy=`./try$exe_ext`
+               yyy=`$run ./try`
                case "$yyy" in
                123.456)
                        sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
@@ -8221,7 +8440,7 @@ for xxx_convert in $xxx_list; do
        set try -DTRY_$xxx_convert
        if eval $compile; then
                echo "$xxx_convert() found." >&4
-               if ./try; then
+               if $run ./try; then
                        echo "I'll use $xxx_convert to convert floats into a string." >&4
                        break;
                else
@@ -8355,7 +8574,7 @@ case "$d_getpgrp" in
 "$define")
        echo " "
        echo "Checking to see which flavor of getpgrp is in use..."
-       $cat >set.c <<EOP
+       $cat >try.c <<EOP
 #$i_unistd I_UNISTD
 #include <sys/types.h>
 #ifdef I_UNISTD
@@ -8377,10 +8596,10 @@ int main()
        exit(1);
 }
 EOP
-       if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
+       if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
                echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
                val="$define"
-       elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
+       elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
                echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
                val="$undef"
        else
@@ -8407,7 +8626,7 @@ EOP
 esac
 set d_bsdgetpgrp
 eval $setvar
-$rm -f set set.c
+$rm -f try try.*
 
 : see if setpgrp exists
 set setpgrp d_setpgrp
@@ -8417,7 +8636,7 @@ case "$d_setpgrp" in
 "$define")
        echo " "
        echo "Checking to see which flavor of setpgrp is in use..."
-       $cat >set.c <<EOP
+       $cat >try.c <<EOP
 #$i_unistd I_UNISTD
 #include <sys/types.h>
 #ifdef I_UNISTD
@@ -8439,10 +8658,10 @@ int main()
        exit(1);
 }
 EOP
-       if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
+       if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
                echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
                val="$define"
-       elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
+       elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
                echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
                val="$undef"
        else
@@ -8469,7 +8688,7 @@ EOP
 esac
 set d_bsdsetpgrp
 eval $setvar
-$rm -f set set.c
+$rm -f try try.*
 : see if bzero exists
 set bzero d_bzero
 eval $inlibc
@@ -8559,7 +8778,7 @@ int main()
 EOCP
 set try
 if eval $compile_ok; then
-       ./try
+       $run ./try
        yyy=$?
 else
        echo "(I can't seem to compile the test program--assuming it can't)"
@@ -8655,7 +8874,7 @@ int main()
 EOCP
 set try
 if eval $compile_ok; then
-       ./try
+       $run ./try
        castflags=$?
 else
        echo "(I can't seem to compile the test program--assuming it can't)"
@@ -8678,7 +8897,7 @@ echo " "
 if set vprintf val -f d_vprintf; eval $csym; $val; then
        echo 'vprintf() found.' >&4
        val="$define"
-       $cat >vprintf.c <<'EOF'
+       $cat >try.c <<'EOF'
 #include <varargs.h>
 
 int main() { xxx("foo"); }
@@ -8693,8 +8912,8 @@ va_dcl
        exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
 }
 EOF
-       set vprintf
-       if eval $compile && ./vprintf; then
+       set try
+       if eval $compile && $run ./try; then
                echo "Your vsprintf() returns (int)." >&4
                val2="$undef"
        else
@@ -8706,6 +8925,7 @@ else
                val="$undef"
                val2="$undef"
 fi
+$rm -f try try.*
 set d_vprintf
 eval $setvar
 val=$val2
@@ -8967,6 +9187,60 @@ $rm -f dbl_dig.?
 set d_dbl_dig
 eval $setvar
 
+hasproto='varname=$1; func=$2; shift; shift;
+while $test $# -ge 2; do
+       case "$1" in
+       $define) echo "#include <$2>";;
+       esac ;
+    shift 2;
+done > try.c;
+$cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
+if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
+       echo "$func() prototype found.";
+       val="$define";
+else
+       echo "$func() prototype NOT found.";
+       val="$undef";
+fi;
+set $varname;
+eval $setvar;
+$rm -f try.c tryout.c'
+
+: see if dbm.h is available
+: see if dbmclose exists
+set dbmclose d_dbmclose
+eval $inlibc
+
+case "$d_dbmclose" in
+$define)
+       set dbm.h i_dbm
+       eval $inhdr
+       case "$i_dbm" in
+       $define)
+               val="$undef"
+               set i_rpcsvcdbm
+               eval $setvar
+               ;;
+       *)      set rpcsvc/dbm.h i_rpcsvcdbm
+               eval $inhdr
+               ;;
+       esac
+       ;;
+*)     echo "We won't be including <dbm.h>"
+       val="$undef"
+       set i_dbm
+       eval $setvar
+       val="$undef"
+       set i_rpcsvcdbm
+       eval $setvar
+       ;;
+esac
+
+: see if prototype for dbminit is available
+echo " "
+set d_dbminitproto dbminit $i_dbm dbm.h
+eval $hasproto
+
 : see if difftime exists
 set difftime d_difftime
 eval $inlibc
@@ -9088,7 +9362,7 @@ $cat >fred.c<<EOM
 #include <stdio.h>
 #$i_dlfcn I_DLFCN
 #ifdef I_DLFCN
-#include <dlfcn.h>      /* the dynamic linker include file for Sunos/Solaris */
+#include <dlfcn.h>      /* the dynamic linker include file for SunOS/Solaris */
 #else
 #include <sys/types.h>
 #include <nlist.h>
@@ -9132,9 +9406,9 @@ EOM
        : Call the object file tmp-dyna.o in case dlext=o.
        if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 && 
                mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 && 
-               $ld -o dyna.$dlext $lddlflags tmp-dyna${_o} > /dev/null 2>&1 && 
-               $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1; then
-               xxx=`./fred`
+               $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 && 
+               $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
+               xxx=`$run ./fred`
                case $xxx in
                1)      echo "Test program failed using dlopen." >&4
                        echo "Perhaps you should not use dynamic loading." >&4;;
@@ -9156,25 +9430,6 @@ $rm -f fred fred.? dyna.$dlext dyna.? tmp-dyna.?
 set d_dlsymun
 eval $setvar
 
-hasproto='varname=$1; func=$2; shift; shift;
-while $test $# -ge 2; do
-       case "$1" in
-       $define) echo "#include <$2>";;
-       esac ;
-    shift 2;
-done > try.c;
-$cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
-if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
-       echo "$func() prototype found.";
-       val="$define";
-else
-       echo "$func() prototype NOT found.";
-       val="$undef";
-fi;
-set $varname;
-eval $setvar;
-$rm -f try.c tryout.c'
-
 : see if prototype for drand48 is available
 echo " "
 set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h
@@ -9214,7 +9469,7 @@ eval $inlibc
 
 : Locate the flags for 'open()'
 echo " "
-$cat >open3.c <<'EOCP'
+$cat >try.c <<'EOCP'
 #include <sys/types.h>
 #ifdef I_FCNTL
 #include <fcntl.h>
@@ -9233,10 +9488,10 @@ int main() {
 EOCP
 : check sys/file.h first to get FREAD on Sun
 if $test `./findhdr sys/file.h` && \
-               set open3 -DI_SYS_FILE && eval $compile; then
+               set try -DI_SYS_FILE && eval $compile; then
        h_sysfile=true;
        echo "<sys/file.h> defines the O_* constants..." >&4
-       if ./open3; then
+       if $run ./try; then
                echo "and you have the 3 argument form of open()." >&4
                val="$define"
        else
@@ -9244,10 +9499,10 @@ if $test `./findhdr sys/file.h` && \
                val="$undef"
        fi
 elif $test `./findhdr fcntl.h` && \
-               set open3 -DI_FCNTL && eval $compile; then
+               set try -DI_FCNTL && eval $compile; then
        h_fcntl=true;
        echo "<fcntl.h> defines the O_* constants..." >&4
-       if ./open3; then
+       if $run ./try; then
                echo "and you have the 3 argument form of open()." >&4
                val="$define"
        else
@@ -9260,7 +9515,7 @@ else
 fi
 set d_open3
 eval $setvar
-$rm -f open3*
+$rm -f try try.*
 
 : see which of string.h or strings.h is needed
 echo " "
@@ -9319,7 +9574,7 @@ int main() {
 EOCP
        set try
        if eval $compile_ok; then
-               o_nonblock=`./try`
+               o_nonblock=`$run ./try`
                case "$o_nonblock" in
                '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
                *) echo "Seems like we can use $o_nonblock.";;
@@ -9416,7 +9671,7 @@ EOCP
        set try
        if eval $compile_ok; then
                echo "$startsh" >mtry
-               echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
+               echo "$run ./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
                chmod +x mtry
                ./mtry >/dev/null 2>&1
                case $? in
@@ -9517,7 +9772,7 @@ case "$d_fcntl" in
 "$define")
        set try
        if eval $compile_ok; then
-               if ./try; then
+               if $run ./try; then
                        echo "Yes, it seems to work."
                        val="$define"
                else
@@ -9631,7 +9886,7 @@ $cat <<EOM
 
 Checking to see how well your C compiler handles fd_set and friends ...
 EOM
-$cat >fd_set.c <<EOCP
+$cat >try.c <<EOCP
 #$i_systime I_SYS_TIME
 #$i_sysselct I_SYS_SELECT
 #$d_socket HAS_SOCKET
@@ -9659,12 +9914,12 @@ int main() {
 #endif
 }
 EOCP
-set fd_set -DTRYBITS
+set try -DTRYBITS
 if eval $compile; then
        d_fds_bits="$define"
        d_fd_set="$define"
        echo "Well, your system knows about the normal fd_set typedef..." >&4
-       if ./fd_set; then
+       if $run ./try; then
                echo "and you have the normal fd_set macros (just as I'd expect)." >&4
                d_fd_macros="$define"
        else
@@ -9677,12 +9932,12 @@ else
        $cat <<'EOM'
 Hmm, your compiler has some difficulty with fd_set.  Checking further...
 EOM
-       set fd_set
+       set try
        if eval $compile; then
                d_fds_bits="$undef"
                d_fd_set="$define"
                echo "Well, your system has some sort of fd_set available..." >&4
-               if ./fd_set; then
+               if $run ./try; then
                        echo "and you have the normal fd_set macros." >&4
                        d_fd_macros="$define"
                else
@@ -9698,7 +9953,7 @@ EOM
                d_fd_macros="$undef"
        fi
 fi
-$rm -f fd_set*
+$rm -f try try.*
 
 : see if fgetpos exists
 set fgetpos d_fgetpos
@@ -9708,6 +9963,35 @@ eval $inlibc
 set flock d_flock
 eval $inlibc
 
+: see if this is a sys/file.h system
+val=''
+set sys/file.h val
+eval $inhdr
+
+: do we need to include sys/file.h ?
+case "$val" in
+"$define")
+       echo " "
+       if $h_sysfile; then
+               val="$define"
+               echo "We'll be including <sys/file.h>." >&4
+       else
+               val="$undef"
+               echo "We won't be including <sys/file.h>." >&4
+       fi
+       ;;
+*)
+       h_sysfile=false
+       ;;
+esac
+set i_sysfile
+eval $setvar
+
+: see if prototype for flock is available
+echo " "
+set d_flockproto flock $i_sysfile sys/file.h
+eval $hasproto
+
 : see if fork exists
 set fork d_fork
 eval $inlibc
@@ -10369,6 +10653,61 @@ esac
 set modfl d_modfl
 eval $inlibc
 
+d_modfl_pow32_bug="$undef"
+
+case "$d_longdbl$d_modfl" in
+$define$define)
+       $cat <<EOM
+Checking to see whether your modfl() is okay for large values...
+EOM
+$cat >try.c <<EOCP
+#include <math.h> 
+#include <stdio.h>
+int main() {
+    long double nv = 4294967303.15;
+    long double v, w;
+    v = modfl(nv, &w);         
+#ifdef __GLIBC__
+    printf("glibc");
+#endif
+    printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w);
+    return 0;
+}
+EOCP
+       case "$osname:$gccversion" in
+       aix:)   saveccflags="$ccflags"
+               ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
+       esac
+       set try
+       if eval $compile; then
+               foo=`$run ./try`
+               case "$foo" in
+               *" 4294967303.150000 1.150000 4294967302.000000")
+                       echo >&4 "Your modfl() is broken for large values."
+                       d_modfl_pow32_bug="$define"
+                       case "$foo" in
+                       glibc)  echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()."
+                       ;;
+                       esac
+                       ;;
+               *" 4294967303.150000 0.150000 4294967303.000000")
+                       echo >&4 "Your modfl() seems okay for large values."
+                       ;;
+               *)      echo >&4 "I don't understand your modfl() at all."
+                       d_modfl="$undef"
+                       ;;
+               esac
+               $rm -f try.* try core core.try.*
+       else
+               echo "I cannot figure out whether your modfl() is okay, assuming it isn't."
+               d_modfl="$undef"
+       fi
+       case "$osname:$gccversion" in
+       aix:)   $ccflags="saveccflags" ;; # restore
+       esac
+       ;;
+esac
+
 : see if mprotect exists
 set mprotect d_mprotect
 eval $inlibc
@@ -10463,7 +10802,7 @@ int main()
 EOCP
        set try
        if eval $compile_ok; then
-               dflt=`./try`
+               dflt=`$run ./try`
        else
                dflt='1'
                echo "(I can't seem to compile the test program.  Guessing...)"
@@ -10579,7 +10918,7 @@ esac
 case "$i8type" in
 '')    set try -DINT8
        if eval $compile; then
-               case "`./try$exe_ext`" in
+               case "`$run ./try`" in
                int8_t) i8type=int8_t
                        u8type=uint8_t
                        i8size=1
@@ -10612,7 +10951,7 @@ esac
 case "$i16type" in
 '')    set try -DINT16
        if eval $compile; then
-               case "`./try$exe_ext`" in
+               case "`$run ./try`" in
                int16_t)
                        i16type=int16_t
                        u16type=uint16_t
@@ -10654,7 +10993,7 @@ esac
 case "$i32type" in
 '')    set try -DINT32
        if eval $compile; then
-               case "`./try$exe_ext`" in
+               case "`$run ./try`" in
                int32_t)
                        i32type=int32_t
                        u32type=uint32_t
@@ -10733,7 +11072,7 @@ set try
 
 d_nv_preserves_uv="$undef"
 if eval $compile; then
-       d_nv_preserves_uv_bits="`./try$exe_ext`"
+       d_nv_preserves_uv_bits="`$run ./try`"
 fi
 case "$d_nv_preserves_uv_bits" in
 \-[1-9]*)      
@@ -11026,6 +11365,10 @@ eval $inlibc
 set readv d_readv
 eval $inlibc
 
+: see if realpath exists
+set realpath d_realpath
+eval $inlibc
+
 : see if recvmsg exists
 set recvmsg d_recvmsg
 eval $inlibc
@@ -11117,7 +11460,7 @@ exit(0);
 EOCP
        set try
        if eval $compile_ok; then
-               if ./try 2>/dev/null; then
+               if $run ./try 2>/dev/null; then
                        echo "Yes, it can."
                        val="$define"
                else
@@ -11195,7 +11538,7 @@ exit(0);
 EOCP
        set try
        if eval $compile_ok; then
-               if ./try 2>/dev/null; then
+               if $run ./try 2>/dev/null; then
                        echo "Yes, it can."
                        val="$define"
                else
@@ -11255,7 +11598,7 @@ exit(0);
 EOCP
        set try
        if eval $compile_ok; then
-               if ./try 2>/dev/null; then
+               if $run ./try 2>/dev/null; then
                        echo "Yes, it can."
                        val="$define"
                else
@@ -11424,7 +11767,7 @@ END
     val="$undef"
     set try
     if eval $compile; then
-       xxx=`./try`
+       xxx=`$run ./try`
         case "$xxx" in
         semun) val="$define" ;;
         esac
@@ -11482,7 +11825,7 @@ END
     val="$undef"
     set try
     if eval $compile; then
-        xxx=`./try`
+        xxx=`$run ./try`
         case "$xxx" in
         semid_ds) val="$define" ;;
         esac
@@ -11807,7 +12150,7 @@ int main()
 EOP
        set try
        if eval $compile; then
-               if ./try >/dev/null 2>&1; then
+               if $run ./try >/dev/null 2>&1; then
                        echo "POSIX sigsetjmp found." >&4
                        val="$define"
                else
@@ -11837,10 +12180,25 @@ $rm -f try.c try
 set sockatmark d_sockatmark
 eval $inlibc
 
+: see if prototype for sockatmark is available
+echo " "
+set d_sockatmarkproto sockatmark $d_socket sys/socket.h
+eval $hasproto
+
 : see if socks5_init exists
 set socks5_init d_socks5_init
 eval $inlibc
 
+: see if prototype for setresgid is available
+echo " "
+set d_sresgproto setresgid $i_unistd unistd.h
+eval $hasproto
+
+: see if prototype for setresuid is available
+echo " "
+set d_sresuproto setresuid $i_unistd unistd.h
+eval $hasproto
+
 : see if sys/stat.h is available
 set sys/stat.h i_sysstat
 eval $inhdr
@@ -11975,8 +12333,8 @@ int main() {
 EOP
 val="$undef"
 set try
-if eval $compile; then
-       if ./try; then
+if eval $compile && $to try.c; then
+       if $run ./try; then
                echo "Your stdio acts pretty std."
                val="$define"
        else
@@ -12072,8 +12430,8 @@ int main() {
 }
 EOP
        set try
-       if eval $compile; then
-               case `./try$exe_ext` in
+       if eval $compile && $to try.c; then
+               case `$run ./try` in
                Pass_changed)
                        echo "Increasing ptr in your stdio decreases cnt by the same amount.  Good." >&4
                        d_stdio_ptr_lval_sets_cnt="$define" ;;
@@ -12112,8 +12470,8 @@ int main() {
 }
 EOP
        set try
-       if eval $compile; then
-               if ./try; then
+       if eval $compile && $to try.c; then
+               if $run ./try; then
                        echo "And its _base field acts std."
                        val="$define"
                else
@@ -12143,7 +12501,7 @@ EOCP
        do
                set try -DSTDIO_STREAM_ARRAY=$s
                if eval $compile; then
-                       case "`./try$exe_ext`" in
+                       case "`$run ./try`" in
                        yes)    stdio_stream_array=$s; break ;;
                        esac
                fi
@@ -12289,7 +12647,7 @@ int main() {
 EOCP
        set try
        if eval $compile; then
-               yyy=`./try`
+               yyy=`$run ./try`
                case "$yyy" in
                ok) echo "Your strtoll() seems to be working okay." ;;
                *) cat <<EOM >&4
@@ -12374,7 +12732,7 @@ EOCP
 EOCP
        set try
        if eval $compile; then
-               case "`./try`" in
+               case "`$run ./try`" in
                ok) echo "Your strtoul() seems to be working okay." ;;
                *) cat <<EOM >&4
 Your strtoul() doesn't seem to be working okay.
@@ -12428,7 +12786,7 @@ int main() {
 EOCP
        set try
        if eval $compile; then
-               case "`./try`" in
+               case "`$run ./try`" in
                ok) echo "Your strtoull() seems to be working okay." ;;
                *) cat <<EOM >&4
 Your strtoull() doesn't seem to be working okay.
@@ -12480,7 +12838,7 @@ int main() {
 EOCP
        set try
        if eval $compile; then
-               case "`./try`" in
+               case "`$run ./try`" in
                ok) echo "Your strtouq() seems to be working okay." ;;
                *) cat <<EOM >&4
 Your strtouq() doesn't seem to be working okay.
@@ -12504,6 +12862,11 @@ eval $inlibc
 set syscall d_syscall
 eval $inlibc
 
+: see if prototype for syscall is available
+echo " "
+set d_syscallproto syscall $i_unistd unistd.h
+eval $hasproto
+
 : see if sysconf exists
 set sysconf d_sysconf
 eval $inlibc
 set d_tzname
 eval $setvar
 
-case "$crosscompile" in
-''|[nN]*) crosscompile="$undef" ;;
-esac
-
 case "$osname" in
 next|rhapsody|darwin) multiarch="$define" ;;
 esac
@@ -12576,14 +12935,14 @@ esac
 
 : check for ordering of bytes in a long
 echo " "
-case "$crosscompile$multiarch" in
+case "$usecrosscompile$multiarch" in
 *$define*)
        $cat <<EOM
 You seem to be either cross-compiling or doing a multiarchitecture build,
 skipping the byteorder check.
 
 EOM
-       byteorder='0xffff'
+       byteorder='ffff'
        ;;
 *)
        case "$byteorder" in
@@ -12620,7 +12979,7 @@ EOCP
                xxx_prompt=y
                set try
                if eval $compile && ./try > /dev/null; then
-                       dflt=`./try`
+                       dflt=`$run ./try`
                        case "$dflt" in
                        [1-4][1-4][1-4][1-4]|12345678|87654321)
                                echo "(The test program ran ok.)"
@@ -12705,8 +13064,8 @@ int main() {
 EOCP
 set try
 if eval $compile_ok; then
-       echo "(This test may dump core.)" >&4
-       ./try >&2 >/dev/null
+       echo "(Testing for character data alignment may dump core.)" >&4
+       $run ./try 2>&1 >/dev/null
        case "$?" in
        0)      cat >&4 <<EOM
 You can access character data pretty unalignedly.
@@ -12742,6 +13101,11 @@ eval $inlibc
 set usleep d_usleep
 eval $inlibc
 
+: see if prototype for usleep is available
+echo " "
+set d_usleepproto usleep $i_unistd unistd.h
+eval $hasproto
+
 : see if ustat exists
 set ustat d_ustat
 eval $inlibc
@@ -12808,7 +13172,7 @@ case "$d_closedir" in
 "$define")
        echo " "
        echo "Checking whether closedir() returns a status..." >&4
-       cat > closedir.c <<EOM
+       cat > try.c <<EOM
 #$i_dirent I_DIRENT            /**/
 #$i_sysdir I_SYS_DIR           /**/
 #$i_sysndir I_SYS_NDIR         /**/
@@ -12837,9 +13201,9 @@ case "$d_closedir" in
 #endif 
 int main() { return closedir(opendir(".")); }
 EOM
-       set closedir
+       set try
        if eval $compile_ok; then
-               if ./closedir > /dev/null 2>&1 ; then
+               if $run ./try > /dev/null 2>&1 ; then
                        echo "Yes, it does."
                        val="$undef"
                else
@@ -12857,7 +13221,7 @@ EOM
 esac
 set d_void_closedir
 eval $setvar
-$rm -f closedir*
+$rm -f try try.*
 : see if there is a wait4
 set wait4 d_wait4
 eval $inlibc
@@ -12887,7 +13251,7 @@ Revision='$Revision'
 
 : check for alignment requirements
 echo " "
-case "$crosscompile$multiarch" in
+case "$usecrosscompile$multiarch" in
 *$define*)
        $cat <<EOM
 You seem to be either cross-compiling or doing a multiarchitecture build,
@@ -12924,7 +13288,7 @@ int main()
 EOCP
                set try
                if eval $compile_ok; then
-                       dflt=`./try`
+                       dflt=`$run ./try`
                else
                        dflt='8'
                        echo "(I can't seem to compile the test program...)"
@@ -12989,13 +13353,19 @@ $define)
 #include <sys/types.h>
 #include <stdio.h>
 #include <db.h>
-int main()
+int main(int argc, char *argv[])
 {
 #ifdef DB_VERSION_MAJOR        /* DB version >= 2 */
     int Major, Minor, Patch ;
     unsigned long Version ;
     (void)db_version(&Major, &Minor, &Patch) ;
-    printf("You have Berkeley DB Version 2 or greater\n");
+    if (argc == 2) {
+        printf("%d %d %d %d %d %d\n",
+               DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
+               Major, Minor, Patch);
+        exit(0);
+    }
+    printf("You have Berkeley DB Version 2 or greater.\n");
 
     printf("db.h is from Berkeley DB Version %d.%d.%d\n",
                DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH);
@@ -13004,11 +13374,11 @@ int main()
 
     /* check that db.h & libdb are compatible */
     if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) {
-       printf("db.h and libdb are incompatible\n") ;
+       printf("db.h and libdb are incompatible.\n") ;
         exit(3);       
     }
 
-    printf("db.h and libdb are compatible\n") ;
+    printf("db.h and libdb are compatible.\n") ;
 
     Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
                + DB_VERSION_PATCH ;
@@ -13016,14 +13386,18 @@ int main()
     /* needs to be >= 2.3.4 */
     if (Version < 2003004) {
     /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
-       printf("but Perl needs Berkeley DB 2.3.4 or greater\n") ;
+       printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ;
         exit(2);       
     }
 
     exit(0);
 #else
 #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
-    printf("You have Berkeley DB Version 1\n");
+    if (argc == 2) {
+        printf("1 0 0\n");
+        exit(0);
+    }
+    printf("You have Berkeley DB Version 1.\n");
     exit(0);   /* DB version < 2: the coast is clear. */
 #else
     exit(1);   /* <db.h> not Berkeley DB? */
@@ -13032,8 +13406,12 @@ int main()
 }
 EOCP
        set try
-       if eval $compile_ok && ./try; then
+       if eval $compile_ok && $run ./try; then
                echo 'Looks OK.' >&4
+               set `$run ./try 1`
+               db_version_major=$1
+               db_version_minor=$2
+               db_version_patch=$3
        else
                echo "I can't use Berkeley DB with your <db.h>.  I'll disable Berkeley DB." >&4
                i_db=$undef
@@ -13276,7 +13654,7 @@ done
 
 echo " "
 echo "Determining whether or not we are on an EBCDIC system..." >&4
-$cat >tebcdic.c <<'EOM'
+$cat >try.c <<'EOM'
 int main()
 {
   if ('M'==0xd4) return 0;
@@ -13285,19 +13663,19 @@ int main()
 EOM
 
 val=$undef
-set tebcdic
+set try
 if eval $compile_ok; then
-       if ./tebcdic; then
+       if $run ./try; then
                echo "You seem to speak EBCDIC." >&4
                val="$define"
        else
-               echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF8." >&4
+               echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
        fi
 else
        echo "I'm unable to compile the test program." >&4
        echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
 fi
-$rm -f tebcdic.c tebcdic
+$rm -f try try.*
 set ebcdic
 eval $setvar
 
@@ -13322,7 +13700,9 @@ $cat >>try.c <<EOCP
 # define STDIO_STREAM_ARRAY $stdio_stream_array
 #endif
 int main() {
-  FILE* p = fopen("try.out", "w");
+  FILE* p;
+  unlink("try.out");
+  p = fopen("try.out", "w");
 #ifdef TRY_FPUTC
   fputc('x', p);
 #else
@@ -13371,12 +13751,14 @@ int main() {
 }
 EOCP
 : first we have to find out how _not_ to flush
+$to try.c
 if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
     output=''
     set try -DTRY_FPUTC
     if eval $compile; then
+           $run ./try 2>/dev/null
            $rm -f try.out
-           ./try$exe_ext 2>/dev/null
+           $from try.out
            if $test ! -s try.out -a "X$?" = X42; then
                output=-DTRY_FPUTC
            fi
@@ -13384,10 +13766,10 @@ if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
     case "$output" in
     '')
            set try -DTRY_FPRINTF
-           $rm -f try.out
            if eval $compile; then
+                   $run ./try 2>/dev/null
                    $rm -f try.out
-                   ./try$exe_ext 2>/dev/null
+                   $from try.out
                    if $test ! -s try.out -a "X$?" = X42; then
                        output=-DTRY_FPRINTF
                    fi
 case "$fflushNULL" in
 '')    set try -DTRY_FFLUSH_NULL $output
        if eval $compile; then
-               $rm -f try.out
-               ./try$exe_ext 2>/dev/null
+               $run ./try 2>/dev/null
                code="$?"
+               $rm -f try.out
+               $from try.out
                if $test -s try.out -a "X$code" = X42; then
                        fflushNULL="`$cat try.out`"
                else
@@ -13447,7 +13830,7 @@ EOCP
                 set tryp
                 if eval $compile; then
                     $rm -f tryp.out
-                    $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out
+                    $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
                     if cmp tryp.c tryp.out >/dev/null 2>&1; then
                        $cat >&4 <<EOM
 fflush(NULL) seems to behave okay with input streams.
@@ -13511,7 +13894,7 @@ EOCP
        set tryp
        if eval $compile; then
            $rm -f tryp.out
-           $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out
+           $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
            if cmp tryp.c tryp.out >/dev/null 2>&1; then
               $cat >&4 <<EOM
 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
@@ -13524,7 +13907,7 @@ EOM
 (Now testing the other method--but note that this also may fail.)
 EOM
                                $rm -f try.out
-                               ./try$exe_ext 2>/dev/null
+                               $run ./try 2>/dev/null
                                if $test -s try.out -a "X$?" = X42; then
                                        fflushall="`$cat try.out`"
                                fi
@@ -13630,7 +14013,7 @@ int main() {
 EOCP
 set try
 if eval $compile_ok; then
-       yyy=`./try`
+       yyy=`$run ./try`
        case "$yyy" in
        '')     gidsize=4
                echo "(I can't execute the test program--guessing $gidsize.)" >&4
@@ -13664,7 +14047,7 @@ int main() {
 EOCP
 set try
 if eval $compile; then
-       yyy=`./try`
+       yyy=`$run ./try`
        case "$yyy" in
        '')     gidsign=1
                echo "(I can't execute the test program--guessing unsigned.)" >&4
@@ -13699,7 +14082,7 @@ int main() {
 EOCP
        set try
        if eval $compile; then
-               yyy=`./try$exe_ext`
+               yyy=`$run ./try`
                case "$yyy" in
                12345678901)
                        sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
@@ -13721,7 +14104,7 @@ int main() {
 EOCP
        set try
        if eval $compile; then
-               yyy=`./try$exe_ext`
+               yyy=`$run ./try`
                case "$yyy" in
                12345678901)
                        sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
@@ -13744,7 +14127,7 @@ int main() {
 EOCP
        set try
        if eval $compile; then
-               yyy=`./try$exe_ext`
+               yyy=`$run ./try`
                case "$yyy" in
                12345678901)
                        sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
@@ -13755,45 +14138,45 @@ EOCP
        fi
 fi
 
-if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
-       $cat >try.c <<'EOCP'
+if $test X"$sPRId64" = X -a X"$quadtype" != X; then
+       $cat >try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
 int main() {
-  long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
-  printf("%lld\n", q);
+  $quadtype q = 12345678901;
+  printf("%Ld\n", q);
 }
 EOCP
        set try
        if eval $compile; then
-               yyy=`./try$exe_ext`
+               yyy=`$run ./try`
                case "$yyy" in
                12345678901)
-                       sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
-                       sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
-                       echo "We will use the %lld style."
+                       sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
+                       sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
+                       echo "We will use %Ld."
                        ;;
                esac
        fi
 fi
 
-if $test X"$sPRId64" = X -a X"$quadtype" != X; then
-       $cat >try.c <<EOCP
+if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
+       $cat >try.c <<'EOCP'
 #include <sys/types.h>
 #include <stdio.h>
 int main() {
-  $quadtype q = 12345678901;
-  printf("%Ld\n", q);
+  long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
+  printf("%lld\n", q);
 }
 EOCP
        set try
        if eval $compile; then
-               yyy=`./try$exe_ext`
+               yyy=`$run ./try`
                case "$yyy" in
                12345678901)
-                       sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
-                       sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
-                       echo "We will use %Ld."
+                       sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
+                       sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
+                       echo "We will use the %lld style."
                        ;;
                esac
        fi
@@ -13810,7 +14193,7 @@ int main() {
 EOCP
        set try
        if eval $compile; then
-               yyy=`./try$exe_ext`
+               yyy=`$run ./try`
                case "$yyy" in
                12345678901)
                        sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
@@ -14131,8 +14514,8 @@ main(int ac, char **av)
 }
 EOCP
        set try
-       if eval $compile && ./try 2>&1 >/dev/null; then
-               case "`./try`" in
+       if eval $compile && $run ./try 2>&1 >/dev/null; then
+               case "`$run ./try`" in
                "that's all right, then")
                        okay=yes
                        ;;
@@ -14380,13 +14763,13 @@ $cc $ccflags -c bar2.c >/dev/null 2>&1
 $cc $ccflags -c foo.c >/dev/null 2>&1
 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
-       ./foobar >/dev/null 2>&1; then
+       $run ./foobar >/dev/null 2>&1; then
        echo "$ar appears to generate random libraries itself."
        orderlib=false
        ranlib=":"
 elif $ar ts bar$_a >/dev/null 2>&1 &&
        $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
-       ./foobar >/dev/null 2>&1; then
+       $run ./foobar >/dev/null 2>&1; then
                echo "a table of contents needs to be added with '$ar ts'."
                orderlib=false
                ranlib="$ar ts"
@@ -14526,7 +14909,7 @@ int main() {
 EOCP
                set try
                if eval $compile_ok; then
-                       selectminbits=`./try`
+                       selectminbits=`$run ./try`
                        case "$selectminbits" in
                        '')     cat >&4 <<EOM
 Cannot figure out on how many bits at a time your select() operates.
@@ -14571,7 +14954,7 @@ else
        xxx=`echo '#include <signal.h>' |
        $cppstdin $cppminus $cppflags 2>/dev/null |
        $grep '^[       ]*#.*include' | 
-       $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sort | $uniq`
+       $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
 fi
 : Check this list of files to be sure we have parsed the cpp output ok.
 : This will also avoid potentially non-existent files, such 
@@ -14718,13 +15101,13 @@ $cat >>signal_cmd <<'EOS'
 
 set signal
 if eval $compile_ok; then
-       ./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
+       $run ./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
 else
        echo "(I can't seem be able to compile the whole test program)" >&4
        echo "(I'll try it in little pieces.)" >&4
        set signal -DJUST_NSIG
        if eval $compile_ok; then
-               ./signal$_exe > signal.nsg
+               $run ./signal$_exe > signal.nsg
                $cat signal.nsg
        else
                echo "I can't seem to figure out how many signals you have." >&4
@@ -14745,7 +15128,7 @@ EOCP
                set signal
                if eval $compile; then
                        echo "SIG${xx} found."
-                       ./signal$_exe  >> signal.ls1
+                       $run ./signal$_exe  >> signal.ls1
                else
                        echo "SIG${xx} NOT found."
                fi
@@ -14836,7 +15219,7 @@ int main() {
 EOCP
 set try
 if eval $compile_ok; then
-       yyy=`./try`
+       yyy=`$run ./try`
        case "$yyy" in
        '')     sizesize=4
                echo "(I can't execute the test program--guessing $sizesize.)" >&4
@@ -14930,7 +15313,7 @@ esac
 set ssize_t ssizetype int stdio.h sys/types.h
 eval $typedef
 dflt="$ssizetype"
-$cat > ssize.c <<EOM
+$cat > try.c <<EOM
 #include <stdio.h>
 #include <sys/types.h>
 #define Size_t $sizetype
@@ -14947,9 +15330,9 @@ int main()
 }
 EOM
 echo " "
-set ssize
-if eval $compile_ok && ./ssize > /dev/null; then
-       ssizetype=`./ssize`
+set try
+if eval $compile_ok && $run ./try > /dev/null; then
+       ssizetype=`$run ./try`
        echo "I'll be using $ssizetype for functions returning a byte count." >&4
 else
        $cat >&4 <<EOM
@@ -14965,7 +15348,7 @@ EOM
        . ./myread
        ssizetype="$ans"
 fi
-$rm -f ssize ssize.*
+$rm -f try try.*
 
 : see what type of char stdio uses.
 echo " "
@@ -15039,7 +15422,7 @@ int main() {
 EOCP
 set try
 if eval $compile_ok; then
-       yyy=`./try`
+       yyy=`$run ./try`
        case "$yyy" in
        '')     uidsize=4
                echo "(I can't execute the test program--guessing $uidsize.)" >&4
@@ -15072,7 +15455,7 @@ int main() {
 EOCP
 set try
 if eval $compile; then
-       yyy=`./try`
+       yyy=`$run ./try`
        case "$yyy" in
        '')     uidsign=1
                echo "(I can't execute the test program--guessing unsigned.)" >&4
@@ -15160,60 +15543,6 @@ case "$yacc" in
        ;;
 esac
 
-: see if dbm.h is available
-: see if dbmclose exists
-set dbmclose d_dbmclose
-eval $inlibc
-
-case "$d_dbmclose" in
-$define)
-       set dbm.h i_dbm
-       eval $inhdr
-       case "$i_dbm" in
-       $define)
-               val="$undef"
-               set i_rpcsvcdbm
-               eval $setvar
-               ;;
-       *)      set rpcsvc/dbm.h i_rpcsvcdbm
-               eval $inhdr
-               ;;
-       esac
-       ;;
-*)     echo "We won't be including <dbm.h>"
-       val="$undef"
-       set i_dbm
-       eval $setvar
-       val="$undef"
-       set i_rpcsvcdbm
-       eval $setvar
-       ;;
-esac
-
-: see if this is a sys/file.h system
-val=''
-set sys/file.h val
-eval $inhdr
-
-: do we need to include sys/file.h ?
-case "$val" in
-"$define")
-       echo " "
-       if $h_sysfile; then
-               val="$define"
-               echo "We'll be including <sys/file.h>." >&4
-       else
-               val="$undef"
-               echo "We won't be including <sys/file.h>." >&4
-       fi
-       ;;
-*)
-       h_sysfile=false
-       ;;
-esac
-set i_sysfile
-eval $setvar
-
 : see if fcntl.h is there
 val=''
 set fcntl.h val
@@ -15437,12 +15766,12 @@ $awk \\
 EOSH
 cat <<'EOSH' >> Cppsym.try
 'length($1) > 0 {
-    printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", %s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
-    printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", _%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
-    printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", __%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
-    printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", __%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+    printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", (long)%s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+    printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", (long)_%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+    printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", (long)__%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+    printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", (long)__%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
 }'      >> try.c
-echo '}' >> try.c
+echo 'return 0;}' >> try.c
 EOSH
 cat <<EOSH >> Cppsym.try
 ccflags="$ccflags"
@@ -15450,7 +15779,7 @@ case "$osname-$gccversion" in
 irix-) ccflags="\$ccflags -woff 1178" ;;
 os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
 esac
-$cc -o try $optimize \$ccflags $ldflags try.c $libs && ./try$exe_ext
+$cc -o try $optimize \$ccflags $ldflags try.c $libs && $run ./try
 EOSH
 chmod +x Cppsym.try
 $eunicefix Cppsym.try
@@ -15833,8 +16162,11 @@ for xxx in $known_extensions ; do
                esac
                ;;
        Thread|thread)
-               case "$usethreads" in 
-               true|$define|y) avail_ext="$avail_ext $xxx" ;;
+                case "$usethreads" in
+                true|$define|y)
+                        case "$useithreads" in
+                        $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;;
+                        esac
                esac
                ;;
        IPC/SysV|ipc/sysv)
@@ -16079,6 +16411,7 @@ _a='$_a'
 _exe='$_exe'
 _o='$_o'
 afs='$afs'
+afsroot='$afsroot'
 alignbytes='$alignbytes'
 ansi2knr='$ansi2knr'
 aphostname='$aphostname'
@@ -16134,7 +16467,6 @@ cppminus='$cppminus'
 cpprun='$cpprun'
 cppstdin='$cppstdin'
 cppsymbols='$cppsymbols'
-crosscompile='$crosscompile'
 cryptlib='$cryptlib'
 csh='$csh'
 d_Gconvert='$d_Gconvert'
@@ -16179,6 +16511,7 @@ d_crypt='$d_crypt'
 d_csh='$d_csh'
 d_cuserid='$d_cuserid'
 d_dbl_dig='$d_dbl_dig'
+d_dbminitproto='$d_dbminitproto'
 d_difftime='$d_difftime'
 d_dirnamlen='$d_dirnamlen'
 d_dlerror='$d_dlerror'
@@ -16206,6 +16539,7 @@ d_fds_bits='$d_fds_bits'
 d_fgetpos='$d_fgetpos'
 d_flexfnam='$d_flexfnam'
 d_flock='$d_flock'
+d_flockproto='$d_flockproto'
 d_fork='$d_fork'
 d_fpathconf='$d_fpathconf'
 d_fpos64_t='$d_fpos64_t'
@@ -16292,6 +16626,7 @@ d_mkstemps='$d_mkstemps'
 d_mktime='$d_mktime'
 d_mmap='$d_mmap'
 d_modfl='$d_modfl'
+d_modfl_pow32_bug='$d_modfl_pow32_bug'
 d_mprotect='$d_mprotect'
 d_msg='$d_msg'
 d_msg_ctrunc='$d_msg_ctrunc'
@@ -16336,6 +16671,7 @@ d_quad='$d_quad'
 d_readdir='$d_readdir'
 d_readlink='$d_readlink'
 d_readv='$d_readv'
+d_realpath='$d_realpath'
 d_recvmsg='$d_recvmsg'
 d_rename='$d_rename'
 d_rewinddir='$d_rewinddir'
@@ -16391,11 +16727,14 @@ d_sigaction='$d_sigaction'
 d_sigprocmask='$d_sigprocmask'
 d_sigsetjmp='$d_sigsetjmp'
 d_sockatmark='$d_sockatmark'
+d_sockatmarkproto='$d_sockatmarkproto'
 d_socket='$d_socket'
 d_socklen_t='$d_socklen_t'
 d_sockpair='$d_sockpair'
 d_socks5_init='$d_socks5_init'
 d_sqrtl='$d_sqrtl'
+d_sresgproto='$d_sresgproto'
+d_sresuproto='$d_sresuproto'
 d_statblks='$d_statblks'
 d_statfs_f_flags='$d_statfs_f_flags'
 d_statfs_s='$d_statfs_s'
@@ -16425,6 +16764,7 @@ d_strxfrm='$d_strxfrm'
 d_suidsafe='$d_suidsafe'
 d_symlink='$d_symlink'
 d_syscall='$d_syscall'
+d_syscallproto='$d_syscallproto'
 d_sysconf='$d_sysconf'
 d_sysernlst='$d_sysernlst'
 d_syserrlst='$d_syserrlst'
@@ -16443,6 +16783,7 @@ d_umask='$d_umask'
 d_uname='$d_uname'
 d_union_semun='$d_union_semun'
 d_usleep='$d_usleep'
+d_usleepproto='$d_usleepproto'
 d_ustat='$d_ustat'
 d_vendorarch='$d_vendorarch'
 d_vendorbin='$d_vendorbin'
@@ -16462,6 +16803,9 @@ d_xenix='$d_xenix'
 date='$date'
 db_hashtype='$db_hashtype'
 db_prefixtype='$db_prefixtype'
+db_version_major='$db_version_major'
+db_version_minor='$db_version_minor'
+db_version_patch='$db_version_patch'
 defvoidused='$defvoidused'
 direntrytype='$direntrytype'
 dlext='$dlext'
@@ -16486,6 +16830,7 @@ flex='$flex'
 fpossize='$fpossize'
 fpostype='$fpostype'
 freetype='$freetype'
+from='$from'
 full_ar='$full_ar'
 full_csh='$full_csh'
 full_sed='$full_sed'
@@ -16709,6 +17054,7 @@ patchlevel='$patchlevel'
 path_sep='$path_sep'
 perl5='$perl5'
 perl='$perl'
+perl_patchlevel='$perl_patchlevel'
 perladmin='$perladmin'
 perllibs='$perllibs'
 perlpath='$perlpath'
@@ -16735,6 +17081,7 @@ rd_nodata='$rd_nodata'
 revision='$revision'
 rm='$rm'
 rmail='$rmail'
+run='$run'
 runnm='$runnm'
 sPRIEUldbl='$sPRIEUldbl'
 sPRIFUldbl='$sPRIFUldbl'
@@ -16809,11 +17156,13 @@ subversion='$subversion'
 sysman='$sysman'
 tail='$tail'
 tar='$tar'
+targetarch='$targetarch'
 tbl='$tbl'
 tee='$tee'
 test='$test'
 timeincl='$timeincl'
 timetype='$timetype'
+to='$to'
 touch='$touch'
 tr='$tr'
 trnl='$trnl'
@@ -16836,6 +17185,7 @@ uquadtype='$uquadtype'
 use5005threads='$use5005threads'
 use64bitall='$use64bitall'
 use64bitint='$use64bitint'
+usecrosscompile='$usecrosscompile'
 usedl='$usedl'
 useithreads='$useithreads'
 uselargefiles='$uselargefiles'
@@ -16847,6 +17197,7 @@ usenm='$usenm'
 useopcode='$useopcode'
 useperlio='$useperlio'
 useposix='$useposix'
+usereentrant='$usereentrant'
 usesfio='$usesfio'
 useshrplib='$useshrplib'
 usesocks='$usesocks'
@@ -16888,7 +17239,8 @@ $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
 : add special variables
 $test -f $src/patchlevel.h && \
 awk '/^#define[        ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
-echo "CONFIGDOTSH=true" >>config.sh
+echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
+echo "PERL_CONFIG_SH=true" >>config.sh
 
 : propagate old symbols
 if $test -f UU/config.sh; then
@@ -16918,7 +17270,7 @@ fi
 case "$alldone" in
 exit)
        $rm -rf UU
-       echo "Done."
+       echo "Extraction done."
        exit 0
        ;;
 cont)
@@ -16948,7 +17300,9 @@ esac
 
 echo " "
 exec 1>&4
+pwd=`pwd`
 . ./UU/extract
+cd $pwd
 
 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
        dflt=y
@@ -16978,7 +17332,7 @@ elif test -f [Mm]akefile; then
        echo " "
        echo "Now you must run a $make."
 else
-       echo "Done."
+       echo "Configure done."
 fi
 
 if $test -f Policy.sh; then