This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
cygwin port
[perl5.git] / Configure
index 7a6f9d6..19c83a0 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 Fri Feb  4 21:57:24 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Wed May 31 23:34:04 EET DST 2000 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
@@ -343,7 +343,6 @@ d_endnent=''
 d_endpent=''
 d_endpwent=''
 d_endsent=''
-d_endspent=''
 d_fchmod=''
 d_fchown=''
 d_fcntl=''
@@ -354,6 +353,8 @@ d_fgetpos=''
 d_flexfnam=''
 d_flock=''
 d_fork=''
+d_fpos64_t=''
+d_frexpl=''
 d_fs_data_s=''
 d_fseeko=''
 d_fsetpos=''
@@ -362,6 +363,9 @@ d_ftello=''
 d_ftime=''
 d_gettimeod=''
 d_Gconvert=''
+d_getcwd=''
+d_getespwnam=''
+d_getfsstat=''
 d_getgrent=''
 d_getgrps=''
 d_gethbyaddr=''
@@ -389,10 +393,10 @@ d_getprior=''
 d_getpbyname=''
 d_getpbynumber=''
 d_getprotoprotos=''
+d_getprpwnam=''
 d_getpwent=''
 d_getsent=''
 d_getservprotos=''
-d_getspent=''
 d_getspnam=''
 d_getsbyname=''
 d_getsbyport=''
@@ -401,8 +405,10 @@ d_hasmntopt=''
 d_htonl=''
 d_iconv=''
 d_inetaton=''
-d_int64t=''
+d_int64_t=''
 d_isascii=''
+d_isnan=''
+d_isnanl=''
 d_killpg=''
 d_lchown=''
 d_ldbl_dig=''
@@ -413,7 +419,9 @@ d_longdbl=''
 longdblsize=''
 d_longlong=''
 longlongsize=''
+d_lseekproto=''
 d_lstat=''
+d_madvise=''
 d_mblen=''
 d_mbstowcs=''
 d_mbtowc=''
@@ -423,14 +431,24 @@ d_memcpy=''
 d_memmove=''
 d_memset=''
 d_mkdir=''
+d_mkdtemp=''
 d_mkfifo=''
+d_mkstemp=''
+d_mkstemps=''
 d_mktime=''
+d_mmap=''
+mmaptype=''
+d_modfl=''
+d_mprotect=''
 d_msg=''
 d_msgctl=''
 d_msgget=''
 d_msgrcv=''
 d_msgsnd=''
+d_msync=''
+d_munmap=''
 d_nice=''
+d_off64_t=''
 d_open3=''
 d_fpathconf=''
 d_pathconf=''
@@ -443,6 +461,7 @@ old_pthread_create_joinable=''
 d_pthread_yield=''
 d_sched_yield=''
 sched_yield=''
+d_qgcvt=''
 d_readdir=''
 d_rewinddir=''
 d_seekdir=''
@@ -481,7 +500,6 @@ d_setrgid=''
 d_setruid=''
 d_setsent=''
 d_setsid=''
-d_setspent=''
 d_setvbuf=''
 d_sfio=''
 usesfio=''
@@ -505,6 +523,7 @@ d_socket=''
 d_sockpair=''
 sockethdr=''
 socketlib=''
+d_socklen_t=''
 d_sqrtl=''
 d_statblks=''
 d_statfs_f_flags=''
@@ -602,6 +621,7 @@ i_gdbm=''
 d_grpasswd=''
 i_grp=''
 i_iconv=''
+i_ieeefp=''
 i_inttypes=''
 i_limits=''
 i_locale=''
@@ -617,6 +637,7 @@ i_netinettcp=''
 i_niin=''
 i_sysin=''
 i_poll=''
+i_prot=''
 i_pthread=''
 d_pwage=''
 d_pwchange=''
@@ -634,6 +655,7 @@ i_stddef=''
 i_stdlib=''
 i_string=''
 strings=''
+i_sunmath=''
 i_sysaccess=''
 i_sysdir=''
 i_sysfile=''
@@ -642,6 +664,9 @@ i_bsdioctl=''
 i_sysfilio=''
 i_sysioctl=''
 i_syssockio=''
+i_syslog=''
+i_sysmman=''
+i_sysmode=''
 i_sysmount=''
 i_sysndir=''
 i_sysparam=''
@@ -655,6 +680,7 @@ i_systimes=''
 i_systypes=''
 i_sysuio=''
 i_sysun=''
+i_sysutsname=''
 i_sysvfs=''
 i_syswait=''
 i_sgtty=''
@@ -681,8 +707,6 @@ installusrbinperl=''
 intsize=''
 longsize=''
 shortsize=''
-d_fpos64_t=''
-d_off64_t=''
 libc=''
 ldlibpthname=''
 libperl=''
@@ -698,6 +722,7 @@ libs=''
 libsdirs=''
 libsfiles=''
 libsfound=''
+libspath=''
 lns=''
 d_PRIEldbl=''
 d_PRIFldbl=''
@@ -754,6 +779,8 @@ hostcat=''
 passcat=''
 orderlib=''
 ranlib=''
+d_perl_otherlibdirs=''
+otherlibdirs=''
 package=''
 spackage=''
 pager=''
@@ -762,11 +789,14 @@ api_subversion=''
 api_version=''
 api_versionstring=''
 patchlevel=''
+revision=''
 subversion=''
 version=''
+perl5=''
 perladmin=''
 perlpath=''
 d_nv_preserves_uv=''
+d_nv_preserves_uv_bits=''
 i16size=''
 i16type=''
 i32size=''
@@ -841,11 +871,14 @@ sitebin=''
 sitebinexp=''
 installsitelib=''
 sitelib=''
+sitelib_stem=''
 sitelibexp=''
 siteprefix=''
 siteprefixexp=''
+sizesize=''
 sizetype=''
 so=''
+socksizetype=''
 sharpbang=''
 shsharp=''
 spitshell=''
@@ -863,10 +896,10 @@ uidsign=''
 uidsize=''
 uidtype=''
 archname64=''
-use64bits=''
+use64bitall=''
+use64bitint=''
 uselargefiles=''
 uselongdouble=''
-uselonglong=''
 usemorebits=''
 usemultiplicity=''
 nm_opt=''
@@ -882,6 +915,10 @@ usethreads=''
 incpath=''
 mips_type=''
 usrinc=''
+d_vendorarch=''
+installvendorarch=''
+vendorarch=''
+vendorarchexp=''
 d_vendorbin=''
 installvendorbin=''
 vendorbin=''
@@ -889,12 +926,15 @@ vendorbinexp=''
 d_vendorlib=''
 installvendorlib=''
 vendorlib=''
+vendorlib_stem=''
 vendorlibexp=''
 usevendorprefix=''
 vendorprefix=''
 vendorprefixexp=''
 defvoidused=''
 voidflags=''
+pm_apiversion=''
+xs_apiversion=''
 CONFIG=''
 
 define='define'
@@ -931,16 +971,16 @@ inclwanted=''
 groupstype=''
 : change the next line if compiling for Xenix/286 on Xenix/386
 xlibpth='/usr/lib/386 /lib/386'
-
 : Possible local library directories to search.
 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
 
 : general looking path for locating libraries
-glibpth="/shlib /usr/shlib /lib/pa1.1 /usr/lib/large"
-glibpth="$glibpth /lib /usr/lib $xlibpth"
+glibpth="/usr/lib/large /lib /usr/lib $xlibpth"
 glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
+test -f /shlib/libc.so     && glibpth="/shlib $glibpth"
 
 : Private path used by Configure to find libraries.  Its value
 : is prepended to libpth. This variable takes care of special
@@ -959,10 +999,10 @@ defvoidused=15
 
 : List of libraries we want.
 : If anyone needs -lnet, put it in a hint file.
-libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl'
+libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl'
 libswanted="$libswanted dld ld sun m c cposix posix"
 libswanted="$libswanted ndir dir crypt sec"
-libswanted="$libswanted ucb bsd BSD PW x"
+libswanted="$libswanted ucb bsd BSD PW x iconv"
 : We probably want to search /usr/shlib before most other libraries.
 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
@@ -1253,6 +1293,7 @@ while test $# -gt 0; do
                echo "$yyy=$zzz"                >> posthint.sh ;;
             *)  echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
            esac
+           shift
            ;;
        -V) echo "$me generated by metaconfig 3.0 PL70." >&2
            exit 0;;
@@ -1303,10 +1344,15 @@ esac
 case "$fastread$alldone" in
 yescont|yesexit) ;;
 *)
-       if test ! -t 0; then
-               echo "Say 'sh Configure', not 'sh <Configure'"
-               exit 1
-       fi
+       case "$extractsh" in
+       true) ;;
+       *)
+               if test ! -t 0; then
+                       echo "Say 'sh Configure', not 'sh <Configure'"
+                       exit 1
+               fi
+               ;;
+       esac
        ;;
 esac
 
@@ -1862,7 +1908,6 @@ ln
 more
 nm
 nroff
-perl
 pg
 test
 uname
@@ -2388,12 +2433,12 @@ EOM
        : specified already.
        case "$hintfile" in
        ''|' ')
-               file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'`
+               file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
                : Also try without trailing minor version numbers.
-               xfile=`echo $file | $sed -e 's@_[^_]*$@@'`
-               xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'`
-               xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'`
-               xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'`
+               xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
+               xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
+               xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
+               xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
                case "$file" in
                '') dflt=none ;;
                *)  case "$osvers" in
@@ -2596,21 +2641,23 @@ $undef$define) . ./whoa; eval "$var=\$tu";;
 *) eval "$var=$val";;
 esac'
 
+case "$usethreads" in
+$define|true|[yY]*)     dflt='y';;
+*) dflt='n';;
+esac
 cat <<EOM
 
 Perl can be built to take advantage of threads on some systems.
-To do so, Configure must be run with -Dusethreads.
+To do so, Configure can be run with -Dusethreads.
 
 Note that threading is a highly experimental feature, and
 some known race conditions still remain.  If you choose to try
 it, be very sure to not actually deploy it for production
 purposes.  README.threads has more details, and is required
 reading if you enable threads.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
 EOM
-case "$usethreads" in
-$define|true|[yY]*)     dflt='y';;
-*) dflt='n';;
-esac
 rp='Build a threading Perl?'
 . ./myread
 case "$ans" in
@@ -2704,12 +2751,12 @@ This multiple interpreter support is required for interpreter-based threads.
 EOM
        val="$define"
        ;;
-*)
-       echo 'Normally you do not need this and you should answer no.'
-       case "$usemultiplicity" in
+*)     case "$usemultiplicity" in
        $define|true|[yY]*)     dflt='y';;
        *) dflt='n';;
        esac
+       echo " "
+       echo "If this doesn't make any sense to you, just accept the default '$dflt'."
        rp='Build Perl for multiplicity?'
        . ./myread
        case "$ans" in
@@ -3043,7 +3090,7 @@ int main() {
        exit(0);
 }
 EOM
-if $cc -o gccvers gccvers.c; then
+if $cc $ldflags -o gccvers gccvers.c; then
        gccversion=`./gccvers`
        case "$gccversion" in
        '') echo "You are not using GNU cc." ;;
