add README.Y2K (from Dominic Dunlop <domo@vo.lu>)
[p5sagit/p5-mst-13.2.git] / Configure
index 2d310f4..0d497fd 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 Sat Aug  7 00:11:31 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Fri Sep 17 12:06:13 EET DST 1999 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
@@ -399,6 +399,7 @@ d_inetaton=''
 d_isascii=''
 d_killpg=''
 d_lchown=''
+d_ldbl_dig=''
 d_link=''
 d_locconv=''
 d_lockf=''
@@ -565,13 +566,6 @@ d_waitpid=''
 d_wcstombs=''
 d_wctomb=''
 d_writev=''
-d_dbmclose64=''
-d_dbminit64=''
-d_delete64=''
-d_fetch64=''
-d_firstkey64=''
-d_nextkey64=''
-d_store64=''
 dlext=''
 cccdlflags=''
 ccdlflags=''
@@ -681,24 +675,9 @@ installusrbinperl=''
 intsize=''
 longsize=''
 shortsize=''
-d_dirent64_s=''
-d_flock64_s=''
-d_fstat64=''
-d_ftruncate64=''
-d_ino64_t=''
+d_fpos64_t=''
 d_llseek=''
-d_lockf64=''
-d_lseek64=''
-d_lstat64=''
 d_off64_t=''
-d_offset_t=''
-d_open64=''
-d_opendir64=''
-d_readdir64=''
-d_seekdir64=''
-d_stat64=''
-d_telldir64=''
-d_truncate64=''
 libc=''
 ldlibpthname=''
 libperl=''
@@ -830,15 +809,6 @@ ssizetype=''
 startperl=''
 startsh=''
 stdchar=''
-d_fgetpos64=''
-d_fopen64=''
-d_freopen64=''
-d_fseek64=''
-d_fseeko64=''
-d_fsetpos64=''
-d_ftell64=''
-d_ftello64=''
-d_tmpfile64=''
 d_stdio_stream_array=''
 stdio_stream_array=''
 d_strtoull=''
@@ -847,6 +817,7 @@ trnl=''
 uidtype=''
 archname64=''
 use64bits=''
+uselongdouble=''
 usemultiplicity=''
 nm_opt=''
 nm_so_opt=''
@@ -999,7 +970,7 @@ useopcode=true
 : 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="$libswanted dld ld sun m rt c cposix posix"
+libswanted="$libswanted dld ld sun m c cposix posix"
 libswanted="$libswanted ndir dir crypt sec"
 libswanted="$libswanted ucb bsd BSD PW x"
 : We probably want to search /usr/shlib before most other libraries.
@@ -1130,7 +1101,7 @@ done
 : produce awk script to parse command line options
 cat >options.awk <<'EOF'
 BEGIN {
-       optstr = "dD:eEf:hKOrsSU:V";    # getopt-style specification
+       optstr = "A:dD:eEf:hKOrsSU:V";  # getopt-style specification
 
        len = length(optstr);
        for (i = 1; i <= len; i++) {
@@ -1190,7 +1161,7 @@ silent=''
 extractsh=''
 override=''
 knowitall=''
-rm -f optdef.sh
+rm -f optdef.sh posthint.sh
 cat >optdef.sh <<EOS
 $startsh
 EOS
@@ -1244,6 +1215,57 @@ while test $# -gt 0; do
                esac
                shift
                ;;
+       -A)
+           shift
+           xxx=''
+           yyy="$1"
+           case "$yyy" in
+           *:*) xxx=`echo $yyy|sed 's!:.*!!'`
+                yyy=`echo $yyy|sed 's!^[^:]*:!!'`
+                ;;
+           esac
+           case "$xxx" in
+           '') xxx=define ;;
+           esac
+           zzz=''
+           uuu='undef'
+           case "$yyy" in
+           *=*) zzz=`echo $yyy|sed 's!^[^=]*=!!'`
+                yyy=`echo $yyy|sed 's!=.*!!'`
+                case "$yyy:$zzz" in
+                undef:) uuu='' ;;
+                esac
+                ;;
+           esac
+           case "$xxx" in
+           append)
+               echo "$yyy=\"\${$yyy}$zzz\""    >> posthint.sh
+               ;;
+           clear)
+               echo "$yyy=''"                  >> posthint.sh
+               ;;
+           define)
+               case "$zzz" in
+               '') zzz=define ;;
+               esac
+               echo "$yyy='$zzz'"              >> posthint.sh
+               ;; 
+           eval)
+               echo "eval \"$yyy=$zzz\""       >> posthint.sh
+               ;; 
+           prepend)
+               echo "$yyy=\"$zzz\${$yyy}\""    >> posthint.sh
+               ;; 
+           undef)
+               case "$zzz" in
+               '') zzz="$uuu" ;;
+               esac
+               echo "$yyy=$zzz"                >> posthint.sh
+               ;; 
+            *)  echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2
+               ;;
+           esac
+           ;;
        -V) echo "$me generated by metaconfig 3.0 PL70." >&2
                exit 0;;
        --) break;;
