This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[patch] rid local_patches warnings
[perl5.git] / Configure
index c2034e1..075963f 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 Sun Apr  8 02:03:47 EET DST 2001 [metaconfig 3.0 PL70]
+# Generated on Tue Jun 12 02:31:11 EET DST 2001 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -273,6 +273,7 @@ lib_ext=''
 obj_ext=''
 path_sep=''
 afs=''
+afsroot=''
 alignbytes=''
 ansi2knr=''
 archlib=''
@@ -332,6 +333,7 @@ d_csh=''
 full_csh=''
 d_cuserid=''
 d_dbl_dig=''
+d_dbminitproto=''
 d_difftime=''
 d_dlerror=''
 d_dlopen=''
@@ -357,6 +359,7 @@ d_fds_bits=''
 d_fgetpos=''
 d_flexfnam=''
 d_flock=''
+d_flockproto=''
 d_fork=''
 d_fpos64_t=''
 d_frexpl=''
@@ -447,6 +450,7 @@ d_mktime=''
 d_mmap=''
 mmaptype=''
 d_modfl=''
+d_modfl_pow32_bug=''
 d_mprotect=''
 d_msg=''
 d_msgctl=''
@@ -477,6 +481,7 @@ d_seekdir=''
 d_telldir=''
 d_readlink=''
 d_readv=''
+d_realpath=''
 d_recvmsg=''
 d_rename=''
 d_rmdir=''
@@ -529,6 +534,7 @@ d_sigaction=''
 d_sigprocmask=''
 d_sigsetjmp=''
 d_sockatmark=''
+d_sockatmarkproto=''
 d_msg_ctrunc=''
 d_msg_dontroute=''
 d_msg_oob=''
@@ -543,6 +549,8 @@ socketlib=''
 d_socklen_t=''
 d_socks5_init=''
 d_sqrtl=''
+d_sresgproto=''
+d_sresuproto=''
 d_statblks=''
 d_statfs_f_flags=''
 d_statfs_s=''
@@ -567,6 +575,7 @@ d_strerrm=''
 d_strerror=''
 d_sysernlst=''
 d_syserrlst=''
+d_strftime=''
 d_strtod=''
 d_strtol=''
 d_strtold=''
@@ -578,6 +587,7 @@ d_strtouq=''
 d_strxfrm=''
 d_symlink=''
 d_syscall=''
+d_syscallproto=''
 d_sysconf=''
 d_system=''
 d_tcgetpgrp=''
@@ -596,6 +606,7 @@ d_semctl_semid_ds=''
 d_semctl_semun=''
 d_union_semun=''
 d_usleep=''
+d_usleepproto=''
 d_ustat=''
 d_vfork=''
 usevfork=''
@@ -634,6 +645,9 @@ h_sysfile=''
 i_arpainet=''
 db_hashtype=''
 db_prefixtype=''
+db_version_major=''
+db_version_minor=''
+db_version_patch=''
 i_db=''
 i_dbm=''
 i_rpcsvcdbm=''
@@ -815,6 +829,7 @@ api_subversion=''
 api_version=''
 api_versionstring=''
 patchlevel=''
+perl_patchlevel=''
 revision=''
 subversion=''
 version=''
@@ -1498,10 +1513,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)`
@@ -1584,7 +1599,7 @@ true)
        echo " "
        . UU/extract
        rm -rf UU
-       echo "Done."
+       echo "Extraction done."
        exit 0
        ;;
 esac
@@ -2141,7 +2156,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
@@ -3216,6 +3231,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
@@ -4061,7 +4085,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
@@ -5909,12 +5936,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
@@ -5997,6 +6029,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
@@ -6004,8 +6037,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.
@@ -6276,12 +6320,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
@@ -6674,13 +6719,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
@@ -6745,14 +6790,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 ;;
@@ -6939,7 +6984,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 && ./a.out; then
                        cat <<EOM
 You appear to have ELF support.  I'll use $cc to build dynamic libraries.
 EOM
@@ -8001,7 +8046,7 @@ 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
@@ -8009,9 +8054,9 @@ EOCP
                yyy=`./try$exe_ext`
                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
@@ -8023,7 +8068,7 @@ 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
@@ -8031,9 +8076,9 @@ EOCP
                yyy=`./try$exe_ext`
                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
@@ -8966,6 +9011,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
@@ -9131,7 +9230,7 @@ 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 && 
+               $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; then
                xxx=`./fred`
                case $xxx in
@@ -9155,25 +9254,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
@@ -9707,6 +9787,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
@@ -10368,6 +10477,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=`./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
@@ -11025,6 +11189,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
@@ -11836,10 +12004,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
@@ -12229,6 +12412,10 @@ if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
     fi
 fi
 
+: see if strftime exists
+set strftime d_strftime
+eval $inlibc
+
 : see if strtod exists
 set strtod d_strtod
 eval $inlibc
@@ -12499,6 +12686,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
@@ -12700,8 +12892,8 @@ int main() {
 EOCP
 set try
 if eval $compile_ok; then
-       echo "(This test may dump core.)" >&4
-       ./try >&2 >/dev/null
+       echo "(Testign for character data alignment may dump core.)" >&4
+       ./try 2>&1 >/dev/null
        case "$?" in
        0)      cat >&4 <<EOM
 You can access character data pretty unalignedly.
@@ -12737,6 +12929,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
@@ -12984,13 +13181,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);
@@ -12999,11 +13202,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 ;
@@ -13011,14 +13214,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? */
@@ -13029,6 +13236,10 @@ EOCP
        set try
        if eval $compile_ok && ./try; then
                echo 'Looks OK.' >&4
+               set `./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
@@ -13750,13 +13961,13 @@ 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
@@ -13764,21 +13975,21 @@ EOCP
                yyy=`./try$exe_ext`
                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
@@ -13786,9 +13997,9 @@ EOCP
                yyy=`./try$exe_ext`
                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
@@ -14566,7 +14777,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 
@@ -15155,60 +15366,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
@@ -15432,12 +15589,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"
@@ -15828,8 +15985,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)
@@ -16074,6 +16234,7 @@ _a='$_a'
 _exe='$_exe'
 _o='$_o'
 afs='$afs'
+afsroot='$afsroot'
 alignbytes='$alignbytes'
 ansi2knr='$ansi2knr'
 aphostname='$aphostname'
@@ -16174,6 +16335,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'
@@ -16201,6 +16363,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'
@@ -16287,6 +16450,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'
@@ -16331,6 +16495,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'
@@ -16386,11 +16551,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'
@@ -16407,6 +16575,7 @@ d_strcoll='$d_strcoll'
 d_strctcpy='$d_strctcpy'
 d_strerrm='$d_strerrm'
 d_strerror='$d_strerror'
+d_strftime='$d_strftime'
 d_strtod='$d_strtod'
 d_strtol='$d_strtol'
 d_strtold='$d_strtold'
@@ -16419,6 +16588,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'
@@ -16437,6 +16607,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'
@@ -16456,6 +16627,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'
@@ -16703,6 +16877,7 @@ patchlevel='$patchlevel'
 path_sep='$path_sep'
 perl5='$perl5'
 perl='$perl'
+perl_patchlevel='$perl_patchlevel'
 perladmin='$perladmin'
 perllibs='$perllibs'
 perlpath='$perlpath'
@@ -16882,7 +17057,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
@@ -16912,7 +17088,7 @@ fi
 case "$alldone" in
 exit)
        $rm -rf UU
-       echo "Done."
+       echo "Extraction done."
        exit 0
        ;;
 cont)
@@ -16972,7 +17148,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