@@ -3231,6 +3278,7 @@ while test "$type"; do
                true)
                        case "$ansexp" in
                        /*) value="$ansexp" ;;
+                       [a-zA-Z]:/*) value="$ansexp" ;;
                        *)
                                redo=true
                                case "$already" in
@@ -3277,13 +3325,15 @@ while test "$type"; do
                        Directory)
                                for fp in $gfpth; do
                                        if test "X$fp" = X.; then
-                                           pf="$ansexp"
+                                           dir="$ans"
+                                           direxp="$ansexp"
                                        else    
-                                           pf="$fp/$ansexp"
+                                           dir="$fp/$ansexp"
+                                           direxp="$fp/$ansexp"
                                        fi
-                                       if test -d "$pf"; then
+                                       if test -d "$direxp"; then
                                                type=''
-                                               value="$pf"
+                                               value="$dir"
                                                break
                                        fi
                                done
@@ -3647,18 +3697,17 @@ case "$firstmakefile" in
 '') firstmakefile='makefile';;
 esac
 
+case "$usesocks" in
+$define|true|[yY]*)    dflt='y';;
+*) dflt='n';;
+esac
 cat <<EOM
 
 Perl can be built to use the SOCKS proxy protocol library.  To do so,
 Configure must be run with -Dusesocks.
 
-Normally you do not need this and you should answer no.
-
+If this doesn't make any sense to you, just accept the default '$dflt'.
 EOM
-case "$usesocks" in
-$define|true|[yY]*)    dflt='y';;
-*) dflt='n';;
-esac
 rp='Build Perl for SOCKS?'
 . ./myread
 case "$ans" in
@@ -3679,52 +3728,73 @@ case "$libswanted" in
 '') libswanted='c_s';;
 esac
 case "$usesocks" in
-$define)
-       libswanted="$libswanted socks5 socks5_sh"
-       ;;
+"$define") libswanted="$libswanted socks5 socks5_sh" ;;
 esac
+libsfound=''
+libsfiles=''
+libsdirs=''
+libspath=''
+for thisdir in $libpth $xlibpth; do
+  test -d $thisdir && libspath="$libspath $thisdir"
+done
 for thislib in $libswanted; do
-       
-       libname="$thislib"
-       if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`;
-               $test -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
-               libstyle=shared
-       elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
-               libstyle=shared
-       elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then
-               libstyle=static
-       elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then
-               libstyle=static
-       elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then
-               libstyle=static
-               libname=${thislib}_s
-       elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then
-               libstyle="static"
-       fi
-       if $test -f "$xxx"; then
-               eval $libscheck
-       fi
-       if $test -f "$xxx"; then
+       for thisdir in $libspath; do
+           xxx=''
+           if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
+               xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|tail -1`
+               $test -f "$xxx" && eval $libscheck
+               $test -f "$xxx" && libstyle=shared
+           fi
+           if test ! -f "$xxx"; then
+               xxx=$thisdir/lib$thislib.$so
+               $test -f "$xxx" && eval $libscheck
+               $test -f "$xxx" && libstyle=shared
+           fi  
+           if test ! -f "$xxx"; then
+               xxx=$thisdir/lib$thislib$_a
+               $test -f "$xxx" && eval $libscheck
+               $test -f "$xxx" && libstyle=static
+           fi
+           if test ! -f "$xxx"; then
+               xxx=$thisdir/$thislib$_a
+               $test -f "$xxx" && eval $libscheck
+               $test -f "$xxx" && libstyle=static
+           fi
+           if test ! -f "$xxx"; then
+               xxx=$thisdir/lib${thislib}_s$_a
+               $test -f "$xxx" && eval $libscheck
+               $test -f "$xxx" && libstyle=static
+               $test -f "$xxx" && thislib=${thislib}_s
+           fi
+           if test ! -f "$xxx"; then
+               xxx=$thisdir/Slib$thislib$_a
+               $test -f "$xxx" && eval $libscheck
+               $test -f "$xxx" && libstyle=static
+           fi
+           if $test -f "$xxx"; then
                case "$libstyle" in
-               shared) echo "Found -l$libname (shared)." ;;
-               static) echo "Found -l$libname." ;;
-               *)      echo "Found -l$libname ($libstyle)." ;;
+               shared) echo "Found -l$thislib (shared)." ;;
+               static) echo "Found -l$thislib." ;;
+               *)      echo "Found -l$thislib ($libstyle)." ;;
                esac
                case " $dflt " in
                *"-l$thislib "*);;
-               *) dflt="$dflt -l$libname"
+               *) dflt="$dflt -l$thislib"
                    libsfound="$libsfound $xxx"
                    yyy=`basename $xxx`
                    libsfiles="$libsfiles $yyy"
-                   yyy=`echo $xxx|sed "s@/$yyy\\$@@"`
+                   yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
                    case " $libsdirs " in
                    *" $yyy "*) ;;
                    *) libsdirs="$libsdirs $yyy" ;;
                    esac
                   ;;
                esac
-       else
-               echo "No -l$thislib."
+               break
+           fi  
+       done
+       if $test ! -f "$xxx"; then
+           echo "No -l$thislib."
        fi
 done
 set X $dflt
@@ -4182,7 +4252,7 @@ set off_t lseektype long stdio.h sys/types.h
 eval $typedef_ask
 
 echo " "
-$echo $n "Checking to see how big your file offsets are...$c" >&4
+echo "Checking to see how big your file offsets are..." >&4
 $cat >try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
@@ -4195,7 +4265,7 @@ EOCP
 set try
 if eval $compile_ok; then
        lseeksize=`./try`
-       $echo " $lseeksize bytes." >&4
+       echo "Your file offsets are $lseeksize bytes long."
 else
        dflt=$longsize
        echo " "
@@ -4216,7 +4286,7 @@ case "$fpostype" in
 *_t) zzz="$fpostype"   ;;
 *)   zzz="fpos_t"      ;;
 esac
-$echo $n "Checking the size of $zzz...$c" >&4 
+echo "Checking the size of $zzz..." >&4 
 cat > try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
@@ -4230,16 +4300,15 @@ if eval $compile_ok; then
        yyy=`./try`
        case "$yyy" in
        '')     fpossize=4
-               echo " "
                echo "(I can't execute the test program--guessing $fpossize.)" >&4
                ;;
        *)      fpossize=$yyy
-               echo " $fpossize bytes."
+               echo "Your $zzz is $fpossize bytes long."
                ;;
        esac
 else
        dflt="$longsize"
-       echo " "
+       echo " " >&4
        echo "(I can't compile the test program.  Guessing...)" >&4
        rp="What is the size of your file positions (in bytes)?"
        . ./myread
@@ -4248,23 +4317,34 @@ fi
 
 
 
+# Backward compatibility (uselfs is deprecated).
+case "$uselfs" in
+"$define"|true|[yY]*)
+       cat <<EOM >&4
+
+*** Configure -Duselfs is deprecated, using -Duselargefiles instead.
+EOM
+       uselargefiles="$define"
+       ;;
+esac                          
+
 case "$lseeksize:$fpossize" in
 8:8) cat <<EOM
 
 You can have files larger than 2 gigabytes.
 EOM
    val="$define" ;;
-*) cat <<EOM
+*)    case "$uselargefiles" in
+   "$undef"|false|[nN]*) dflt='n' ;;
+   *)  dflt='y' ;;
+   esac
+   cat <<EOM
 
 Perl can be built to understand large files (files larger than 2 gigabytes)
-on some systems.  To do so, Configure must be run with -Duselargefiles.
+on some systems.  To do so, Configure can be run with -Duselargefiles.
 
-If this doesn't make any sense to you, just accept the default 'y'.
+If this doesn't make any sense to you, just accept the default '$dflt'.
 EOM
-   case "$uselargefiles" in
-   "$undef"|false|[nN]*) dflt='n' ;;
-   *)  dflt='y' ;;
-   esac
    rp='Try to understand large files, if available?'
    . ./myread
    case "$ans" in
@@ -4280,11 +4360,11 @@ case "$uselargefiles" in
 : Look for a hint-file generated 'call-back-unit'.  If the
 : user has specified that a large files perl is to be built,
 : we may need to set or change some other defaults.
-       if $test -f uselfs.cbu; then
+       if $test -f uselargefiles.cbu; then
                echo "Your platform has some specific hints for large file builds, using them..."
-               . ./uselfs.cbu
+               . ./uselargefiles.cbu
                echo " "
-               $echo $n "Rechecking to see how big your file offsets are...$c" >&4
+               echo "Rechecking to see how big your file offsets are..." >&4
                $cat >try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
@@ -4297,7 +4377,7 @@ EOCP
                set try
                if eval $compile_ok; then
                        lseeksize=`./try`
-                       $echo " $lseeksize bytes." >&4
+                       $echo "Your file offsets are now $lseeksize bytes long."
                else
                        dflt="$lseeksize"
                        echo " "
@@ -4328,7 +4408,7 @@ EOCP
                                echo "(I can't execute the test program--guessing $fpossize.)" >&4
                                ;;
                        *)      fpossize=$yyy
-                               echo " $fpossize bytes."
+                               echo " $fpossize bytes." >&4
                                ;;
                        esac
                else
@@ -4347,7 +4427,7 @@ esac
 
 case "$usemorebits" in
 "$define"|true|[yY]*)
-       use64bits="$define"
+       use64bitint="$define"
        uselongdouble="$define"
        usemorebits="$define"
        ;;
@@ -4356,70 +4436,170 @@ case "$usemorebits" in
 esac
 
 
-case "$intsize:$longsize" in
-8:*|*:8) cat <<EOM
+case "$uselonglong" in
+"$define"|true|[yY]*)
+       cat <<EOM >&4
 
-You have natively 64-bit integers.
+*** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
 EOM
-   val="$define" ;;
-*) cat <<EOM
+       use64bitint="$define"
+       ;;
+esac                          
+case "$use64bits" in
+"$define"|true|[yY]*)
+       cat <<EOM >&4
+
+*** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
+EOM
+       use64bitint="$define"
+       ;;
+esac                          
+case "$use64bitints" in
+"$define"|true|[yY]*)
+       cat <<EOM >&4
+
+*** There is no Configure -Duse64bitints, using -Duse64bitint instead.
+EOM
+       use64bitint="$define"
+       ;;
+esac                          
+case "$use64bitsint" in
+"$define"|true|[yY]*)
+       cat <<EOM >&4
+
+*** There is no Configure -Duse64bitsint, using -Duse64bitint instead.
+EOM
+       use64bitint="$define"
+       ;;
+esac                          
+case "$uselonglongs" in
+"$define"|true|[yY]*)
+       cat <<EOM >&4
+
+*** There is no Configure -Duselonglongs, using -Duse64bitint instead.
+EOM
+       use64bitint="$define"
+       ;;
+esac                          
+case "$use64bitsall" in
+"$define"|true|[yY]*)
+       cat <<EOM >&4
+
+*** There is no Configure -Duse64bitsall, using -Duse64bitall instead.
+EOM
+       use64bitall="$define"
+       ;;
+esac                          
+
+case "$ccflags" in
+*-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
+esac
+case "$use64bitall" in
+"$define"|true|[yY]*) use64bitint="$define" ;;
+esac
+
+case "$longsize" in
+8) cat <<EOM
+
+You have natively 64-bit long integers.
+EOM
+   val="$define"
+   ;;
+*) case "$use64bitint" in
+   "$define"|true|[yY]*) dflt='y';;
+   *) dflt='n';;
+   esac
+   cat <<EOM
 
 Perl can be built to take advantage of 64-bit integer types
-on some systems.  To do so, Configure must be run with -Duse64bits.
-
-If this doesn't make any sense to you, just accept the default.
-EOM
-  case "$use64bits" in
-  $define|true|[yY]*)  dflt='y';;
-  *) dflt='n';;
-  esac
-  rp='Try to use 64-bit integers, if available?'
-  . ./myread
-  case "$ans" in
-  y|Y) val="$define" ;;
-  *)   val="$undef"  ;;
-  esac
-  ;;
-esac
-set use64bits
+on some systems.  To do so, Configure can be run with -Duse64bitint.
+Choosing this option will most probably introduce binary incompatibilities.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+   rp='Try to use 64-bit integers, if available?'
+   . ./myread
+   case "$ans" in
+   [yY]*) val="$define" ;;
+   *)     val="$undef"  ;;
+   esac
+   ;;
+esac
+set use64bitint
 eval $setvar
 
-case "$archname64" in
-'') archname64='' ;;   # not a typo
+case "$use64bitall" in
+"$define"|true|[yY]*) dflt='y' ;;
+*) case "$longsize" in
+   8) dflt='y' ;;
+   *) dflt='n' ;;
+   esac
+   ;;
+esac   
+cat <<EOM
+
+You may also choose to try maximal 64-bitness.  It means using as much
+64-bitness as possible on the platform.  This in turn means even more
+binary incompatibilities.  On the other hand, your platform may not
+have any more 64-bitness available than what you already have chosen.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+rp='Try to use maximal 64-bit support, if available?'
+. ./myread
+case "$ans" in
+[yY]*) val="$define" ;;
+*)     val="$undef"  ;;
 esac
+set use64bitall
+eval $setvar
+case "$use64bitall" in
+"$define")
+       case "$use64bitint" in
+       "$undef")
+               cat <<EOM
 
-case "$use64bits" in
+Since you have chosen a maximally 64-bit build, I'm also turning on
+the use of 64-bit integers.
+EOM
+               use64bitint="$define" ;;
+       esac
+       ;;
+esac
+
+case "$use64bitint" in
 "$define"|true|[yY]*)
 : Look for a hint-file generated 'call-back-unit'.  If the
 : user has specified that a 64-bit perl is to be built,
 : we may need to set or change some other defaults.
-       if $test -f use64bits.cbu; then
+       if $test -f use64bitint.cbu; then
+               echo "Your platform has some specific hints for 64-bit integers, using them..."
+               . ./use64bitint.cbu
+       fi
+       case "$longsize" in
+       4) case "$archname64" in
+          '') archname64=64int ;;
+          esac
+          ;;
+       esac
+       ;;
+esac
+
+case "$use64bitall" in
+"$define"|true|[yY]*)
+: Look for a hint-file generated 'call-back-unit'.  If the
+: user has specified that a maximally 64-bit perl is to be built,
+: we may need to set or change some other defaults.
+       if $test -f use64bitall.cbu; then
                echo "Your platform has some specific hints for 64-bit builds, using them..."
-               . ./use64bits.cbu
-       else
-               $cat <<EOM
-(Your platform doesn't have any specific hints for 64-bit builds.)
-EOM
-                case "$intsize:$longsize" in
-8:*|*:8) cat <<EOM
-(This is probably okay, as your system is a natively 64-bit system.)
-EOM
-                  ;;
-                esac
-               case "$gccversion" in
-               '')     ;;
-               *)      case "$ccflags" in
-                       *-DUSE_LONG_LONG*) ;;
-                       *) $cat <<EOM
-But since you seem to be using gcc, I will now add -DUSE_LONG_LONG
-to the compilation flags.
-EOM
-                          ccflags="$ccflags -DUSE_LONG_LONG"
-                          ;;
-                       esac
-                       ;;
-               esac
+               . ./use64bitall.cbu
        fi
+       case "$longsize" in
+       4) case "$archname64" in
+          ''|64int) archname64=64all ;;
+          esac
+          ;;
+       esac
        ;;
 esac
 
@@ -4477,7 +4657,7 @@ $define)
         esac
        ;;
 esac
-case "$use64bits" in
+case "$use64bitint" in
 $define)
        case "$archname64" in
        '')
@@ -4607,44 +4787,39 @@ prefixit='case "$3" in
        esac;;
 esac'
 
-: set the base revision
-baserev=5.0
-
 
 : get the patchlevel
 echo " "
 echo "Getting the current patchlevel..." >&4
 if $test -r $rsrc/patchlevel.h;then
+       revision=`awk '/define[         ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
        patchlevel=`awk '/define[       ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
        subversion=`awk '/define[       ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
        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`
 else
+       revision=0
        patchlevel=0
        subversion=0
        api_revision=0
        api_version=0
        api_subversion=0
 fi
-$echo $n "(You have $package" $c
-case "$package" in
-"*$baserev")   ;;
-*)             $echo $n " $baserev" $c ;;
-esac
+$echo $n "(You have $package revision $revision" $c
 $echo $n " patchlevel $patchlevel" $c
 test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c
 echo ".)"
 case "$osname" in
 dos|vms)
        : XXX Should be a Configure test for double-dots in filenames.
-       version=`echo $baserev $patchlevel $subversion | \
+       version=`echo $revision $patchlevel $subversion | \
                 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
        api_versionstring=`echo $api_revision $api_version $api_subversion | \
                 $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
        ;;
 *)
-       version=`echo $baserev $patchlevel $subversion | \
+       version=`echo $revision $patchlevel $subversion | \
                 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
        api_versionstring=`echo $api_revision $api_version $api_subversion | \
                 $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
@@ -4665,7 +4840,7 @@ case "$installstyle" in
                *) dflt='lib/perl5' ;;
        esac
        ;;
-*)     dflt='lib/perl5' ;;
+*)     dflt="$installstyle" ;;
 esac
 : Probably not worth prompting for this since we prompt for all
 : the directories individually, and the prompt would be too long and
@@ -4755,9 +4930,9 @@ case "$usethreads$usemultiplicity" in
        ;;
 *)     $cat <<EOM
 
-Perl 5.006 can be compiled for binary compatibility with 5.005.
-If you decide to do so, you will be able to continue using most
-of the extensions that were compiled for Perl 5.005.
+This version of Perl can be compiled for binary compatibility with 5.005.
+If you decide to do so, you will be able to continue using most of the
+extensions that were compiled for Perl 5.005.
 
 EOM
        case "$bincompat5005$d_bincompat5005" in
@@ -5081,6 +5256,108 @@ echo "Your system uses $freetype free(), it would seem." >&4
 $rm -f malloc.[co]
 $cat <<EOM
 
+After $package is installed, you may wish to install various
+add-on modules and utilities.  Typically, these add-ons will
+be installed under $prefix with the rest
+of this package.  However, you may wish to install such add-ons
+elsewhere under a different prefix.
+
+If you do not wish to put everything under a single prefix, that's
+ok.  You will be prompted for the individual locations; this siteprefix
+is only used to suggest the defaults.
+
+The default should be fine for most people.
+
+EOM
+fn=d~+
+rp='Installation prefix to use for add-on modules and utilities?'
+: XXX Here might be another good place for an installstyle setting.
+case "$siteprefix" in
+'') dflt=$prefix ;;
+*)  dflt=$siteprefix ;;
+esac
+. ./getfile
+: XXX Prefixit unit does not yet support siteprefix and vendorprefix
+oldsiteprefix=''
+case "$siteprefix" in
+'') ;;
+*)     case "$ans" in
+       "$prefix") ;;
+       *) oldsiteprefix="$prefix";;
+       esac
+       ;;
+esac
+siteprefix="$ans"
+siteprefixexp="$ansexp"
+
+: determine where site specific libraries go.
+: Usual default is /usr/local/lib/perl5/site_perl/$version
+: The default "style" setting is made in installstyle.U
+: XXX No longer works with Prefixit stuff.
+prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+case "$sitelib" in
+'') case "$installstyle" in
+       *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
+       *)       dflt=$siteprefix/lib/site_$prog/$version ;;
+       esac
+       ;;
+*)     dflt="$sitelib"
+       ;;
+esac
+$cat <<EOM
+
+The installation process will create a directory for
+site-specific extensions and modules.  Most users find it convenient
+to place all site-specific files in this directory rather than in the
+main distribution directory.
+
+EOM
+fn=d~+
+rp='Pathname for the site-specific library files?'
+. ./getfile
+sitelib="$ans"
+sitelibexp="$ansexp"
+sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+       installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
+else
+       installsitelib="$sitelibexp"
+fi
+
+: determine where site specific architecture-dependent libraries go.
+: sitelib  default is /usr/local/lib/perl5/site_perl/$version
+: sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
+: sitelib may have an optional trailing /share.
+case "$sitearch" in
+'')    dflt=`echo $sitelib | $sed 's,/share$,,'`
+       dflt="$dflt/$archname"
+       ;;
+*)     dflt="$sitearch"
+       ;;
+esac
+set sitearch sitearch none
+eval $prefixit
+$cat <<EOM
+
+The installation process will also create a directory for
+architecture-dependent site-specific extensions and modules.
+
+EOM
+fn=d~+
+rp='Pathname for the site-specific architecture-dependent library files?'
+. ./getfile
+sitearch="$ans"
+sitearchexp="$ansexp"
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+       installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
+else
+       installsitearch="$sitearchexp"
+fi
+
+$cat <<EOM
+
 The installation process will also create a directory for
 vendor-supplied add-ons.  Vendors who supply perl with their system
 may find it convenient to place all vendor-supplied files in this
@@ -5099,7 +5376,12 @@ EOM
 rp='Do you want to configure vendor-specific add-on directories?'
 case "$usevendorprefix" in
 define|true|[yY]*) dflt=y ;;
-*) dflt=n ;;
+*)     : User may have set vendorprefix directly on Configure command line.
+       case "$vendorprefix" in
+       ''|' ') dflt=n ;;
+       *)      dflt=y ;;
+       esac
+       ;;
 esac
 . ./myread
 case "$ans" in
@@ -5110,6 +5392,7 @@ case "$ans" in
        *)  dflt=$vendorprefix ;;
        esac
        . ./getfile
+       : XXX Prefixit unit does not yet support siteprefix and vendorprefix
        oldvendorprefix=''
        case "$vendorprefix" in
        '') ;;
@@ -5137,26 +5420,98 @@ case "$vendorprefix" in
 *)     d_vendorlib="$define"
        : determine where vendor-supplied modules go.
        : Usual default is /usr/local/lib/perl5/vendor_perl/$version
-       prog=`echo $package | $sed 's/-*[0-9.]*$//'`
-       case "$installstyle" in
-       *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
-       *)           dflt=$vendorprefix/lib/vendor_$prog/$version ;;
+       case "$vendorlib" in
+       '')
+               prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+               case "$installstyle" in
+               *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
+               *)           dflt=$vendorprefix/lib/vendor_$prog/$version ;;
+               esac
+               ;;
+       *)      dflt="$vendorlib"
+               ;;
        esac
        fn=d~+
        rp='Pathname for the vendor-supplied library files?'
        . ./getfile
        vendorlib="$ans"
        vendorlibexp="$ansexp"
-       : Change installation prefix, if necessary.
-       if $test X"$prefix" != X"$installprefix"; then
-               installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
-       else
-               installvendorlib="$vendorlibexp"
-       fi
        ;;
 esac
+vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+       installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
+else
+       installvendorlib="$vendorlibexp"
+fi
 
-: Cruising for prototypes
+case "$vendorprefix" in
+'')    d_vendorarch="$undef"
+       vendorarch=''
+       vendorarchexp=''
+       ;;
+*)     d_vendorarch="$define"
+       : determine where vendor-supplied architecture-dependent libraries go.
+       : vendorlib  default is /usr/local/lib/perl5/vendor_perl/$version
+       : vendorarch default is /usr/local/lib/perl5/vendor_perl/$version/$archname
+       : vendorlib may have an optional trailing /share.
+       case "$vendorarch" in
+       '')     dflt=`echo $vendorlib | $sed 's,/share$,,'`
+               dflt="$dflt/$archname"
+               ;;
+       *)      dflt="$vendorarch" ;;
+       esac
+       fn=d~+
+       rp='Pathname for vendor-supplied architecture-dependent files?'
+       . ./getfile
+       vendorarch="$ans"
+       vendorarchexp="$ansexp"
+       ;;
+esac
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+       installvendorarch=`echo $vendorarchexp | sed "s#^$prefix#$installprefix#"`
+else
+       installvendorarch="$vendorarchexp"
+fi
+
+: Final catch-all directories to search
+$cat <<EOM
+
+Lastly, you can have perl look in other directories for extensions and
+modules in addition to those already specified.
+These directories will be searched after 
+       $sitearch 
+       $sitelib 
+EOM
+test X"$vendorlib" != "X" && echo '    ' $vendorlib
+test X"$vendorarch" != "X" && echo '   ' $vendorarch
+echo ' '
+case "$otherlibdirs" in
+''|' ') dflt='none' ;;
+*)     dflt="$otherlibdirs" ;;
+esac
+$cat <<EOM
+Enter a colon-separated set of extra paths to include in perl's @INC
+search path, or enter 'none' for no extra paths.
+
+EOM
+
+rp='Colon-separated list of additional directories for perl to search?'
+. ./myread
+case "$ans" in
+' '|''|none)   otherlibdirs=' ' ;;     
+*)     otherlibdirs="$ans" ;;
+esac
+case "$otherlibdirs" in
+' ') val=$undef ;;
+*)     val=$define ;;
+esac
+set d_perl_otherlibdirs
+eval $setvar
+
+: Cruising for prototypes
 echo " "
 echo "Checking out function prototypes..." >&4
 $cat >prototype.c <<'EOCP'
@@ -5217,85 +5572,41 @@ else
        installbin="$binexp"
 fi
 
-$cat <<EOM
-
-After $package is installed, you may wish to install various
-add-on modules and utilities.  Typically, these add-ons will
-be installed under $prefix with the rest
-of this package.  However, you may wish to install such add-ons
-elsewhere under a different prefix.
-
-If you do not wish to put everything under a single prefix, that's
-ok.  You will be prompted for the individual locations; this siteprefix
-is only used to suggest the defaults.
-
-The default should be fine for most people.
-
-EOM
-fn=d~+
-rp='Installation prefix to use for add-on modules and utilities?'
-: XXX Here might be another good place for an installstyle setting.
-case "$siteprefix" in
-'') dflt=$prefix ;;
-*)  dflt=$siteprefix ;;
-esac
-. ./getfile
-oldsiteprefix=''
-case "$siteprefix" in
-'') ;;
-*)
-       case "$ans" in
-       "$prefix") ;;
-       *) oldsiteprefix="$prefix";;
-       esac
+: 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
+               : 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
+                       perl5=$tdir/perl
+                       break;
+               elif $test -x $tdir/perl5 && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
+                       perl5=$tdir/perl
+                       break;
+               fi
+       done
+       ;;
+*)     perl5="$perl5"
        ;;
 esac
-siteprefix="$ans"
-siteprefixexp="$ansexp"
-
-: determine where site specific libraries go.
-: Usual default is /usr/local/lib/perl5/site_perl/$version
-: The default "style" setting is made in installstyle.U
-: XXX No longer works with Prefixit stuff.
-prog=`echo $package | $sed 's/-*[0-9.]*$//'`
-case "$installstyle" in
-*lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
-*)      dflt=$siteprefix/lib/site_$prog/$version ;;
+case "$perl5" in
+'')    echo "None found.  That's ok.";;
+*)     echo "Using $perl5." ;;
 esac
-$cat <<EOM
-
-The installation process will create a directory for
-site-specific extensions and modules.  Most users find it convenient
-to place all site-specific files in this directory rather than in the
-main distribution directory.
-
-EOM
-fn=d~+
-rp='Pathname for the site-specific library files?'
-. ./getfile
-sitelib="$ans"
-sitelibexp="$ansexp"
-: Change installation prefix, if necessary.
-if $test X"$prefix" != X"$installprefix"; then
-       installsitelib=`echo $sitelibexp | sed "s#^$prefix#$installprefix#"`
-else
-       installsitelib="$sitelibexp"
-fi
 
 : Determine list of previous versions to include in @INC
 $cat > getverlist <<EOPL
-#!$perl -w
+#!$perl5 -w
 use File::Basename;
 \$api_versionstring = "$api_versionstring";
 \$version = "$version";
-\$sitelib = "$sitelib";
+\$stem = "$sitelib_stem";
 \$archname = "$archname";
 EOPL
        $cat >> getverlist <<'EOPL'
 # Can't have leading @ because metaconfig interprets it as a command!
 ;@inc_version_list=();
-$stem=dirname($sitelib);
-# Redo to do opendir/readdir? 
+# XXX Redo to do opendir/readdir? 
 if (-d $stem) {
     chdir($stem);
     ;@candidates = glob("5.*");
@@ -5313,10 +5624,10 @@ else {
 foreach $d (@candidates) {
     if ($d lt $version) {
        if ($d ge $api_versionstring) {
-           unshift(@inc_version_list, "$d/$archname", $d);
+           unshift(@inc_version_list, grep { -d } "$d/$archname", $d);
        }
        elsif ($d ge "5.005") {
-           unshift(@inc_version_list, $d);
+           unshift(@inc_version_list, grep { -d } $d);
        }
     }
     else {
@@ -5335,8 +5646,8 @@ else {
 EOPL
 chmod +x getverlist
 case "$inc_version_list" in
-'')    if test -x $perl; then
-               dflt=`$perl getverlist`
+'')    if test -x "$perl5"; then
+               dflt=`$perl5 getverlist`
        else
                dflt='none'
        fi
@@ -5344,6 +5655,9 @@ case "$inc_version_list" in
 $undef) dflt='none' ;;
 *)  dflt="$inc_version_list" ;;
 esac
+case "$dflt" in
+''|' ') dflt=none ;;
+esac
 $cat <<'EOM'
 
 In order to ease the process of upgrading, this version of perl 
@@ -5361,7 +5675,7 @@ EOM
 rp='List of earlier versions to include in @INC?'
 . ./myread
 case "$ans" in
-[Nn]one) inc_version_list=' ' ;;
+[Nn]one|''|' ') inc_version_list=' ' ;;
 *) inc_version_list="$ans" ;;
 esac
 case "$inc_version_list" in
@@ -5378,7 +5692,7 @@ $rm -f getverlist
 echo " "
 if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then
        $cat <<EOM
-Many scripts expect to perl to be installed as /usr/bin/perl.
+Many scripts expect perl to be installed as /usr/bin/perl.
 I can install the perl you are about to compile also as /usr/bin/perl
 (in addition to $installbin/perl).
 EOM
@@ -5920,7 +6234,7 @@ y*) usedl="$define"
        . ./getfile
        usedl="$define"
        : emulate basename
-       dlsrc=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@'`
+       dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
 
        $cat << EOM
 
@@ -6008,7 +6322,11 @@ EOM
     case "$lddlflags" in
     '') case "$osname" in
                        beos) dflt='-nostart' ;;
-                       hpux)  dflt='-b' ;;
+                       hpux) dflt='-b';
+                             case "$gccversion" in
+                             '') dflt="$dflt +vnocompatwarnings" ;;
+                             esac
+                             ;;        
                        linux|irix*)    dflt='-shared' ;;
                        next)  dflt='none' ;;
                        solaris) dflt='-G' ;;
@@ -6379,46 +6697,26 @@ esac
 
 : see if we can have long filenames
 echo " "
-rmlist="$rmlist /tmp/cf$$"
-$test -d /tmp/cf$$ || mkdir /tmp/cf$$
 first=123456789abcdef
-second=/tmp/cf$$/$first
-$rm -f $first $second
+$rm -f $first
 if (echo hi >$first) 2>/dev/null; then
        if $test -f 123456789abcde; then
                echo 'You cannot have filenames longer than 14 characters.  Sigh.' >&4
                val="$undef"
        else
-               if (echo hi >$second) 2>/dev/null; then
-                       if $test -f /tmp/cf$$/123456789abcde; then
-                               $cat <<'EOM'
-That's peculiar... You can have filenames longer than 14 characters, but only
-on some of the filesystems.  Maybe you are using NFS.  Anyway, to avoid problems
-I shall consider your system cannot support long filenames at all.
-EOM
-                               val="$undef"
-                       else
-                               echo 'You can have filenames longer than 14 characters.' >&4
-                               val="$define"
-                       fi
-               else
-                       $cat <<'EOM'
-How confusing! Some of your filesystems are sane enough to allow filenames
-longer than 14 characters but some others like /tmp can't even think about them.
-So, for now on, I shall assume your kernel does not allow them at all.
-EOM
-                       val="$undef"
-               fi
+               echo 'You can have filenames longer than 14 characters.'>&4
+               val="$define"
        fi
 else
        $cat <<'EOM'
-You can't have filenames longer than 14 chars.  You can't even think about them!
+You can't have filenames longer than 14 chars.
+You can't even think about them!
 EOM
        val="$undef"
 fi 
 set d_flexfnam
 eval $setvar
-$rm -rf /tmp/cf$$ 123456789abcde*
+$rm -rf 123456789abcde*
 
 : determine where library module manual pages go
 set man3dir man3dir none
@@ -6451,7 +6749,7 @@ esac
 echo "If you don't want the manual sources installed, answer 'none'."
 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
 case "$man3dir" in
-'')    dflt=`echo $man1dir | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
+'')    dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'`
        if $test -d "$privlib/man/man3"; then
                cat <<EOM >&4
 
@@ -6469,16 +6767,18 @@ EOM
                esac
     fi
        ;;
-' ') dflt=none;;
 *)     dflt="$man3dir" ;;
 esac
+case "$dflt" in
+' ') dflt=none ;;
+esac
 echo " "
 fn=dn+~
 rp="Where do the $package library man pages (source) go?"
 . ./getfile
 man3dir="$ans"
 man3direxp="$ansexp"
-case "$man1dir" in
+case "$man3dir" in
 '')    man3dir=' '
        installman3dir='';;
 esac
@@ -6923,40 +7223,10 @@ else
        installscript="$scriptdirexp"
 fi
 
-: determine where site specific architecture-dependent libraries go.
-: sitelib  default is /usr/local/lib/perl5/site_perl/$version
-: sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
-: sitelib may have an optional trailing /share.
-tdflt=`echo $sitelib | $sed 's,/share$,,'`
-tdflt="$tdflt/$archname"
-set sitearch sitearch none
-eval $prefixit
-case "$sitearch" in
-'')    dflt="$tdflt" ;;
-*)     dflt="$sitearch" ;;
-esac
-$cat <<EOM
-
-The installation process will also create a directory for
-architecture-dependent site-specific extensions and modules.
-
-EOM
-fn=nd~+
-rp='Pathname for the site-specific architecture-dependent library files?'
-. ./getfile
-sitearch="$ans"
-sitearchexp="$ansexp"
-: Change installation prefix, if necessary.
-if $test X"$prefix" != X"$installprefix"; then
-       installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
-else
-       installsitearch="$sitearchexp"
-fi
-
 : determine where add-on public executables go
 case "$sitebin" in
 '')    dflt=$siteprefix/bin ;;
-*)     dflt=$sitebin ;;
+*)     dflt=$sitebin ;;
 esac
 fn=d~
 rp='Pathname where the add-on public executables should be installed?'
@@ -6974,14 +7244,6 @@ fi
 set sqrtl d_sqrtl
 eval $inlibc
 
-cat <<EOM
-
-Perl can be built to take advantage of long doubles which
-(if available) may give more accuracy and range for floating point numbers.
-
-If this doesn't make any sense to you, just accept the default 'n'.
-EOM
-
 case "$ccflags" in
 *-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
 esac
@@ -6990,6 +7252,13 @@ case "$uselongdouble" in
 $define|true|[yY]*)    dflt='y';;
 *) dflt='n';;
 esac
+cat <<EOM
+
+Perl can be built to take advantage of long doubles which
+(if available) may give more accuracy and range for floating point numbers.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
 rp='Try to use long doubles if available?'
 . ./myread
 case "$ans" in
@@ -7023,58 +7292,19 @@ case "$uselongdouble:$d_sqrtl" in
 $define:$undef)
                $cat <<EOM >&4
 
-You requested the use of long doubles but you do not seem to have
-the mathematic functions for long doubles.  I'm disabling the use
-of long doubles.
+*** You requested the use of long doubles but you do not seem to have
+*** the mathematic functions for long doubles.  I'm disabling the use
+*** of long doubles.
+
 EOM
        uselongdouble=$undef
        ;;
 esac
 
-cat <<EOM
-
-Perl can be built to take advantage of long longs which
-(if available) may give more range for integer numbers.
-
-If this doesn't make any sense to you, just accept the default 'n'.
-EOM
-
-case "$ccflags" in
-*-DUSE_LONG_LONG*) uselonglong="$define" ;;
-esac
-
-case "$uselonglong" in
-'')    dflt='y';;
-esac
-rp='Try to use long longs if available?'
-. ./myread
-case "$ans" in
-y|Y)   val="$define"   ;;
-*)      val="$undef"   ;;
-esac
-set uselonglong
-eval $setvar
-
-case "$uselonglong" in
-true|[yY]*) uselonglong="$define" ;;
-esac
-
-case "$uselonglong" in
-$define)
-: Look for a hint-file generated 'call-back-unit'.  If the
-: user has specified that long longs should be used,
-: we may need to set or change some other defaults.
-       if $test -f uselonglong.cbu; then
-               echo "Your platform has some specific hints for long longs, using them..."
-               . ./uselonglong.cbu
-       else
-               $cat <<EOM
-(Your platform doesn't have any specific hints for long longs.)
-EOM
-       fi
-       ;;
+case "$useperlio" in
+$define|true|[yY]*)    dflt='y';;
+*) dflt='n';;
 esac
-
 cat <<EOM
 
 Previous version of $package used the standard IO mechanisms as defined
@@ -7085,12 +7315,8 @@ have sfio installed) or regular stdio.  Using PerlIO with sfio may cause
 problems with some extension modules.  Using PerlIO with stdio is safe,
 but it is slower than plain stdio and therefore is not the default.
 
-If this doesn't make any sense to you, just accept the default 'n'.
+If this doesn't make any sense to you, just accept the default '$dflt'.
 EOM
-case "$useperlio" in
-$define|true|[yY]*)    dflt='y';;
-*) dflt='n';;
-esac
 rp='Use the experimental PerlIO abstraction layer?'
 . ./myread
 case "$ans" in
@@ -7112,26 +7338,33 @@ case "$vendorprefix" in
        ;;
 *)     d_vendorbin="$define"
        : determine where vendor-supplied executables go.
-       dflt=$vendorprefix/bin
+       case "$vendorbin" in
+       '') dflt=$vendorprefix/bin ;;
+       *)      dflt="$vendorbin" ;;
+       esac
        fn=d~+
        rp='Pathname for the vendor-supplied executables directory?'
        . ./getfile
        vendorbin="$ans"
        vendorbinexp="$ansexp"
-       : Change installation prefix, if necessary.
-       if $test X"$prefix" != X"$installprefix"; then
-               installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
-       else
-               installvendorbin="$vendorbinexp"
-       fi
        ;;
 esac
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+       installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
+else
+       installvendorbin="$vendorbinexp"
+fi
+
+: see if qgcvt exists
+set qgcvt d_qgcvt
+eval $inlibc
 
 : check for length of double
 echo " "
 case "$doublesize" in
 '')
-       $echo $n "Checking to see how big your double precision numbers are...$c" >&4
+       echo "Checking to see how big your double precision numbers are..." >&4
        $cat >try.c <<'EOCP'
 #include <stdio.h>
 int main()
@@ -7143,7 +7376,7 @@ EOCP
        set try
        if eval $compile_ok; then
                doublesize=`./try`
-               $echo " $doublesize bytes." >&4
+               echo "Your double is $doublesize bytes long."
        else
                dflt='8'
                echo "(I can't seem to compile the test program.  Guessing...)"
@@ -7157,15 +7390,15 @@ $rm -f try.c try
 
 : check for long doubles
 echo " "
-$echo $n "Checking to see if your system supports long double..." $c >&4
+echo "Checking to see if you have long double..." >&4
 echo 'int main() { long double x = 7.0; }' > try.c
 set try
 if eval $compile; then
        val="$define"
-       echo " Yes, it does." >&4
+       echo "You have long double."
 else
        val="$undef"
-       echo " No, it doesn't." >&4
+       echo "You do not have long double."
 fi
 $rm try.*
 set d_longdbl
@@ -7175,7 +7408,7 @@ eval $setvar
 case "${d_longdbl}${longdblsize}" in
 $define)
        echo " "
-       $echo $n "Checking to see how big your long doubles are..." $c >&4
+       echo "Checking to see how big your long doubles are..." >&4
        $cat >try.c <<'EOCP'
 #include <stdio.h>
 int main()
@@ -7187,7 +7420,7 @@ EOCP
        set try
        if eval $compile; then
                longdblsize=`./try$exe_ext`
-               $echo " $longdblsize bytes." >&4
+               echo "Your long doubles are $longdblsize bytes long."
        else
                dflt='8'
                echo " "
@@ -7203,11 +7436,132 @@ EOCP
 esac
 $rm -f try.* try
 
+echo " "
+
+if $test X"$d_longdbl" = X"$define"; then
+
+echo "Checking how to print long doubles..." >&4
+
+if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
+       $cat >try.c <<'EOCP'
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+  double d = 123.456;
+  printf("%.3f\n", d);
+}
+EOCP
+       set try
+       if eval $compile; then
+               yyy=`./try$exe_ext`
+               case "$yyy" in
+               123.456)
+                       sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
+                       sPRIFldbl='"F"'; sPRIGldbl='"G"'; sPRIEldbl='"E"';
+                       echo "We will use %f."
+                       ;;
+               esac
+       fi
+fi
+
+if $test X"$sPRIfldbl" = X; then
+       $cat >try.c <<'EOCP'
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+  long double d = 123.456;
+  printf("%.3llf\n", d);
+}
+EOCP
+       set try
+       if eval $compile; then
+               yyy=`./try$exe_ext`
+               case "$yyy" in
+               123.456)
+                       sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
+                       sPRIFldbl='"llF"'; sPRIGldbl='"llG"'; sPRIEldbl='"llE"';
+                       echo "We will use %llf."
+                       ;;
+               esac
+       fi
+fi
+
+if $test X"$sPRIfldbl" = X; then
+       $cat >try.c <<'EOCP'
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+  long double d = 123.456;
+  printf("%.3Lf\n", d);
+}
+EOCP
+       set try
+       if eval $compile; then
+               yyy=`./try$exe_ext`
+               case "$yyy" in
+               123.456)
+                       sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
+                       sPRIFldbl='"LF"'; sPRIGldbl='"LG"'; sPRIEldbl='"LE"';
+                       echo "We will use %Lf."
+                       ;;
+               esac
+       fi
+fi
+
+if $test X"$sPRIfldbl" = X; then
+       $cat >try.c <<'EOCP'
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+  long double d = 123.456;
+  printf("%.3lf\n", d);
+}
+EOCP
+       set try
+       if eval $compile; then
+               yyy=`./try$exe_ext`
+               case "$yyy" in
+               123.456)
+                       sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
+                       sPRIFldbl='"lF"'; sPRIGldbl='"lG"'; sPRIEldbl='"lE"';
+                       echo "We will use %lf."
+                       ;;
+               esac
+       fi
+fi
+
+if $test X"$sPRIfldbl" = X; then
+       echo "Cannot figure out how to print long doubles." >&4
+fi
+
+$rm -f try try.*
+
+fi # d_longdbl
+
+case "$sPRIfldbl" in
+'')    d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef"; 
+       d_PRIFldbl="$undef"; d_PRIGldbl="$undef"; d_PRIEldbl="$undef"; 
+       ;;
+*)     d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define"; 
+       d_PRIFldbl="$define"; d_PRIGldbl="$define"; d_PRIEldbl="$define"; 
+       ;;
+esac
+
 : Check how to convert floats to strings.
 if test "X$d_Gconvert" = X; then
        echo " "
        echo "Checking for an efficient way to convert floats to strings."
-       $cat >try.c <<EOP
+       echo " " > try.c
+       case "$uselongdouble" in
+       "$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
+       esac
+       case "$d_longdbl" in
+       "$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
+       esac
+       case "$d_PRIgldbl" in
+       "$define") echo "#define HAS_PRIgldbl"    >>try.c ;;
+       esac
+       $cat >>try.c <<EOP
 #ifdef TRY_gconvert
 #define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
 char *myname = "gconvert";
@@ -7222,13 +7576,21 @@ char *myname = "qgcvt";
 #define DOUBLETYPE long double
 #endif
 #ifdef TRY_sprintf
+#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && defined(HAS_PRIgldbl)
+#define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
+#else
 #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
+#endif
 char *myname = "sprintf";
 #endif
 
 #ifndef DOUBLETYPE
+#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
+#define DOUBLETYPE long double
+#else
 #define DOUBLETYPE double
 #endif
+#endif
 
 #include <stdio.h>
 
@@ -7262,6 +7624,24 @@ int main()
        Gconvert((DOUBLETYPE)1.0, 8, 0, buf); 
        checkit("1", buf);
 
+       Gconvert((DOUBLETYPE)1.1, 8, 0, buf); 
+       checkit("1.1", buf);
+
+       Gconvert((DOUBLETYPE)1.01, 8, 0, buf); 
+       checkit("1.01", buf);
+
+       Gconvert((DOUBLETYPE)1.001, 8, 0, buf); 
+       checkit("1.001", buf);
+
+       Gconvert((DOUBLETYPE)1.0001, 8, 0, buf); 
+       checkit("1.0001", buf);
+
+       Gconvert((DOUBLETYPE)1.00001, 8, 0, buf); 
+       checkit("1.00001", buf);
+
+       Gconvert((DOUBLETYPE)1.000001, 8, 0, buf); 
+       checkit("1.000001", buf);
+
        Gconvert((DOUBLETYPE)0.0, 8, 0, buf); 
        checkit("0", buf);
 
@@ -7286,8 +7666,8 @@ EOP
        *) xxx_list='gconvert gcvt sprintf' ;;
        esac
 
-        case "$d_longdbl$uselongdouble" in
-        definedefine) xxx_list="`echo $xxx_list|sed 's/gcvt/qgcvt gcvt/'`" ;;
+        case "$d_longdbl$uselongdouble$d_qgcvt" in
+        "$define$define$define") xxx_list="`echo $xxx_list|sed 's/gcvt/qgcvt gcvt/'`" ;;
        esac
 
        for xxx_convert in $xxx_list; do
@@ -7311,121 +7691,15 @@ EOP
        gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
        gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
        qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;;
-       *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
+       *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in
+          "$define$define$define")
+             d_Gconvert="sprintf((b),\"%.*$sPRIgldbl\",(n),(x))" ;;
+          *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
+          esac
+          ;;  
        esac
 fi
 
-echo " "
-
-if $test X"$d_longdbl" = X"$define"; then
-
-echo "Checking how to print long doubles..." >&4
-
-if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
-       $cat >try.c <<'EOCP'
-#include <sys/types.h>
-#include <stdio.h>
-int main() {
-  double d = 123.456;
-  printf("%.3f\n", d);
-}
-EOCP
-       set try
-       if eval $compile; then
-               yyy=`./try$exe_ext`
-               case "$yyy" in
-               123.456)
-                       sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
-                       sPRIFldbl='"F"'; sPRIGldbl='"G"'; sPRIEldbl='"E"';
-                       echo "We will use %f."
-                       ;;
-               esac
-       fi
-fi
-
-if $test X"$sPRIfldbl" = X; then
-       $cat >try.c <<'EOCP'
-#include <sys/types.h>
-#include <stdio.h>
-int main() {
-  long double d = 123.456;
-  printf("%.3llf\n", d);
-}
-EOCP
-       set try
-       if eval $compile; then
-               yyy=`./try$exe_ext`
-               case "$yyy" in
-               123.456)
-                       sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
-                       sPRIFldbl='"llF"'; sPRIGldbl='"llG"'; sPRIEldbl='"llE"';
-                       echo "We will use %llf."
-                       ;;
-               esac
-       fi
-fi
-
-if $test X"$sPRIfldbl" = X; then
-       $cat >try.c <<'EOCP'
-#include <sys/types.h>
-#include <stdio.h>
-int main() {
-  long double d = 123.456;
-  printf("%.3Lf\n", d);
-}
-EOCP
-       set try
-       if eval $compile; then
-               yyy=`./try$exe_ext`
-               case "$yyy" in
-               123.456)
-                       sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
-                       sPRIFldbl='"LF"'; sPRIGldbl='"LG"'; sPRIEldbl='"LE"';
-                       echo "We will use %Lf."
-                       ;;
-               esac
-       fi
-fi
-
-if $test X"$sPRIfldbl" = X; then
-       $cat >try.c <<'EOCP'
-#include <sys/types.h>
-#include <stdio.h>
-int main() {
-  long double d = 123.456;
-  printf("%.3lf\n", d);
-}
-EOCP
-       set try
-       if eval $compile; then
-               yyy=`./try$exe_ext`
-               case "$yyy" in
-               123.456)
-                       sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
-                       sPRIFldbl='"lF"'; sPRIGldbl='"lG"'; sPRIEldbl='"lE"';
-                       echo "We will use %lf."
-                       ;;
-               esac
-       fi
-fi
-
-if $test X"$sPRIfldbl" = X; then
-       echo "Cannot figure out how to print long doubles." >&4
-fi
-
-$rm -f try try.*
-
-fi # d_longdbl
-
-case "$sPRIfldbl" in
-'')    d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef"; 
-       d_PRIFldbl="$undef"; d_PRIGldbl="$undef"; d_PRIEldbl="$undef"; 
-       ;;
-*)     d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define"; 
-       d_PRIFldbl="$define"; d_PRIGldbl="$define"; d_PRIEldbl="$define"; 
-       ;;
-esac
-
 : Initialize h_fcntl
 h_fcntl=false
 
@@ -8252,10 +8526,6 @@ eval $inlibc
 set endservent d_endsent
 eval $inlibc
 
-: see if endspent exists
-set endspent d_endspent
-eval $inlibc
-
 : Locate the flags for 'open()'
 echo " "
 $cat >open3.c <<'EOCP'
@@ -8394,7 +8664,8 @@ extern int errno;
 #ifdef I_UNISTD
 #include <unistd.h>
 #endif
-#ifdef $i_string
+#$i_string I_STRING
+#ifdef I_STRING
 #include <string.h>
 #else
 #include <strings.h>
@@ -8812,43 +9083,20 @@ set fpathconf d_fpathconf
 eval $inlibc
 
 
-: check for off64_t
-echo " "
-echo "Checking to see if your system supports off64_t..." >&4
-$cat >try.c <<EOCP
-#include <sys/types.h>
-#include <unistd.h>
-int main() { off64_t x = 7; }'
-EOCP
-set try
-if eval $compile; then
-       val="$define"
-       echo "Yes, it does."
-else
-       val="$undef"
-       echo "No, it doesn't."
-       case "$lseeksize" in
-       8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
-       esac
-fi
-$rm -f try.* try
-set d_off64_t
-eval $setvar
-
 : check for fpos64_t
 echo " "
-echo "Checking to see if your system supports fpos64_t..." >&4
+echo "Checking to see if you have fpos64_t..." >&4
 $cat >try.c <<EOCP
-#include <sys/stdio.h>
-int main() { fpos64_t x x = 7; }'
+#include <stdio.h>
+int main() { fpos64_t x = 7; }
 EOCP
 set try
 if eval $compile; then
        val="$define"
-       echo "Yes, it does."
+       echo "You have fpos64_t."
 else
        val="$undef"
-       echo "No, it doesn't."
+       echo "You do not have fpos64_t."
        case "$fpossize" in
        8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
        esac
@@ -8857,6 +9105,10 @@ $rm -f try.* try
 set d_fpos64_t
 eval $setvar
 
+: see if frexpl exists
+set frexpl d_frexpl
+eval $inlibc
+
 hasstruct='varname=$1; struct=$2; shift; shift;
 while $test $# -ge 2; do
        case "$1" in
@@ -8930,6 +9182,23 @@ case "$longsize" in
 8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
 esac
 
+: see if getcwd exists
+set getcwd d_getcwd
+eval $inlibc
+
+: see if getespwnam exists
+set getespwnam d_getespwnam
+eval $inlibc
+
+: see if getespwnam exists
+set getespwnam d_getespwnam
+eval $inlibc
+
+
+: see if getfsstat exists
+set getfsstat d_getfsstat
+eval $inlibc
+
 : see if getgrent exists
 set getgrent d_getgrent
 eval $inlibc
@@ -9103,6 +9372,14 @@ echo " "
 set d_getprotoprotos getprotoent $i_netdb netdb.h
 eval $hasproto
 
+: see if getprpwnam exists
+set getprpwnam d_getprpwnam
+eval $inlibc
+
+: see if getprpwnam exists
+set getprpwnam d_getprpwnam
+eval $inlibc
+
 : see if getpwent exists
 set getpwent d_getpwent
 eval $inlibc
@@ -9125,10 +9402,6 @@ echo " "
 set d_getservprotos getservent $i_netdb netdb.h
 eval $hasproto
 
-: see if getspent exists
-set getspent d_getspent
-eval $inlibc
-
 : see if getspnam exists
 set getspnam d_getspnam
 eval $inlibc
@@ -9268,6 +9541,51 @@ set d_index; eval $setvar
 set inet_aton d_inetaton
 eval $inlibc
 
+: see if inttypes.h is available
+: we want a real compile instead of Inhdr because some systems
+: have an inttypes.h which includes non-existent headers
+echo " "
+$cat >try.c <<EOCP
+#include <inttypes.h>
+int main() {
+       static int32_t foo32 = 0x12345678;
+}
+EOCP
+set try
+if eval $compile; then
+       echo "<inttypes.h> found." >&4
+       val="$define"
+else
+       echo "<inttypes.h> NOT found." >&4
+       val="$undef"
+fi
+$rm -f try.c try
+set i_inttypes
+eval $setvar
+
+: check for int64_t
+echo " "
+echo "Checking to see if you have int64_t..." >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#$i_inttypes I_INTTYPES
+#ifdef I_INTTYPES
+#include <inttypes.h>
+#endif
+int main() { int64_t x = 7; }
+EOCP
+set try
+if eval $compile; then
+       val="$define"
+       echo "You have int64_t."
+else
+       val="$undef"
+       echo "You do not have int64_t."
+fi
+$rm -f try try.*
+set d_int64_t
+eval $setvar
+
 : Look for isascii
 echo " "
 $cat >isascii.c <<'EOCP'
@@ -9293,6 +9611,14 @@ set d_isascii
 eval $setvar
 $rm -f isascii*
 
+: see if isnan exists
+set isnan d_isnan
+eval $inlibc
+
+: see if isnanl exists
+set isnanl d_isnanl
+eval $inlibc
+
 : see if killpg exists
 set killpg d_killpg
 eval $inlibc
@@ -9370,15 +9696,15 @@ eval $inlibc
 
 : check for long long
 echo " "
-$echo $n "Checking to see if your system supports long long..." $c >&4
+echo "Checking to see if you have long long..." >&4
 echo 'int main() { long long x = 7; return 0; }' > try.c
 set try
 if eval $compile; then
        val="$define"
-       echo " Yes, it does." >&4
+       echo "You have have long long."
 else
        val="$undef"
-       echo " No, it doesn't." >&4
+       echo "You do not have long long."
 fi
 $rm try.*
 set d_longlong
@@ -9388,7 +9714,7 @@ eval $setvar
 case "${d_longlong}${longlongsize}" in
 $define)
        echo " "
-       $echo $n "Checking to see how big your long longs are..." $c >&4
+       echo "Checking to see how big your long longs are..." >&4
        $cat >try.c <<'EOCP'
 #include <stdio.h>
 int main()
@@ -9400,7 +9726,7 @@ EOCP
        set try
        if eval $compile_ok; then
                longlongsize=`./try$exe_ext`
-               $echo " $longlongsize bytes." >&4
+               echo "Your long longs are $longlongsize bytes long."
        else
                dflt='8'
                echo " "
@@ -9416,10 +9742,19 @@ EOCP
 esac
 $rm -f try.* try
 
+: see if prototype for lseek is available
+echo " "
+set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
+eval $hasproto
+
 : see if lstat exists
 set lstat d_lstat
 eval $inlibc
 
+: see if madvise exists
+set madvise d_madvise
+eval $inlibc
+
 : see if mblen exists
 set mblen d_mblen
 eval $inlibc
@@ -9456,14 +9791,61 @@ eval $inlibc
 set mkdir d_mkdir
 eval $inlibc
 
+: see if mkdtemp exists
+set mkdtemp d_mkdtemp
+eval $inlibc
+
 : see if mkfifo exists
 set mkfifo d_mkfifo
 eval $inlibc
 
+: see if mkstemp exists
+set mkstemp d_mkstemp
+eval $inlibc
+
+: see if mkstemps exists
+set mkstemps d_mkstemps
+eval $inlibc
+
 : see if mktime exists
 set mktime d_mktime
 eval $inlibc
 
+: see if this is a sys/mman.h system
+set sys/mman.h i_sysmman
+eval $inhdr
+
+: see if mmap exists
+set mmap d_mmap
+eval $inlibc
+: see what shmat returns
+: default to something harmless
+mmaptype='void *'
+case "$i_sysmman$d_mmap" in
+"$define$define")
+       $cat >mmap.c <<'END'
+#include <sys/mman.h>
+void *mmap();
+END
+       if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
+               mmaptype='void *'
+       else
+               mmaptype='caddr_t'
+       fi
+       echo "and it returns ($mmaptype)." >&4
+       ;;
+esac
+
+
+
+: see if modfl exists
+set modfl d_modfl
+eval $inlibc
+
+: see if mprotect exists
+set mprotect d_mprotect
+eval $inlibc
+
 : see if msgctl exists
 set msgctl d_msgctl
 eval $inlibc
@@ -9501,69 +9883,32 @@ freebsd)
        eval $setvar
        set msgrcv d_msgrcv
        eval $setvar
-       ;;
-    esac
-    ;;
-esac
-: we could also check for sys/ipc.h ...
-if $h_msg && $test `./findhdr sys/msg.h`; then
-       echo "You have the full msg*(2) library." >&4
-       val="$define"
-else
-       echo "You don't have the full msg*(2) library." >&4
-       val="$undef"
-fi
-set d_msg
-eval $setvar
-
-: see if nice exists
-set nice d_nice
-eval $inlibc
-
-: see if inttypes.h is available
-: we want a real compile instead of Inhdr because some systems
-: have an inttypes.h which includes non-existent headers
-echo " "
-$cat >try.c <<EOCP
-#include <inttypes.h>
-int main() {
-       static int32_t foo32 = 0x12345678;
-}
-EOCP
-set try
-if eval $compile; then
-       echo "<inttypes.h> found." >&4
+       ;;
+    esac
+    ;;
+esac
+: we could also check for sys/ipc.h ...
+if $h_msg && $test `./findhdr sys/msg.h`; then
+       echo "You have the full msg*(2) library." >&4
        val="$define"
 else
-       echo "<inttypes.h> NOT found." >&4
+       echo "You don't have the full msg*(2) library." >&4
        val="$undef"
 fi
-$rm -f try.c try
-set i_inttypes
+set d_msg
 eval $setvar
 
-: check for int64_t
-echo " "
-$echo $n "Checking to see if your system supports int64_t...$c" >&4
-$cat >try.c <<EOCP
-#include <sys/types.h>
-#$i_inttypes I_INTTYPES
-#ifdef I_INTTYPES
-#include <inttypes.h>
-#endif
-int main() { int64_t x = 7; }
-EOCP
-set try
-if eval $compile; then
-       val="$define"
-       echo " Yes, it does." >&4
-else
-       val="$undef"
-       echo " No, it doesn't." >&4
-fi
-$rm -f try try.*
-set d_int64t
-eval $setvar
+: see if msync exists
+set msync d_msync
+eval $inlibc
+
+: see if munmap exists
+set munmap d_munmap
+eval $inlibc
+
+: see if nice exists
+set nice d_nice
+eval $inlibc
 
 
 echo " "
@@ -9597,7 +9942,7 @@ case "$intsize" in
         eval $setvar
         quadkind=3
         ;;
-      *) case "$d_int64t" in
+      *) case "$d_int64_t" in
          define)
            val=int64_t
            set quadtype
@@ -9616,14 +9961,10 @@ case "$intsize" in
 esac
 
 case "$quadtype" in
-'')    case "$uselonglong:$d_longlong:$longlongsize" in
-       undef:define:8)
-          echo "(You would have 'long long', but you are not using it.)" >&4 ;;
-       *) echo "Alas, no 64-bit integer types in sight." >&4 ;;
-       esac
+'')    echo "Alas, no 64-bit integer types in sight." >&4
        d_quad="$undef"
        ;;
-*)     if test X"$use64bits" = Xdefine -o X"$longsize" = X8; then
+*)     if test X"$use64bitint" = Xdefine -o X"$longsize" = X8; then
            verb="will"
        else
            verb="could"
@@ -9667,7 +10008,7 @@ $rm -f try.c try
 echo " "
 $echo "Choosing the C types to be used for Perl's internal types..." >&4
 
-case "$use64bits:$d_quad:$quadtype" in
+case "$use64bitint:$d_quad:$quadtype" in
 define:define:?*)
        ivtype="$quadtype"
        uvtype="$uquadtype"
@@ -9870,6 +10211,63 @@ esac
 
 $rm -f try.* try
 
+case "$d_nv_preserves_uv" in
+"$define") d_nv_preserves_uv_bits=`expr $uvsize \* 8` ;;
+*)     $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
+       $cat <<EOP >try.c
+#include <stdio.h>
+int main() {
+    $uvtype u = 0;
+    int     n = 8 * $uvsize;
+    int     i;
+    for (i = 0; i < n; i++) {
+      u = u << 1 | ($uvtype)1;
+      if (($uvtype)($nvtype)u != u)
+        break;
+    }
+    printf("%d\n", i);
+    exit(0);
+}
+EOP
+       set try
+       if eval $compile; then
+               d_nv_preserves_uv_bits="`./try$exe_ext`"
+       fi
+       case "$d_nv_preserves_uv_bits" in
+       [1-9]*) $echo "Your NVs can preserve $d_nv_preserves_uv_bits bits of your UVs."  2>&1 ;;
+       *)      $echo "Can't figure out how many bits your NVs preserve." 2>&1
+               d_nv_preserves_uv_bits="$undef"
+               ;;
+       esac
+       $rm -f try.* try
+       ;;
+esac
+
+
+
+: check for off64_t
+echo " "
+echo "Checking to see if you have off64_t..." >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#include <unistd.h>
+int main() { off64_t x = 7; }
+EOCP
+set try
+if eval $compile; then
+       val="$define"
+       echo "You have off64_t."
+else
+       val="$undef"
+       echo "You do not have off64_t."
+       case "$lseeksize" in
+       8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
+       esac
+fi
+$rm -f try.* try
+set d_off64_t
+eval $setvar
+
 : see if POSIX threads are available
 set pthread.h i_pthread
 eval $inhdr
@@ -10672,10 +11070,6 @@ eval $inlibc
 set setsid d_setsid
 eval $inlibc
 
-: see if setspent exists
-set setspent d_setspent
-eval $inlibc
-
 : see if setvbuf exists
 set setvbuf d_setvbuf
 eval $inlibc
@@ -11186,6 +11580,54 @@ eval $inlibc
 set strtoll d_strtoll
 eval $inlibc
 
+case "$d_longlong-$d_strtoll" in
+"$define-$define")
+       $cat <<EOM
+Checking whether your strtoll() works okay...
+EOM
+       $cat >try.c <<'EOCP'
+#include <errno.h>
+#ifdef __hpux
+#define strtoll __strtoll
+#endif
+#include <stdio.h>
+extern long long int strtoll(char *s, char **, int); 
+static int bad = 0;
+int check(char *s, long long ell, int een) {
+       long long gll;
+       errno = 0;
+       gll = strtoll(s, 0, 10);
+       if (!((gll == ell) && (errno == een)))
+               bad++;
+}
+int main() {
+       check(" 1",                                      1LL, 0);
+       check(" 0",                                      0LL, 0);
+       check("-1",                                     -1LL, 0);
+       check("-9223372036854775808", -9223372036854775808LL, 0);
+       check("-9223372036854775808", -9223372036854775808LL, 0);
+       check(" 9223372036854775807",  9223372036854775807LL, 0);
+       check("-9223372036854775808", -9223372036854775808LL, 0);
+       check(" 9223372036854775808",  9223372036854775807LL, ERANGE);
+       check("-9223372036854775809", -9223372036854775808LL, ERANGE);
+       if (!bad)
+               printf("ok\n");
+}
+EOCP
+       set try
+       if eval $compile; then
+               case "`./try`" in
+               ok) echo "Your strtoll() seems to be working okay." ;;
+               *) cat <<EOM >&4
+Your strtoll() doesn't seem to be working okay.
+EOM
+                  d_strtoll="$undef"
+                  ;;
+               esac
+       fi
+       ;;
+esac
+
 : see if strtoul exists
 set strtoul d_strtoul
 eval $inlibc
@@ -11194,6 +11636,49 @@ eval $inlibc
 set strtoull d_strtoull
 eval $inlibc
 
+case "$d_longlong-$d_strtoull" in
+"$define-$define")
+       $cat <<EOM
+Checking whether your strtoull() works okay...
+EOM
+       $cat >try.c <<'EOCP'
+#include <errno.h>
+#ifdef __hpux
+#define strtoull __strtoull
+#endif
+#include <stdio.h>
+extern unsigned long long int strtoull(char *s, char **, int); 
+static int bad = 0;
+int check(char *s, long long eull, int een) {
+       long long gull;
+       errno = 0;
+       gull = strtoull(s, 0, 10);
+       if (!((gull == eull) && (errno == een)))
+               bad++;
+}
+int main() {
+       check(" 1",                                       1LL, 0);
+       check(" 0",                                       0LL, 0);
+       check("18446744073709551615", 18446744073709551615ULL, 0);
+       check("18446744073709551616", 18446744073709551615ULL, ERANGE);
+       if (!bad)
+               printf("ok\n");
+}
+EOCP
+       set try
+       if eval $compile; then
+               case "`./try`" in
+               ok) echo "Your strtoull() seems to be working okay." ;;
+               *) cat <<EOM >&4
+Your strtoull() doesn't seem to be working okay.
+EOM
+                  d_strtoull="$undef"
+                  ;;
+               esac
+       fi
+       ;;
+esac
+
 : see if strtouq exists
 set strtouq d_strtouq
 eval $inlibc
@@ -11448,7 +11933,7 @@ case "$crosscompile" in
 esac
 
 case "$osname" in
-next|rhapsody) multiarch="$define" ;;
+next|rhapsody|darwin) multiarch="$define" ;;
 esac
 case "$multiarch" in
 ''|[nN]*) multiarch="$undef" ;;
@@ -11470,11 +11955,20 @@ EOM
 *)
        case "$alignbytes" in
        '') echo "Checking alignment constraints..." >&4
-               $cat >try.c <<'EOCP'
+               if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
+                       $cat >try.c <<'EOCP'
+typedef long double NV;
+EOCP
+               else
+                       $cat >try.c <<'EOCP'
+typedef double NV;
+EOCP
+               fi
+               $cat >>try.c <<'EOCP'
 #include <stdio.h>
 struct foobar {
        char foo;
-       double bar;
+       NV bar;
 } try_algn;
 int main()
 {
@@ -11501,6 +11995,9 @@ EOCP
 esac
 
 
+: set the base revision
+baserev=5.0
+
 : check for ordering of bytes in a long
 echo " "
 case "$crosscompile$multiarch" in
@@ -12142,9 +12639,52 @@ EOM
        $rm -f core try.core core.try.*
        case "$fflushNULL" in
        x)      $cat >&4 <<EOM
-Your fflush(NULL) works okay.
+Your fflush(NULL) works okay for output streams.
+Let's see if it clobbers input pipes...
+EOM
+# As of mid-March 2000 all versions of Solaris appear to have a stdio
+# bug that improperly flushes the input end of pipes.  So we avoid the
+# autoflush on fork/system/exec support for now. :-(
+$cat >tryp.c <<EOCP
+#include <stdio.h>
+int
+main(int argc, char **argv)
+{
+    char buf[1024];
+    int i;
+    char *bp = buf;
+    while (1) {
+        while ((i = getc(stdin)) != -1
+               && (*bp++ = i) != '\n'
+               && bp < &buf[1024])
+       /* DO NOTHING */ ;
+        *bp = '\0';
+        fprintf(stdout, "%s", buf);
+        fflush(NULL);
+        if (i == -1)
+           return 0;
+        bp = buf;
+    }
+}
+EOCP
+                fflushNULL="$define"
+                set tryp
+                if eval $compile; then
+                    $rm -f tryp.out
+                    $cat tryp.c | ./tryp$exe_ext 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.
+EOM
+                       fflushNULL="$define"
+                    else
+                       $cat >&4 <<EOM
+Ouch, fflush(NULL) clobbers input pipes!  We will not use it.
 EOM