@@ -1256,7 +1278,7 @@ case "$error" in
 true)
        cat >&2 <<EOM
 Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
-                 [-U symbol] [-U symbol=]
+                 [-U symbol] [-U symbol=] [-A command:symbol...]
   -d : use defaults for all answers.
   -e : go on without questioning past the production of config.sh.
   -f : specify an alternate default configuration file.
@@ -1273,6 +1295,16 @@ Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
   -U : undefine symbol:
          -U symbol    symbol gets the value 'undef'
          -U symbol=   symbol gets completely empty
+  -A : manipulate symbol after the platform specific hints have been applied:
+        -A append:symbol=value         append value to symbol
+        -A define:symbol=value         define symbol to have value
+        -A symbol=value                define symbol to have value
+         -A clear:symbol               define symbol to be ''
+        -A define:symbol               define symbol to be 'define'
+        -A eval:symbol=value           define symbol to be eval of value
+        -A prepend:symbol=value        prepend value to symbol
+        -A undef:symbol                define symbol to be 'undef'
+        -A undef:symbol=               define symbol to be ''
   -V : print version number and exit (with a zero status).
 EOM
        exit 1
@@ -1298,6 +1330,9 @@ esac
 : run the defines and the undefines, if any, but leave the file out there...
 touch optdef.sh
 . ./optdef.sh
+: create the posthint manipulation script and leave the file out there...
+touch posthint.sh
+. ./posthint.sh
 
 : set package name
 package=perl5
@@ -2525,6 +2560,9 @@ none)  osvers='' ;;
 *) osvers="$ans" ;;
 esac
 
+
+. ./posthint.sh
+
 : who configured the system
 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
 cf_by=`(logname) 2>/dev/null`
@@ -3572,7 +3610,7 @@ privlib="$ans"
 privlibexp="$ansexp"
 : Change installation prefix, if necessary.
 if $test X"$prefix" != X"$installprefix"; then
-       installprivlib=`echo $privlibexp | sed 's#^$prefix#$installprefix#'`
+       installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
 else
        installprivlib="$privlibexp"
 fi
@@ -3617,7 +3655,7 @@ else
 fi
 : Change installation prefix, if necessary.
 if $test X"$prefix" != X"$installprefix"; then
-       installarchlib=`echo $archlibexp | sed 's#^$prefix#$installprefix#'`
+       installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
 else
        installarchlib="$archlibexp"
 fi
@@ -3827,7 +3865,13 @@ ABC.XYZ
 EOT
 cd ..
 if test ! -f cppstdin; then
-       echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+       if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
+               # AIX cc -E doesn't show the absolute headerfile
+               # locations but we'll cheat by using the -M flag.
+               echo 'cat >.$$.c; rm -f .$$.u; '"$cc"' ${1+"$@"} -M -c .$$.c 2>/dev/null; test -s .$$.u && awk '"'"'$2 ~ /\.h$/ { print "# 0 \""$2"\"" }'"'"' .$$.u; rm -f .$$.o .$$.u; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' > cppstdin
+       else
+               echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+       fi
 else
        echo "Keeping your $hint cppstdin wrapper."
 fi
@@ -4174,7 +4218,7 @@ none) libs=' ';;
 *) libs="$ans";;
 esac
 
