add perlcompile.pod (edited content from Nathan Torkington
[p5sagit/p5-mst-13.2.git] / Configure
index 8e1ebcd..4b55fa6 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 Mon Aug  2 01:12:47 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Mon Aug 30 22:33:03 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.
@@ -3572,7 +3543,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 +3588,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
@@ -3626,7 +3597,10 @@ fi
 : Binary compatibility with 5.005 is not possible for builds
 : with advanced features
 case "$usethreads$usemultiplicity" in
-*define*) bincompat5005="$undef" ;;
+*define*)
+       bincompat5005="$undef"
+       d_bincompat5005="$undef"
+       ;;
 *)     $cat <<EOM
 
 Perl 5.006 can be compiled for binary compatibility with 5.005.
@@ -3647,8 +3621,12 @@ EOM
        set d_bincompat5005
        eval $setvar
        case "$d_bincompat5005" in
-       "$define") bincompat5005="$define" ;;
-       *) bincompat5005="$undef" ;;
+       "$define")
+               bincompat5005="$define"
+               ;;
+       *)      bincompat5005="$undef"
+               d_bincompat5005="$undef"
+               ;;
        esac
        ;;
 esac
@@ -3820,7 +3798,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
@@ -4167,7 +4151,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';;
@@ -4175,11 +4159,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?"
@@ -4193,7 +4176,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
@@ -4208,6 +4191,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
 
@@ -4249,7 +4251,7 @@ $define)
 esac
 
 case "$hint" in
-none|recommended) dflt="$ccflags $dflt" ;;
+default|recommended) dflt="$ccflags $dflt" ;;
 *) dflt="$ccflags";;
 esac
 
@@ -4714,7 +4716,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
@@ -4777,7 +4779,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
@@ -5759,7 +5761,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
@@ -5902,7 +5904,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
@@ -6334,7 +6336,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
@@ -6399,7 +6401,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
@@ -6429,13 +6431,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
@@ -6702,8 +6741,7 @@ $rm -f try.c try
 
 echo " "
 
-case "$d_longlong" in
-$define)
+if $test X"$intsize" = X8 -o X"$longsize" = X8 -o X"$d_int64t" = X"$define" -o X"$d_longlong" = X"$define"; then
 
 echo "Checking how to print 64-bit integers..." >&4
 
@@ -6783,7 +6821,7 @@ if $test X"$sPRId64" = X -a X"$d_longlong" = X"$define" -a X"$longlongsize" = X8
 #include <sys/types.h>
 #include <stdio.h>
 int main() {
-  long long q = 12345678901;
+  long long q = 12345678901LL; /* AIX cc requires the LL prefix. */
   printf("%lld\n", q);
 }
 EOCP
@@ -6848,8 +6886,9 @@ if $test X"$sPRId64" = X; then
        echo "Cannot figure out how to print 64-bit integers." >&4
 fi
 
-;;
-esac # case "$d_longlong"
+$rm -f try try.*
+
+fi # intsize -o longsize -o d_int64t -o d_longlong
 
 case "$sPRId64" in
 '')    d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef"; 
@@ -6860,8 +6899,6 @@ case "$sPRId64" in
        ;;
 esac
 
-$rm -f try try.*
-
 : check for length of double
 echo " "
 case "$doublesize" in
@@ -6891,7 +6928,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"
@@ -6937,8 +6974,7 @@ $rm -f try.c try
 
 echo " "
 
-case "$d_longdbl" in
-$define)
+if $test X"$d_longdbl" = X"$define"; then
 
 echo "Checking how to print long doubles..." >&4
 
@@ -6970,7 +7006,7 @@ if $test X"$sPRIfldbl" = X; then
 #include <stdio.h>
 int main() {
   long double d = 123.456;
-  printf("%.3Lf\n", d);
+  printf("%.3llf\n", d);
 }
 EOCP
        set try
@@ -6978,9 +7014,9 @@ EOCP
                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."
+                       sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
+                       sPRIFldbl='"llF"'; sPRIGldbl='"llG"'; sPRIEldbl='"llE"';
+                       echo "We will use %llf."
                        ;;
                esac
        fi
@@ -6992,7 +7028,7 @@ if $test X"$sPRIfldbl" = X; then
 #include <stdio.h>
 int main() {
   long double d = 123.456;
-  printf("%.3lf\n", d);
+  printf("%.3Lf\n", d);
 }
 EOCP
        set try
@@ -7000,21 +7036,21 @@ EOCP
                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."
+                       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 -a; then
+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);
+  printf("%.3lf\n", d);
 }
 EOCP
        set try
@@ -7022,9 +7058,9 @@ EOCP
                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."
+                       sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
+                       sPRIFldbl='"lF"'; sPRIGldbl='"lG"'; sPRIEldbl='"lE"';
+                       echo "We will use %lf."
                        ;;
                esac
        fi
@@ -7034,8 +7070,9 @@ if $test X"$sPRIfldbl" = X; then
        echo "Cannot figure out how to print long doubles." >&4
 fi
 
-;;
-esac # case "$d_longdbl"
+$rm -f try try.*
+
+fi # d_longdbl
 
 case "$sPRIfldbl" in
 '')    d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef"; 
@@ -7046,8 +7083,6 @@ case "$sPRIfldbl" in
        ;;
 esac
 
-$rm -f try try.*
-
 : Initialize h_fcntl
 h_fcntl=false
 
@@ -7770,52 +7805,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
@@ -7884,162 +7877,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
@@ -8147,6 +7984,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
@@ -8621,52 +8459,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
@@ -8683,6 +8475,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
@@ -9139,6 +8973,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
@@ -10321,6 +10182,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
@@ -10941,7 +10806,7 @@ You seem to be either cross-compiling or doing a multiarchitecture build,
 skipping the byteorder check.
 
 EOM
-       byteorder=''
+       byteorder='0xffff'
        ;;
 *)
        case "$byteorder" in
@@ -10950,8 +10815,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'
@@ -13358,9 +13224,8 @@ case "$d_portable" in
        echo " "
        echo "Stripping down executable paths..." >&4
        for file in $loclist $trylist; do
-               if test X$file != Xln -a X$file != Xar -o X$osname != Xos2; then
-                       eval $file="\$file"
-               fi
+               eval temp=\$$file
+               eval $file=`basename $temp`
        done
        ;;
 esac
@@ -13489,11 +13354,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'
@@ -13517,30 +13378,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'
@@ -13577,21 +13426,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'
@@ -13621,16 +13467,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'
@@ -13646,7 +13488,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'
@@ -13659,7 +13500,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'
@@ -13704,7 +13544,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'
@@ -13714,7 +13553,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'
@@ -13734,13 +13572,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'
@@ -14068,6 +13903,7 @@ uname='$uname'
 uniq='$uniq'
 use64bits='$use64bits'
 usedl='$usedl'
+uselongdouble='$uselongdouble'
 usemultiplicity='$usemultiplicity'
 usemymalloc='$usemymalloc'
 usenm='$usenm'