-               fflushNULL="$define"
+                        fflushNULL="$undef"
+                    fi
+                fi
+               $rm -f core tryp.c tryp.core core.tryp.*
                ;;
        '')     $cat >&4 <<EOM
 Your fflush(NULL) isn't working (contrary to ANSI C).
@@ -12166,57 +12706,100 @@ $define|true|[yY]*)
        fflushNULL="$undef"
        ;;
 esac
-: check explicit looping only if NULL did not work
+: check explicit looping only if NULL did not work, and if the pipe
+: bug does not show up on an explicit flush too
 case "$fflushNULL" in
 "$undef")
-       : check for fflush all behaviour
-       case "$fflushall" in
-       '')     set try -DTRY_FFLUSH_ALL $output
-               if eval $compile; then
-                       $cat >&4 <<EOM
-(Now testing the other method--but note that also this may fail.)
+       $cat >tryp.c <<EOCP
+#include <stdio.h>
+int
+main(int argc, char **argv)
+{
+    char buf[1024];
+    int i;
+    char *bp = buf;
+    while (1) {
+       while ((i = getc(stdin)) != -1
+              && (*bp++ = i) != '\n'
+              && bp < &buf[1024])
+       /* DO NOTHING */ ;
+       *bp = '\0';
+       fprintf(stdout, "%s", buf);
+       fflush(stdin);
+       if (i == -1)
+           return 0;
+       bp = buf;
+    }
+}
+EOCP
+       set tryp
+       if eval $compile; then
+           $rm -f tryp.out
+           $cat tryp.c | ./tryp$exe_ext 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.
 EOM