-: determine optimize, if desired, or use for debug flag also
+: determine optimization, if desired, or use for debug flag also
 case "$optimize" in
 ' '|$undef) dflt='none';;
 '') dflt='-O';;
@@ -4182,11 +4226,10 @@ case "$optimize" in
 esac
 $cat <<EOH
 
-Some C compilers have problems with their optimizers.  By default, $package
-compiles with the -O flag to use the optimizer.  Alternately, you might want
-to use the symbolic debugger, which uses the -g flag (on traditional Unix
-systems).  Either flag can be specified here.  To use neither flag, specify
-the word "none".
+By default, $package compiles with the -O flag to use the optimizer.
+Alternately, you might want to use the symbolic debugger, which uses
+the -g flag (on traditional Unix systems).  Either flag can be
+specified here.  To use neither flag, specify the word "none".
 
 EOH
 rp="What optimizer/debugger flag should be used?"
@@ -4200,7 +4243,7 @@ dflt=''
 : We will not override a previous value, but we might want to
 : augment a hint file
 case "$hint" in
-none|recommended)
+default|recommended)
        case "$gccversion" in
        1*) dflt='-fpcc-struct-return' ;;
        esac
@@ -4215,6 +4258,25 @@ none|recommended)
                fi
                ;;
        esac
+       case "$gccversion" in
+       1*) ;;
+       2.[0-8]*) ;;
+       *)      echo " "
+               echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
+               echo 'int main(void) { return 0; }' > gcctest.c
+               if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
+                       echo "Yes, it does." 2>&1
+                       case "$ccflags" in
+                       *strict-aliasing*) 
+                               echo "Leaving current flags $ccflags alone." 2>&1
+                               ;;
+                       *) dflt="$dflt -fno-strict-aliasing" ;;
+                       esac
+               else
+                       echo "Nope, it doesn't, but that's ok." 2>&1
+               fi
+               ;;
+       esac
        ;;
 esac
 
@@ -4256,7 +4318,7 @@ $define)
 esac
 
 case "$hint" in
-none|recommended) dflt="$ccflags $dflt" ;;
+default|recommended) dflt="$ccflags $dflt" ;;
 *) dflt="$ccflags";;
 esac
 
@@ -4721,7 +4783,7 @@ case "$vendorprefix" in
        vendorlibexp="$ansexp"
        : Change installation prefix, if necessary.
        if $test X"$prefix" != X"$installprefix"; then
-               installvendorlib=`echo $vendorlibexp | $sed 's#^$prefix#$installprefix#'`
+               installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
        else
                installvendorlib="$vendorlibexp"
        fi
@@ -4784,7 +4846,7 @@ binexp="$ansexp"
 : Change installation prefix, if necessary.
 : XXX Bug? -- ignores Configure -Dinstallprefix setting.
 if $test X"$prefix" != X"$installprefix"; then
-       installbin=`echo $binexp | sed 's#^$prefix#$installprefix#'`
+       installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
 else
        installbin="$binexp"
 fi
@@ -5766,7 +5828,7 @@ esac
 
 : Change installation prefix, if necessary.
 if $test X"$prefix" != X"$installprefix"; then
-       installman1dir=`echo $man1direxp | $sed 's#^$prefix#$installprefix#'`
+       installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
 else
        installman1dir="$man1direxp"
 fi
@@ -5909,7 +5971,7 @@ esac
 
 : Change installation prefix, if necessary.
 if $test X"$prefix" != X"$installprefix"; then
-       installman3dir=`echo $man3direxp | $sed 's#^$prefix#$installprefix#'`
+       installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
 else
        installman3dir="$man3direxp"
 fi
@@ -6341,7 +6403,7 @@ scriptdir="$ans"
 scriptdirexp="$ansexp"
 : Change installation prefix, if necessary.
 if $test X"$prefix" != X"$installprefix"; then
-       installscript=`echo $scriptdirexp | sed 's#^$prefix#$installprefix#'`
+       installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
 else
        installscript="$scriptdirexp"
 fi
@@ -6406,7 +6468,7 @@ sitelib="$ans"
 sitelibexp="$ansexp"
 : Change installation prefix, if necessary.
 if $test X"$prefix" != X"$installprefix"; then