-                       $rm -f try.out
-                       ./try$exe_ext 2>/dev/null
-                       if $test -s try.out -a "X$?" = X42; then
-                               fflushall="`$cat try.out`"
-                       fi
-               fi
-               $rm -f core try.core core.try.*
+               : now check for fflushall behaviour
                case "$fflushall" in
-               x)      $cat >&4 <<EOM
+               '')     set try -DTRY_FFLUSH_ALL $output
+                       if eval $compile; then
+                               $cat >&4 <<EOM
+(Now testing the other method--but note that this also may fail.)
+EOM
+                               $rm -f try.out
+                               ./try$exe_ext 2>/dev/null
+                               if $test -s try.out -a "X$?" = X42; then
+                                       fflushall="`$cat try.out`"
+                               fi
+                       fi
+                       $rm -f core try.core core.try.*
+                       case "$fflushall" in
+                       x)      $cat >&4 <<EOM
 Whew. Flushing explicitly all the stdio streams works.
 EOM
-                       fflushall="$define"
-                       ;;
-               '')     $cat >&4 <<EOM
+                               fflushall="$define"
+                               ;;
+                       '')     $cat >&4 <<EOM
 Sigh. Flushing explicitly all the stdio streams doesn't work.
 EOM
-                       fflushall="$undef"
-                       ;;
-               *)      $cat >&4 <<EOM
+                               fflushall="$undef"
+                               ;;
+                       *)      $cat >&4 <<EOM
 Cannot figure out whether flushing stdio streams explicitly works or not.
 I'm assuming it doesn't.
 EOM
+                               fflushall="$undef"
+                               ;;
+                       esac
+                       ;;
+               "$define"|true|[yY]*)
+                       fflushall="$define"
+                       ;;
+               *)
                        fflushall="$undef"
                        ;;
                esac
-               ;;
-       "$define"|true|[yY]*)
-               fflushall="$define"
-               ;;
-       *)
+           else
+               $cat >&4 <<EOM
+All is futile.  Even fflush(stdin) clobbers input pipes!
+EOM
                fflushall="$undef"
-               ;;
-       esac
+           fi
+       else
+           fflushall="$undef"
+       fi
+       $rm -f core tryp.c tryp.core core.tryp.*
        ;;
-*)     fflushall="$undef"      
+*)     fflushall="$undef"
        ;;
 esac
+
 case "$fflushNULL$fflushall" in
 undefundef)
        $cat <<EOM
-I cannot figure out how to flush pending stdio output.
+OK, I give up.  I cannot figure out how to flush pending stdio output.
+We won't be flushing handles at all before fork/exec/popen.
 EOM
        ;;
 esac
@@ -12277,7 +12860,7 @@ if eval $compile_ok; then
                echo "(I can't execute the test program--guessing $gidsize.)" >&4
                ;;
        *)      gidsize=$yyy
-               echo "Your $zzz size is $gidsize bytes."
+               echo "Your $zzz is $gidsize bytes long."
                ;;
        esac
 else