-       installsitelib=`echo $sitelibexp | sed 's#^$prefix#$installprefix#'`
+       installsitelib=`echo $sitelibexp | sed "s#^$prefix#$installprefix#"`
 else
        installsitelib="$sitelibexp"
 fi
@@ -6436,13 +6498,50 @@ sitearch="$ans"
 sitearchexp="$ansexp"
 : Change installation prefix, if necessary.
 if $test X"$prefix" != X"$installprefix"; then
-       installsitearch=`echo $sitearchexp | sed 's#^$prefix#$installprefix#'`
+       installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
 else
        installsitearch="$sitearchexp"
 fi
 
 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.  To do so, Configure must be run with -Duselongdouble.
+
+If this doesn't make any sense to you, just accept the default 'n'.
+EOM
+case "$uselongdouble" in
+$define|true|[yY]*)    dflt='y';;
+*) dflt='n';;
+esac
+rp='Try to use long doubles if available?'
+. ./myread
+case "$ans" in
+y|Y)   val="$define"   ;;
+*)      val="$undef"   ;;
+esac
+set uselongdouble
+eval $setvar
+
+case "$uselongdouble" in
+"$define"|true|[yY]*)
+: Look for a hint-file generated 'call-back-unit'.  If the
+: user has specified that long doubles should be used,
+: we may need to set or change some other defaults.
+       if $test -f uselongdouble.cbu; then
+               echo "Your platform has some specific hints for long doubles, using them..."
+               . ./uselongdouble.cbu
+       else
+               $cat <<EOM
+(Your platform doesn't have any specific hints for long doubles.)
+EOM
+       fi
+       ;;
+esac
+
+cat <<EOM
+
 Previous version of $package used the standard IO mechanisms as defined
 in <stdio.h>.  Versions 5.003_02 and later of perl allow alternate IO
 mechanisms via a "PerlIO" abstraction, but the stdio mechanism is still
@@ -6896,7 +6995,7 @@ $rm -f try.c try
 
 : check for long doubles
 echo " "
-echo $n "Checking to see if your system supports long doubles...$c" >&4
+echo $n "Checking to see if your system supports long double...$c" >&4
 echo 'long double foo() { long double x; x = 7.0; return x; }' > try.c
 if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
        val="$define"
@@ -6991,10 +7090,6 @@ EOCP
 fi
 
 if $test X"$sPRIfldbl" = X; then
-       echo "Cannot figure out how to print long doubles." >&4
-fi
-
-if $test X"$sPRIfldbl" = X; then
        $cat >try.c <<'EOCP'
 #include <sys/types.h>
 #include <stdio.h>
@@ -7038,6 +7133,10 @@ EOCP
        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
@@ -7773,52 +7872,10 @@ $rm -f dbl_dig.?
 set d_dbl_dig
 eval $setvar
 
-
-if $test X"$use64bits" = X"$define"; then
-       : see if dbminit64 exists
-       set dbminit64 d_dbminit64
-       eval $inlibc
-
-       : see if dbmclose64 exists
-       set dbmclose64 d_dbmclose64
-       eval $inlibc
-
-       : see if fetch64 exists
-       set fetch64 d_fetch64
-       eval $inlibc
-
-       : see if store64 exists
-       set store64 d_store64
-       eval $inlibc
-
-       : see if delete64 exists
-       set delete64 d_delete64
-       eval $inlibc
-
-       : see if firstkey64 exists
-       set firstkey64 d_firstkey64
-       eval $inlibc
-
-       : see if nextkey64 exists
-       set nextkey64 d_nextkey64
-       eval $inlibc
-else
-       val="$undef"
-       for xxx in d_dbminit64 d_dbmclose64 d_fetch64 d_store64 d_delete64 d_firstkey64 d_nextkey64
-       do
-               set $xxx
-               eval $setvar
-       done
-fi
-
 : see if difftime exists
 set difftime d_difftime
 eval $inlibc
 
-: see if sys/stat.h is available
-set sys/stat.h i_sysstat
-eval $inhdr
-
 : see if this is a dirent system
 echo " "
 if xinc=`./findhdr dirent.h`; $test "$xinc"; then
@@ -7887,162 +7944,6 @@ set d_dirnamlen
 eval $setvar
 $rm -f try.c
 
-
-if $test X"$use64bits" = X"$define"; then
-       : see if fstat64 exists
-       set fstat64 d_fstat64
-       eval $inlibc
-
-       : see if ftruncate64 exists
-       set ftruncate64 d_ftruncate64
-       eval $inlibc
-
-       : see if lockf64 exists
-       set lockf64 d_lockf64
-       eval $inlibc
-
-       : see if llseek exists
-       set llseek d_llseek
-       eval $inlibc
-
-       : see if lseek64 exists
-       set lseek64 d_lseek64
-       eval $inlibc
-
-       : see if lstat64 exists
-       set lstat64 d_lstat64
-       eval $inlibc
-
-       : see if open64 exists
-       set open64 d_open64
-       eval $inlibc
-
-       : see if opendir64 exists
-       set opendir64 d_opendir64
-       eval $inlibc
-
-       : see if readdir64 exists
-       set readdir64 d_readdir64
-       eval $inlibc
-
-       : see if seekdir64 exists
-       set seekdir64 d_seekdir64
-       eval $inlibc
-
-       : see if stat64 exists
-       set stat64 d_stat64
-       eval $inlibc
-
-       : see if telldir64 exists
-       set telldir64 d_telldir64
-       eval $inlibc
-
-       : see if truncate64 exists
-       set truncate64 d_truncate64
-       eval $inlibc
-
-       : check for off64_t
-       echo " "
-       echo $n "Checking to see if your system supports off64_t...$c" >&4
-       $cat >try.c <<EOCP
-#include <sys/types.h>
-#include <unistd.h>
-off64_t foo() { off64_t x; x = 7; return x; }'
-EOCP
-       if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
-               val="$define"
-               echo " Yup, it does." >&4
-       else
-               val="$undef"
-               echo " Nope, it doesn't." >&4
-       fi
-       $rm -f try.*
-       set d_off64_t
-       eval $setvar
-
-       : check for offset_t
-       echo " "
-       echo $n "Checking to see if your system supports offset_t...$c" >&4
-       $cat >try.c <<EOCP
-#include <sys/types.h>
-#include <unistd.h>
-offset_t foo() { offset_t x; x = 7; return x; }'
-EOCP
-       if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
-               val="$define"
-               echo " Yup, it does." >&4
-       else
-               val="$undef"
-               echo " Nope, it doesn't." >&4
-       fi
-       $rm -f try.*
-       set d_offset_t
-       eval $setvar
-
-       : check for ino64_t
-       echo " "
-       echo $n "Checking to see if your system supports ino64_t...$c" >&4
-       val="$undef"
-       case "$i_sysstat" in
-       "$define" )
-               $cat >try.c <<EOCP
-#include <sys/types.h>
-#include <sys/stat.h>
-ino64_t foo() { ino64_t x; x = 7; return x; }'
-EOCP
-               if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
-                       val="$define"
-               fi
-               $rm -f try.*
-               ;;
-       esac
-       if $test "X$val" = X"$define"; then
-               echo " Yup, it does." >&4
-       else
-               echo " Nope, it doesn't." >&4
-       fi
-       set d_ino64_t
-       eval $setvar
-
-       : check for struct flock64
-       echo " "
-       echo "Checking to see if your system supports struct flock64..." >&4
-       if $h_fcntl; then
-               set d_flock64_s flock64 l_len define fcntl.h
-               eval $hasfield
-       else
-               val="$undef"
-               set d_flock64_s
-               eval $setvar
-       fi
-       case "$d_flock64_s" in
-       "$define")      echo "Yup, it does." >&4
-                       ;;
-       *)              echo "Nope, it doesn't." >&4
-                       ;;
-       esac
-
-       : check for struct dirent64
-       echo " "
-       echo "Checking to see if your system supports struct dirent64..." >&4
-       set d_dirent64_s dirent64 d_off $i_dirent dirent.h
-       eval $hasfield
-       case "$d_dirent64_s" in
-       "$define")      echo "Yup, it does." >&4
-                       ;;
-       *)              echo "Nope, it doesn't." >&4
-                       ;;
-       esac
-
-else
-       val="$undef"
-       for xxx in d_fstat64 d_ftruncate64 d_lockf64 d_lseek64 d_lstat64 d_open64 d_opendir64 d_readdir64 d_seekdir64 d_stat64 d_telldir64 d_truncate64 d_off64_t d_offset_t d_ino64_t d_flock64_s d_dirent64_s
-       do
-               set $xxx
-               eval $setvar
-       done
-fi
-
 : see if dlerror exists
 xxx_runnm="$runnm"
 runnm=false
@@ -8150,6 +8051,7 @@ EOM
                esac
        else
                echo "I can't compile and run the test program." >&4
+                echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
        fi
        ;;
 esac
@@ -8624,52 +8526,6 @@ $rm -f fd_set*
 set fgetpos d_fgetpos
 eval $inlibc
 
-
-if $test X"$use64bits" = X"$define"; then
-       : see if fgetpos64 exists
-       set fgetpos64 d_fgetpos64
-       eval $inlibc
-
-       : see if fopen64 exists
-       set freopen64 d_fopen64
-       eval $inlibc
-
-       : see if freopen64 exists
-       set freopen64 d_freopen64
-       eval $inlibc
-
-       : see if fseek64 exists
-       set fseek64 d_fseek64
-       eval $inlibc
-
-       : see if fseeko64 exists
-       set fseeko64 d_fseeko64
-       eval $inlibc
-
-       : see if fsetpos64 exists
-       set fsetpos64 d_fsetpos64
-       eval $inlibc
-
-       : see if ftell64 exists
-       set ftell64 d_ftell64
-       eval $inlibc
-
-       : see if ftello64 exists
-       set ftello64 d_ftello64
-       eval $inlibc
-
-       : see if tmpfile64 exists
-       set tmpfile64 d_tmpfile64
-       eval $inlibc
-else
-       val="$undef"
-       for xxx in d_fgetpos64 d_fopen64 d_freopen64 d_fseek64 d_fseeko64 d_fsetpos64 d_ftell64 d_ftello64 d_tmpfile64
-       do
-               set $xxx
-               eval $setvar
-       done
-fi
-
 : see if flock exists
 set flock d_flock
 eval $inlibc