@@ -12814,11 +13397,20 @@ rp="What is the type of process ids on this system?"
 set pid_t pidtype int stdio.h sys/types.h
 eval $typedef_ask
 
+: Find earliest binary compatible site_perl subdirectory perl can use.
+case "$bincompat5005" in
+"$define") xs_apiversion='5.005' ;;
+*) xs_apiversion=$version ;;   # The current site_perl version.
+esac
+: Find earliest pure perl site_perl subdirectory perl can use.
+: The versioned directories started at 5.005.
+pm_apiversion='5.005'
+
 : check for length of pointer
 echo " "
 case "$ptrsize" in
 '')
-       $echo $n "Checking to see how big your pointers are...$c" >&4
+       echo "Checking to see how big your pointers are..." >&4
        if test "$voidflags" -gt 7; then
                echo '#define VOID_PTR char *' > try.c
        else
@@ -12835,7 +13427,7 @@ EOCP
        set try
        if eval $compile_ok; then
                ptrsize=`./try`
-               $echo " $ptrsize bytes." >&4
+               echo "Your pointers are $ptrsize bytes long."
        else
                dflt='4'
                echo "(I can't seem to compile the test program.  Guessing...)" >&4
@@ -13299,6 +13891,100 @@ echo $sig_name | $awk \
 }'
 $rm -f signal signal.c signal.awk signal.lst signal_cmd 
 
+echo " "
+case "$sizetype" in
+*_t) zzz="$sizetype"   ;;
+*)   zzz="filesize"    ;;
+esac
+echo "Checking the size of $zzz..." >&4 
+cat > try.c <<EOCP
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+    printf("%d\n", (int)sizeof($sizetype));
+    exit(0);
+}
+EOCP
+set try
+if eval $compile_ok; then
+       yyy=`./try`
+       case "$yyy" in
+       '')     sizesize=4
+               echo "(I can't execute the test program--guessing $sizesize.)" >&4
+               ;;
+       *)      sizesize=$yyy
+               echo "Your $zzz size is $sizesize bytes."
+               ;;
+       esac
+else
+       sizesize=4
+       echo "(I can't compile the test program--guessing $sizesize.)" >&4
+fi
+
+
+: check for socklen_t
+echo " "
+echo "Checking to see if you have socklen_t..." >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#$d_socket HAS_SOCKET
+#ifdef HAS_SOCKET
+#include <sys/socket.h>
+#endif
+int main() { socklen_t x = 16; }
+EOCP
+set try
+if eval $compile; then
+       val="$define"
+       echo "You have socklen_t."
+else
+       val="$undef"
+       echo "You do not have socklen_t."
+       case "$sizetype" in
+       size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
+       esac
+fi
+$rm -f try try.*
+set d_socklen_t
+eval $setvar
+
+: check for type of the size argument to socket calls
+case "$d_socket" in
+"$define")
+       $cat <<EOM
+
+Checking to see what type is the last argument of accept().
+EOM
+       hdrs="$define sys/types.h $d_socket sys/socket.h" 
+       yyy=''
+       case "$d_socklen_t" in
+       "$define") yyy="$yyy socklen_t"
+       esac
+       yyy="$yyy $sizetype int long unsigned"
+       for xxx in $yyy; do
+               case "$socksizetype" in
+               '')     try="extern int accept(int, struct sockaddr *, $xxx *);"
+                       if ./protochk "$try" $hdrs; then
+                               echo "Your system accepts '$xxx *' for the last argument of accept()."
+                               socksizetype="$xxx"
+                       fi
+                       ;;
+               esac
+       done
+: In case none of those worked, prompt the user.
+       case "$socksizetype" in
+       '')     rp='What is the type for socket address structure sizes?'
+               dflt='int'
+               . ./myread
+               socksizetype=$ans
+               ;;
+       esac
+       ;;
+*)     : no sockets, so pick relatively harmless default
+       socksizetype='int'
+       ;;
+esac
+
 : see what type is used for signed size_t
 set ssize_t ssizetype int stdio.h sys/types.h
 eval $typedef
@@ -13414,7 +14100,7 @@ if eval $compile_ok; then
                echo "(I can't execute the test program--guessing $uidsize.)" >&4
                ;;
        *)      uidsize=$yyy
-               echo "Your $zzz size is $uidsize bytes."
+               echo "Your $zzz is $uidsize bytes long."
                ;;
        esac
 else
@@ -13585,6 +14271,10 @@ eval $setvar
 set iconv.h i_iconv
 eval $inhdr
 
+: see if this is a ieeefp.h system
+set ieeefp.h i_ieeefp
+eval $inhdr
+
 : see if locale.h is available
 set locale.h i_locale
 eval $inhdr
@@ -13664,6 +14354,14 @@ eval $inhdr
 set poll.h i_poll
 eval $inhdr
 
+: see if this is a prot.h system
+set prot.h i_prot
+eval $inhdr
+
+: see if this is a prot.h system
+set prot.h i_prot
+eval $inhdr
+
 echo " "
 $echo "Guessing which symbols your C compiler and preprocessor define..." >&4 
 $cat <<'EOSH' > Cppsym.know
@@ -13769,13 +14467,11 @@ cat <<'EOSH' >> Cppsym.try
 echo '}' >> try.c
 EOSH
 cat <<EOSH >> Cppsym.try
-cc="$cc"
-optimize="$optimize"
 ccflags="$ccflags"
-ldflags="$ldflags"
-libs="$libs"
-exe_ext="$exe_ext"
-$cc $optimize $ccflags $ldflags -o try$exe_ext try.c $libs && ./try$exe_ext
+case "$osname-$gccversion" in
+irix-) ccflags="\$ccflags -woff 1178" ;;
+esac
+$cc $optimize \$ccflags $ldflags -o try try.c $libs && ./try$exe_ext
 EOSH
 chmod +x Cppsym.try
 $eunicefix Cppsym.try
@@ -14022,6 +14718,10 @@ $rm -f varargs*
 set stddef.h i_stddef
 eval $inhdr
 
+: see if this is a sunmath.h system
+set sunmath.h i_sunmath
+eval $inhdr
+
 : see if sys/access.h is available
 set sys/access.h i_sysaccess
 eval $inhdr
 set i_sysioctl
 eval $setvar
 
+
+: see if this is a syslog.h system
+set syslog.h i_syslog
+eval $inhdr
+
+
+: see if this is a sys/mode.h system
+set sys/mode.h i_sysmode
+eval $inhdr
+
 : see if sys/resource.h has to be included
 set sys/resource.h i_sysresrc
 eval $inhdr
@@ -14067,6 +14777,11 @@ eval $inhdr
 set sys/un.h i_sysun
 eval $inhdr
 