@@ -8686,6 +8542,48 @@ eval $inlibc
 set fpathconf d_fpathconf
 eval $inlibc
 
+
+: see if llseek exists
+set llseek d_llseek
+eval $inlibc
+
+: check for off64_t
+echo " "
+echo $n "Checking to see if your system supports off64_t...$c" >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#include <unistd.h>
+off64_t foo() { off64_t x; x = 7; return x; }'
+EOCP
+if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+       val="$define"
+       echo " Yup, it does." >&4
+else
+       val="$undef"
+       echo " Nope, it doesn't." >&4
+fi
+$rm -f try.*
+set d_off64_t
+eval $setvar
+
+: check for fpos64_t
+echo " "
+echo $n "Checking to see if your system supports fpos64_t...$c" >&4
+$cat >try.c <<EOCP
+#include <sys/stdio.h>
+fpos64_t foo() { fpos64_t x; x = 7; return x; }'
+EOCP
+if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+       val="$define"
+       echo " Yup, it does." >&4
+else
+       val="$undef"
+       echo " Nope, it doesn't." >&4
+fi
+$rm -f try.*
+set d_fpos64_t
+eval $setvar
+
 : see if fseeko exists
 set fseeko d_fseeko
 eval $inlibc
@@ -9142,6 +9040,33 @@ fi
 set d_lchown
 eval $setvar
 
+: See if number of significant digits in a double precision number is known
+echo " "
+$cat >ldbl_dig.c <<EOM
+#$i_limits I_LIMITS
+#$i_float I_FLOAT
+#ifdef I_LIMITS
+#include <limits.h>
+#endif
+#ifdef I_FLOAT
+#include <float.h>
+#endif
+#ifdef LDBL_DIG
+printf("Contains LDBL_DIG");
+#endif
+EOM
+$cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
+if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
+       echo "LDBL_DIG found." >&4
+       val="$define"
+else
+       echo "LDBL_DIG NOT found." >&4
+       val="$undef"
+fi
+$rm -f ldbl_dig.?
+set d_ldbl_dig
+eval $setvar
+
 : see if link exists
 set link d_link
 eval $inlibc