+
+: see if this is a sys/utsname.h system
+set sys/utsname.h i_sysutsname
+eval $inhdr
+
 : see if this is a syswait system
 set sys/wait.h i_syswait
 eval $inhdr
@@ -14177,12 +14892,30 @@ for xxx in $known_extensions ; do
                ;;
        NDBM_File|ndbm_fil)
                case "$i_ndbm" in
-               $define) avail_ext="$avail_ext $xxx" ;;
+               $define)
+                   case "$osname-$use64bitint" in
+                   hpux-define)
+                       case "$libs" in
+                       *-lndbm*) avail_ext="$avail_ext $xxx" ;;
+                       esac
+                       ;;
+                   *) avail_ext="$avail_ext $xxx" ;;
+                   esac
+                   ;;
                esac
                ;;
        ODBM_File|odbm_fil) 
                case "${i_dbm}${i_rpcsvcdbm}" in
-               *"${define}"*) avail_ext="$avail_ext $xxx" ;;
+               *"${define}"*)
+                   case "$osname-$use64bitint" in
+                   hpux-define)
+                       case "$libs" in
+                       *-ldbm*) avail_ext="$avail_ext $xxx" ;;
+                       esac
+                       ;;
+                   *) avail_ext="$avail_ext $xxx" ;;
+                   esac
+                   ;;
                esac
                ;;
        POSIX|posix)
@@ -14537,7 +15270,6 @@ d_endnent='$d_endnent'
 d_endpent='$d_endpent'
 d_endpwent='$d_endpwent'
 d_endsent='$d_endsent'
-d_endspent='$d_endspent'
 d_eofnblk='$d_eofnblk'
 d_eunice='$d_eunice'
 d_fchmod='$d_fchmod'
@@ -14552,6 +15284,7 @@ d_flock='$d_flock'
 d_fork='$d_fork'
 d_fpathconf='$d_fpathconf'
 d_fpos64_t='$d_fpos64_t'
+d_frexpl='$d_frexpl'
 d_fs_data_s='$d_fs_data_s'
 d_fseeko='$d_fseeko'
 d_fsetpos='$d_fsetpos'
@@ -14559,6 +15292,9 @@ d_fstatfs='$d_fstatfs'
 d_fstatvfs='$d_fstatvfs'
 d_ftello='$d_ftello'
 d_ftime='$d_ftime'
+d_getcwd='$d_getcwd'
+d_getespwnam='$d_getespwnam'
+d_getfsstat='$d_getfsstat'
 d_getgrent='$d_getgrent'
 d_getgrps='$d_getgrps'
 d_gethbyaddr='$d_gethbyaddr'
@@ -14582,12 +15318,12 @@ d_getpgrp='$d_getpgrp'
 d_getppid='$d_getppid'
 d_getprior='$d_getprior'
 d_getprotoprotos='$d_getprotoprotos'
+d_getprpwnam='$d_getprpwnam'
 d_getpwent='$d_getpwent'
 d_getsbyname='$d_getsbyname'
 d_getsbyport='$d_getsbyport'
 d_getsent='$d_getsent'
 d_getservprotos='$d_getservprotos'
-d_getspent='$d_getspent'
 d_getspnam='$d_getspnam'
 d_gettimeod='$d_gettimeod'
 d_gnulibc='$d_gnulibc'
@@ -14597,8 +15333,10 @@ d_htonl='$d_htonl'
 d_iconv='$d_iconv'
 d_index='$d_index'
 d_inetaton='$d_inetaton'
-d_int64t='$d_int64t'
+d_int64_t='$d_int64_t'
 d_isascii='$d_isascii'
+d_isnan='$d_isnan'
+d_isnanl='$d_isnanl'
 d_killpg='$d_killpg'
 d_lchown='$d_lchown'
 d_ldbl_dig='$d_ldbl_dig'
@@ -14607,7 +15345,9 @@ d_locconv='$d_locconv'
 d_lockf='$d_lockf'
 d_longdbl='$d_longdbl'
 d_longlong='$d_longlong'
+d_lseekproto='$d_lseekproto'
 d_lstat='$d_lstat'
+d_madvise='$d_madvise'
 d_mblen='$d_mblen'
 d_mbstowcs='$d_mbstowcs'
 d_mbtowc='$d_mbtowc'
@@ -14617,8 +15357,14 @@ d_memcpy='$d_memcpy'
 d_memmove='$d_memmove'
 d_memset='$d_memset'
 d_mkdir='$d_mkdir'
+d_mkdtemp='$d_mkdtemp'
 d_mkfifo='$d_mkfifo'
+d_mkstemp='$d_mkstemp'
+d_mkstemps='$d_mkstemps'
 d_mktime='$d_mktime'
+d_mmap='$d_mmap'
+d_modfl='$d_modfl'
+d_mprotect='$d_mprotect'
 d_msg='$d_msg'
 d_msg_ctrunc='$d_msg_ctrunc'
 d_msg_dontroute='$d_msg_dontroute'
@@ -14629,9 +15375,12 @@ d_msgctl='$d_msgctl'
 d_msgget='$d_msgget'
 d_msgrcv='$d_msgrcv'
 d_msgsnd='$d_msgsnd'
+d_msync='$d_msync'
+d_munmap='$d_munmap'
 d_mymalloc='$d_mymalloc'
 d_nice='$d_nice'
 d_nv_preserves_uv='$d_nv_preserves_uv'
+d_nv_preserves_uv_bits='$d_nv_preserves_uv_bits'
 d_off64_t='$d_off64_t'
 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
 d_oldpthreads='$d_oldpthreads'
@@ -14639,6 +15388,7 @@ d_oldsock='$d_oldsock'
 d_open3='$d_open3'
 d_pathconf='$d_pathconf'
 d_pause='$d_pause'
+d_perl_otherlibdirs='$d_perl_otherlibdirs'
 d_phostname='$d_phostname'
 d_pipe='$d_pipe'
 d_poll='$d_poll'
@@ -14652,6 +15402,7 @@ d_pwexpire='$d_pwexpire'
 d_pwgecos='$d_pwgecos'
 d_pwpasswd='$d_pwpasswd'
 d_pwquota='$d_pwquota'
+d_qgcvt='$d_qgcvt'
 d_quad='$d_quad'
 d_readdir='$d_readdir'
 d_readlink='$d_readlink'
@@ -14693,7 +15444,6 @@ d_setrgid='$d_setrgid'
 d_setruid='$d_setruid'
 d_setsent='$d_setsent'
 d_setsid='$d_setsid'
-d_setspent='$d_setspent'
 d_setvbuf='$d_setvbuf'
 d_sfio='$d_sfio'
 d_shm='$d_shm'
@@ -14705,6 +15455,7 @@ d_shmget='$d_shmget'
 d_sigaction='$d_sigaction'
 d_sigsetjmp='$d_sigsetjmp'
 d_socket='$d_socket'
+d_socklen_t='$d_socklen_t'
 d_sockpair='$d_sockpair'
 d_sqrtl='$d_sqrtl'
 d_statblks='$d_statblks'
@@ -14748,6 +15499,7 @@ d_umask='$d_umask'
 d_uname='$d_uname'
 d_union_semun='$d_union_semun'
 d_ustat='$d_ustat'
+d_vendorarch='$d_vendorarch'
 d_vendorbin='$d_vendorbin'
 d_vendorlib='$d_vendorlib'
 d_vfork='$d_vfork'
@@ -14826,6 +15578,7 @@ i_float='$i_float'
 i_gdbm='$i_gdbm'
 i_grp='$i_grp'
 i_iconv='$i_iconv'
+i_ieeefp='$i_ieeefp'
 i_inttypes='$i_inttypes'
 i_limits='$i_limits'
 i_locale='$i_locale'
@@ -14840,6 +15593,7 @@ i_neterrno='$i_neterrno'
 i_netinettcp='$i_netinettcp'
 i_niin='$i_niin'
 i_poll='$i_poll'
+i_prot='$i_prot'
 i_pthread='$i_pthread'
 i_pwd='$i_pwd'
 i_rpcsvcdbm='$i_rpcsvcdbm'
@@ -14851,12 +15605,16 @@ i_stdarg='$i_stdarg'
 i_stddef='$i_stddef'
 i_stdlib='$i_stdlib'
 i_string='$i_string'
+i_sunmath='$i_sunmath'
 i_sysaccess='$i_sysaccess'
 i_sysdir='$i_sysdir'
 i_sysfile='$i_sysfile'
 i_sysfilio='$i_sysfilio'
 i_sysin='$i_sysin'
 i_sysioctl='$i_sysioctl'
+i_syslog='$i_syslog'
+i_sysmman='$i_sysmman'
+i_sysmode='$i_sysmode'
 i_sysmount='$i_sysmount'
 i_sysndir='$i_sysndir'
 i_sysparam='$i_sysparam'
@@ -14873,6 +15631,7 @@ i_systimes='$i_systimes'
 i_systypes='$i_systypes'
 i_sysuio='$i_sysuio'
 i_sysun='$i_sysun'
+i_sysutsname='$i_sysutsname'
 i_sysvfs='$i_sysvfs'
 i_syswait='$i_syswait'
 i_termio='$i_termio'
@@ -14903,6 +15662,7 @@ installsitebin='$installsitebin'
 installsitelib='$installsitelib'
 installstyle='$installstyle'
 installusrbinperl='$installusrbinperl'
+installvendorarch='$installvendorarch'
 installvendorbin='$installvendorbin'
 installvendorlib='$installvendorlib'
 intsize='$intsize'
@@ -14925,6 +15685,7 @@ libs='$libs'
 libsdirs='$libsdirs'
 libsfiles='$libsfiles'
 libsfound='$libsfound'
+libspath='$libspath'
 libswanted='$libswanted'
 line='$line'
 lint='$lint'
@@ -14957,6 +15718,7 @@ man3ext='$man3ext'
 medium='$medium'
 mips_type='$mips_type'
 mkdir='$mkdir'
+mmaptype='$mmaptype'
 models='$models'
 modetype='$modetype'
 more='$more'
@@ -14985,11 +15747,13 @@ optimize='$optimize'
 orderlib='$orderlib'
 osname='$osname'
 osvers='$osvers'
+otherlibdirs='$otherlibdirs'
 package='$package'
 pager='$pager'
 passcat='$passcat'
 patchlevel='$patchlevel'
 path_sep='$path_sep'
+perl5='$perl5'
 perl='$perl'
 perladmin='$perladmin'
 perlpath='$perlpath'
@@ -14997,6 +15761,7 @@ pg='$pg'
 phostname='$phostname'
 pidtype='$pidtype'
 plibpth='$plibpth'
+pm_apiversion='$pm_apiversion'
 pmake='$pmake'
 pr='$pr'
 prefix='$prefix'
@@ -15012,6 +15777,7 @@ randfunc='$randfunc'
 randseedtype='$randseedtype'
 ranlib='$ranlib'
 rd_nodata='$rd_nodata'
+revision='$revision'
 rm='$rm'
 rmail='$rmail'
 runnm='$runnm'
@@ -15053,9 +15819,11 @@ sitearchexp='$sitearchexp'
 sitebin='$sitebin'
 sitebinexp='$sitebinexp'
 sitelib='$sitelib'
+sitelib_stem='$sitelib_stem'
 sitelibexp='$sitelibexp'
 siteprefix='$siteprefix'
 siteprefixexp='$siteprefixexp'
+sizesize='$sizesize'
 sizetype='$sizetype'
 sleep='$sleep'
 smail='$smail'
@@ -15063,6 +15831,7 @@ small='$small'
 so='$so'
 sockethdr='$sockethdr'
 socketlib='$socketlib'
+socksizetype='$socksizetype'
 sort='$sort'
 spackage='$spackage'
 spitshell='$spitshell'
@@ -15110,12 +15879,12 @@ uname='$uname'
 uniq='$uniq'
 uquadtype='$uquadtype'
 use5005threads='$use5005threads'
-use64bits='$use64bits'
+use64bitall='$use64bitall'
+use64bitint='$use64bitint'
 usedl='$usedl'
 useithreads='$useithreads'
 uselargefiles='$uselargefiles'
 uselongdouble='$uselongdouble'
-uselonglong='$uselonglong'
 usemorebits='$usemorebits'
 usemultiplicity='$usemultiplicity'
 usemymalloc='$usemymalloc'
@@ -15136,9 +15905,12 @@ uvsize='$uvsize'
 uvtype='$uvtype'
 uvuformat='$uvuformat'
 uvxformat='$uvxformat'
+vendorarch='$vendorarch'
+vendorarchexp='$vendorarchexp'
 vendorbin='$vendorbin'
 vendorbinexp='$vendorbinexp'
 vendorlib='$vendorlib'
+vendorlib_stem='$vendorlib_stem'
 vendorlibexp='$vendorlibexp'
 vendorprefix='$vendorprefix'
 vendorprefixexp='$vendorprefixexp'
@@ -15146,6 +15918,7 @@ version='$version'
 vi='$vi'
 voidflags='$voidflags'
 xlibpth='$xlibpth'
+xs_apiversion='$xs_apiversion'
 zcat='$zcat'
 zip='$zip'
 EOT