@@ -9302,12 +9227,9 @@ set nice d_nice
 eval $inlibc
 
 : see if POSIX threads are available
-if test "X$usethreads" = "X$define"; then
-       set pthread.h i_pthread
-       eval $inhdr
-else
-       i_pthread="$undef"
-fi
+set pthread.h i_pthread
+eval $inhdr
+
 
 
 
@@ -10263,6 +10185,8 @@ if set sigaction val -f d_sigaction; eval $csym; $val; then
 int main()
 {
     struct sigaction act, oact;
+    act.sa_flags = 0;
+    oact.sa_handler = 0;
 }
 EOP
        set try
@@ -10324,6 +10248,10 @@ set d_sigsetjmp
 eval $setvar
 $rm -f try.c try
 
+: see if sys/stat.h is available
+set sys/stat.h i_sysstat
+eval $inhdr
+
 : see if stat knows about block sizes
 echo " "
 set d_statblks stat st_blocks $i_sysstat sys/stat.h
@@ -10944,7 +10872,7 @@ You seem to be either cross-compiling or doing a multiarchitecture build,
 skipping the byteorder check.
 
 EOM
-       byteorder=''
+       byteorder='0xffff'
        ;;
 *)
        case "$byteorder" in
@@ -10953,8 +10881,9 @@ EOM
 In the following, larger digits indicate more significance.  A big-endian
 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
-machines may have weird orders like 3412.  A Cray will report 87654321. If
-the test program works the default is probably right.
+machines may have weird orders like 3412.  A Cray will report 87654321,
+an Alpha will report 12345678. If the test program works the default is
+probably right.
 I'm now running the test program...
 EOM
                $cat >try.c <<'EOCP'
@@ -13491,11 +13420,7 @@ d_crypt='$d_crypt'
 d_csh='$d_csh'
 d_cuserid='$d_cuserid'
 d_dbl_dig='$d_dbl_dig'
-d_dbmclose64='$d_dbmclose64'
-d_dbminit64='$d_dbminit64'
-d_delete64='$d_delete64'
 d_difftime='$d_difftime'
-d_dirent64_s='$d_dirent64_s'
 d_dirnamlen='$d_dirnamlen'
 d_dlerror='$d_dlerror'
 d_dlopen='$d_dlopen'
@@ -13519,30 +13444,18 @@ d_fcntl='$d_fcntl'
 d_fd_macros='$d_fd_macros'
 d_fd_set='$d_fd_set'
 d_fds_bits='$d_fds_bits'
-d_fetch64='$d_fetch64'
-d_fgetpos64='$d_fgetpos64'
 d_fgetpos='$d_fgetpos'
-d_firstkey64='$d_firstkey64'
 d_flexfnam='$d_flexfnam'
-d_flock64_s='$d_flock64_s'
 d_flock='$d_flock'
-d_fopen64='$d_fopen64'
 d_fork='$d_fork'
 d_fpathconf='$d_fpathconf'
-d_freopen64='$d_freopen64'
-d_fseek64='$d_fseek64'
-d_fseeko64='$d_fseeko64'
+d_fpos64_t='$d_fpos64_t'
 d_fseeko='$d_fseeko'
-d_fsetpos64='$d_fsetpos64'
 d_fsetpos='$d_fsetpos'
-d_fstat64='$d_fstat64'
 d_fstatfs='$d_fstatfs'
 d_fstatvfs='$d_fstatvfs'
-d_ftell64='$d_ftell64'
-d_ftello64='$d_ftello64'
 d_ftello='$d_ftello'
 d_ftime='$d_ftime'
-d_ftruncate64='$d_ftruncate64'
 d_getgrent='$d_getgrent'
 d_getgrps='$d_getgrps'
 d_gethbyaddr='$d_gethbyaddr'
@@ -13579,21 +13492,18 @@ d_hasmntopt='$d_hasmntopt'
 d_htonl='$d_htonl'
 d_index='$d_index'
 d_inetaton='$d_inetaton'
-d_ino64_t='$d_ino64_t'
 d_int64t='$d_int64t'
 d_iovec_s='$d_iovec_s'
 d_isascii='$d_isascii'
 d_killpg='$d_killpg'
 d_lchown='$d_lchown'
+d_ldbl_dig='$d_ldbl_dig'
 d_link='$d_link'
 d_llseek='$d_llseek'
 d_locconv='$d_locconv'
-d_lockf64='$d_lockf64'
 d_lockf='$d_lockf'
 d_longdbl='$d_longdbl'
 d_longlong='$d_longlong'
-d_lseek64='$d_lseek64'
-d_lstat64='$d_lstat64'
 d_lstat='$d_lstat'
 d_madvise='$d_madvise'
 d_mblen='$d_mblen'
@@ -13623,16 +13533,12 @@ d_msgsnd='$d_msgsnd'
 d_msync='$d_msync'
 d_munmap='$d_munmap'
 d_mymalloc='$d_mymalloc'
-d_nextkey64='$d_nextkey64'
 d_nice='$d_nice'
 d_off64_t='$d_off64_t'
-d_offset_t='$d_offset_t'
 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
 d_oldpthreads='$d_oldpthreads'
 d_oldsock='$d_oldsock'
 d_open3='$d_open3'
-d_open64='$d_open64'
-d_opendir64='$d_opendir64'
 d_pathconf='$d_pathconf'
 d_pause='$d_pause'
 d_phostname='$d_phostname'
@@ -13648,7 +13554,6 @@ d_pwexpire='$d_pwexpire'
 d_pwgecos='$d_pwgecos'
 d_pwpasswd='$d_pwpasswd'
 d_pwquota='$d_pwquota'
-d_readdir64='$d_readdir64'
 d_readdir='$d_readdir'
 d_readlink='$d_readlink'
 d_readv='$d_readv'
@@ -13661,7 +13566,6 @@ d_safemcpy='$d_safemcpy'
 d_sanemcmp='$d_sanemcmp'
 d_sched_yield='$d_sched_yield'
 d_scm_rights='$d_scm_rights'
-d_seekdir64='$d_seekdir64'
 d_seekdir='$d_seekdir'
 d_select='$d_select'
 d_sem='$d_sem'
@@ -13706,7 +13610,6 @@ d_sigaction='$d_sigaction'
 d_sigsetjmp='$d_sigsetjmp'
 d_socket='$d_socket'
 d_sockpair='$d_sockpair'
-d_stat64='$d_stat64'
 d_statblks='$d_statblks'
 d_statfs='$d_statfs'
 d_statfsflags='$d_statfsflags'
@@ -13716,7 +13619,6 @@ d_stdio_ptr_lval='$d_stdio_ptr_lval'
 d_stdio_stream_array='$d_stdio_stream_array'
 d_stdiobase='$d_stdiobase'
 d_stdstdio='$d_stdstdio'
-d_store64='$d_store64'
 d_strchr='$d_strchr'
 d_strcoll='$d_strcoll'
 d_strctcpy='$d_strctcpy'
@@ -13736,13 +13638,10 @@ d_syserrlst='$d_syserrlst'
 d_system='$d_system'
 d_tcgetpgrp='$d_tcgetpgrp'
 d_tcsetpgrp='$d_tcsetpgrp'
-d_telldir64='$d_telldir64'
 d_telldir='$d_telldir'
 d_telldirproto='$d_telldirproto'
 d_time='$d_time'
 d_times='$d_times'
-d_tmpfile64='$d_tmpfile64'
-d_truncate64='$d_truncate64'
 d_truncate='$d_truncate'
 d_tzname='$d_tzname'
 d_umask='$d_umask'
@@ -14070,6 +13969,7 @@ uname='$uname'
 uniq='$uniq'
 use64bits='$use64bits'
 usedl='$usedl'
+uselongdouble='$uselongdouble'
 usemultiplicity='$usemultiplicity'
 usemymalloc='$usemymalloc'
 usenm='$usenm'