Zero entries were skipped, fix from Adrian Goalby
[p5sagit/p5-mst-13.2.git] / Configure
index cfec7fa..dbeaef3 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 Apr 24 22:34:53 EET DST 2000 [metaconfig 3.0 PL70]
+# Generated on Sat Aug  5 00:21:09 EET DST 2000 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
@@ -288,7 +288,6 @@ bincompat5005=''
 d_bincompat5005=''
 byteorder=''
 cc=''
-gccversion=''
 ccflags=''
 cppflags=''
 ldflags=''
@@ -343,7 +342,6 @@ d_endnent=''
 d_endpent=''
 d_endpwent=''
 d_endsent=''
-d_endspent=''
 d_fchmod=''
 d_fchown=''
 d_fcntl=''
@@ -355,6 +353,7 @@ d_flexfnam=''
 d_flock=''
 d_fork=''
 d_fpos64_t=''
+d_frexpl=''
 d_fs_data_s=''
 d_fseeko=''
 d_fsetpos=''
@@ -364,6 +363,7 @@ d_ftime=''
 d_gettimeod=''
 d_Gconvert=''
 d_getcwd=''
+d_getespwnam=''
 d_getfsstat=''
 d_getgrent=''
 d_getgrps=''
@@ -392,10 +392,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=''
@@ -406,6 +406,8 @@ d_iconv=''
 d_inetaton=''
 d_int64_t=''
 d_isascii=''
+d_isnan=''
+d_isnanl=''
 d_killpg=''
 d_lchown=''
 d_ldbl_dig=''
@@ -435,6 +437,7 @@ d_mkstemps=''
 d_mktime=''
 d_mmap=''
 mmaptype=''
+d_modfl=''
 d_mprotect=''
 d_msg=''
 d_msgctl=''
@@ -487,6 +490,7 @@ d_setpgrp2=''
 d_bsdsetpgrp=''
 d_setpgrp=''
 d_setprior=''
+d_setproctitle=''
 d_setpwent=''
 d_setregid=''
 d_setresgid=''
@@ -496,7 +500,6 @@ d_setrgid=''
 d_setruid=''
 d_setsent=''
 d_setsid=''
-d_setspent=''
 d_setvbuf=''
 d_sfio=''
 usesfio=''
@@ -594,6 +597,8 @@ fflushNULL=''
 fflushall=''
 fpossize=''
 fpostype=''
+gccosandvers=''
+gccversion=''
 gidformat=''
 gidsign=''
 gidsize=''
@@ -620,6 +625,7 @@ i_grp=''
 i_iconv=''
 i_ieeefp=''
 i_inttypes=''
+i_libutil=''
 i_limits=''
 i_locale=''
 i_machcthr=''
@@ -634,6 +640,7 @@ i_netinettcp=''
 i_niin=''
 i_sysin=''
 i_poll=''
+i_prot=''
 i_pthread=''
 d_pwage=''
 d_pwchange=''
@@ -775,6 +782,8 @@ hostcat=''
 passcat=''
 orderlib=''
 ranlib=''
+d_perl_otherlibdirs=''
+otherlibdirs=''
 package=''
 spackage=''
 pager=''
@@ -790,6 +799,7 @@ perl5=''
 perladmin=''
 perlpath=''
 d_nv_preserves_uv=''
+d_nv_preserves_uv_bits=''
 i16size=''
 i16type=''
 i32size=''
@@ -891,6 +901,9 @@ uidtype=''
 archname64=''
 use64bitall=''
 use64bitint=''
+ccflags_uselargefiles=''
+ldflags_uselargefiles=''
+libswanted_uselargefiles=''
 uselargefiles=''
 uselongdouble=''
 usemorebits=''
@@ -984,6 +997,9 @@ plibpth=''
 libswanted=''
 : some systems want to use only the non-versioned libso:s
 ignore_versioned_solibs=''
+ccflags_uselargefiles=''
+ldflags_uselargefiles=''
+libswanted_uselargefiles=''
 : set usemultiplicity on the Configure command line to enable multiplicity.
 : set usesocks on the Configure command line to enable socks.
 : set usethreads on the Configure command line to enable threads.
@@ -995,7 +1011,7 @@ defvoidused=15
 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 iconv"
+libswanted="$libswanted ucb bsd BSD PW x iconv util"
 : 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 ! !'`
@@ -1337,10 +1353,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
 
@@ -2020,6 +2041,62 @@ FOO
        ;;
 esac
 
+cat <<EOS >checkcc
+$startsh
+EOS
+cat <<'EOSC' >>checkcc
+case "$cc" in
+'') ;;
+*)  $rm -f try try.*
+    $cat >try.c <<EOM
+int main(int argc, char *argv[]) {
+  return 0;
+}
+EOM
+    if $cc -o try try.c; then
+       :
+    else
+        echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
+        despair=yes
+        trygcc=yes
+        case "$cc" in
+        *gcc*) trygcc=no ;;
+        esac
+        case "`$cc -v -c try.c 2>&1`" in
+        *gcc*) trygcc=no ;;
+        esac
+        if $test X"$trygcc" = Xyes; then
+            if gcc -o try -c try.c; then
+                echo " "
+                echo "You seem to have a working gcc, though." >&4
+                rp="Would you like to use it?"
+                dflt=y
+                if $test -f myread; then
+                    . ./myread
+                else
+                    if $test -f UU/myread; then
+                        . ./UU/myread
+                    else
+                        echo "Cannot find myread, sorry.  Aborting." >&2
+                        exit 1
+                    fi
+                fi  
+                case "$ans" in
+                [yY]*) cc=gcc; ccflags=''; despair=no ;;
+                esac
+            fi
+        fi
+        if $test X"$despair" = Xyes; then
+            echo "You need to find a working C compiler." >&4
+            echo "I cannot continue any further, aborting." >&4
+            exit 1
+        fi
+    fi
+    $rm -f try try.*
+    ;;
+esac
+EOSC
+
 : determine whether symbolic links are supported
 echo " "
 $touch blurfl
@@ -2152,6 +2229,7 @@ if test -f config.sh; then
                ;;
        esac
 fi
+. ./UU/checkcc
 if test ! -f config.sh; then
        $cat <<EOM
 
@@ -2336,7 +2414,11 @@ EOM
                osf1|mls+)      case "$5" in
                                alpha)
                                        osname=dec_osf
-                                       osvers=`echo "$3" | sed 's/^[xvt]//'`
+                                       osvers=`sizer -v | awk '{print $3}' |  tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
+                                       case "$osvers" in
+                                       [1-9].[0-9]*) ;;
+                                       *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
+                                       esac
                                        ;;
                        hp*)    osname=hp_osf1  ;;
                        mips)   osname=mips_osf1 ;;
@@ -2786,7 +2868,11 @@ int main() {
 #endif
 }
 EOP
-       ( cc -o pdp11 pdp11.c ) >/dev/null 2>&1
+       case "$cc" in
+       '') modelcc="$cc" ;;
+       *) modelcc="cc" ;;
+       esac
+       ( $modelcc -o pdp11 pdp11.c ) >/dev/null 2>&1
        if $test -f pdp11 && ./pdp11 2>/dev/null; then
                dflt='unsplit split'
        else
@@ -3063,6 +3149,8 @@ fi
 if $test -f cc.cbu; then
     . ./cc.cbu
 fi
+. ./checkcc
+
 echo " "
 echo "Checking for GNU cc in disguise and/or its version number..." >&4
 $cat >gccvers.c <<EOM
@@ -3100,6 +3188,188 @@ $rm -f gccvers*
 case "$gccversion" in
 1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
 esac
+case "$gccversion" in
+'') gccosandvers='' ;;
+*) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
+   gccosandvers=`$cc -v 2>&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
+   gccshortvers=''
+   case "$gccosandvers" in
+   $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
+   $osname$osvers) ;; # looking good
+   $osname*) cat <<EOM >&4
+
+*** WHOA THERE!!! ***
+
+    Your gcc has not been compiled for the exact release of
+    your operating system ($gccosandvers versus $osname$osvers).
+
+    In general it is a good idea to keep gcc synchronized with
+    the operating system because otherwise serious problems
+    may ensue when trying to compile software, like Perl.
+
+    I'm trying to be optimistic here, though, and will continue.
+    If later during the configuration and build icky compilation
+    problems appear (headerfile conflicts being the most common
+    manifestation), I suggest reinstalling the gcc to match
+    your operating system release.
+
+EOM
+      ;;
+   *) gccosandvers='' ;; # failed to parse, better be silent
+   esac
+   ;;
+esac
+
+
+
+
+: see how we invoke the C preprocessor
+echo " "
+echo "Now, how can we feed standard input to your C preprocessor..." >&4
+cat <<'EOT' >testcpp.c
+#define ABC abc
+#define XYZ xyz
+ABC.XYZ
+EOT
+cd ..
+if test ! -f cppstdin; then
+       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
+chmod 755 cppstdin
+wrapper=`pwd`/cppstdin
+ok='false'
+cd UU
+
+if $test "X$cppstdin" != "X" && \
+       $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+then
+       echo "You used to use $cppstdin $cppminus so we'll use that again."
+       case "$cpprun" in
+       '') echo "But let's see if we can live without a wrapper..." ;;
+       *)
+               if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
+                       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+               then
+                       echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
+                       ok='true'
+               else
+                       echo "(However, $cpprun $cpplast does not work, let's see...)"
+               fi
+               ;;
+       esac
+else
+       case "$cppstdin" in
+       '') ;;
+       *)
+               echo "Good old $cppstdin $cppminus does not seem to be of any help..."
+               ;;
+       esac
+fi
+
+if $ok; then
+       : nothing
+elif echo 'Maybe "'"$cc"' -E" will work...'; \
+       $cc -E <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "Yup, it does."
+       x_cpp="$cc -E"
+       x_minus='';
+elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
+       $cc -E - <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "Yup, it does."
+       x_cpp="$cc -E"
+       x_minus='-';
+elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
+       $cc -P <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "Yipee, that works!"
+       x_cpp="$cc -P"
+       x_minus='';
+elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
+       $cc -P - <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "At long last!"
+       x_cpp="$cc -P"
+       x_minus='-';
+elif echo 'No such luck, maybe "'$cpp'" will work...'; \
+       $cpp <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "It works!"
+       x_cpp="$cpp"
+       x_minus='';
+elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
+       $cpp - <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "Hooray, it works!  I was beginning to wonder."
+       x_cpp="$cpp"
+       x_minus='-';
+elif echo 'Uh-uh.  Time to get fancy.  Trying a wrapper...'; \
+       $wrapper <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       x_cpp="$wrapper"
+       x_minus=''
+       echo "Eureka!"
+else
+       dflt=''
+       rp="No dice.  I can't find a C preprocessor.  Name one:"
+       . ./myread
+       x_cpp="$ans"
+       x_minus=''
+       $x_cpp <testcpp.c >testcpp.out 2>&1
+       if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+               echo "OK, that will do." >&4
+       else
+echo "Sorry, I can't get that to work.  Go find one and rerun Configure." >&4
+               exit 1
+       fi
+fi
+
+case "$ok" in
+false)
+       cppstdin="$x_cpp"
+       cppminus="$x_minus"
+       cpprun="$x_cpp"
+       cpplast="$x_minus"
+       set X $x_cpp
+       shift
+       case "$1" in
+       "$cpp")
+               echo "Perhaps can we force $cc -E using a wrapper..."
+               if $wrapper <testcpp.c >testcpp.out 2>&1; \
+                       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+               then
+                       echo "Yup, we can."
+                       cppstdin="$wrapper"
+                       cppminus='';
+               else
+                       echo "Nope, we'll have to live without it..."
+               fi
+               ;;
+       esac
+       case "$cpprun" in
+       "$wrapper")
+               cpprun=''
+               cpplast=''
+               ;;
+       esac
+       ;;
+esac
+
+case "$cppstdin" in
+"$wrapper"|'cppstdin') ;;
+*) $rm -f $wrapper;;
+esac
+$rm -f testcpp.c testcpp.out
 
 : decide how portable to be.  Allow command line overrides.
 case "$d_portable" in
@@ -3266,6 +3536,7 @@ while test "$type"; do
                true)
                        case "$ansexp" in
                        /*) value="$ansexp" ;;
+                       [a-zA-Z]:/*) value="$ansexp" ;;
                        *)
                                redo=true
                                case "$already" in
@@ -3393,7 +3664,7 @@ if $test -f /bin/mips && /bin/mips; then
 /bsd43
 #endif
 EOCP
-       if $cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
+       if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
                dflt='/bsd43/usr/include'
                incpath='/bsd43'
                mips_type='BSD 4.3'
@@ -3426,154 +3697,6 @@ y)      fn=d/
        ;;
 esac
 
-: see how we invoke the C preprocessor
-echo " "
-echo "Now, how can we feed standard input to your C preprocessor..." >&4
-cat <<'EOT' >testcpp.c
-#define ABC abc
-#define XYZ xyz
-ABC.XYZ
-EOT
-cd ..
-if test ! -f cppstdin; then
-       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
-chmod 755 cppstdin
-wrapper=`pwd`/cppstdin
-ok='false'
-cd UU
-
-if $test "X$cppstdin" != "X" && \
-       $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
-then
-       echo "You used to use $cppstdin $cppminus so we'll use that again."
-       case "$cpprun" in
-       '') echo "But let's see if we can live without a wrapper..." ;;
-       *)
-               if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
-                       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
-               then
-                       echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
-                       ok='true'
-               else
-                       echo "(However, $cpprun $cpplast does not work, let's see...)"
-               fi
-               ;;
-       esac
-else
-       case "$cppstdin" in
-       '') ;;
-       *)
-               echo "Good old $cppstdin $cppminus does not seem to be of any help..."
-               ;;
-       esac
-fi
-
-if $ok; then
-       : nothing
-elif echo 'Maybe "'"$cc"' -E" will work...'; \
-       $cc -E <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "Yup, it does."
-       x_cpp="$cc -E"
-       x_minus='';
-elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
-       $cc -E - <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "Yup, it does."
-       x_cpp="$cc -E"
-       x_minus='-';
-elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
-       $cc -P <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "Yipee, that works!"
-       x_cpp="$cc -P"
-       x_minus='';
-elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
-       $cc -P - <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "At long last!"
-       x_cpp="$cc -P"
-       x_minus='-';
-elif echo 'No such luck, maybe "'$cpp'" will work...'; \
-       $cpp <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "It works!"
-       x_cpp="$cpp"
-       x_minus='';
-elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
-       $cpp - <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "Hooray, it works!  I was beginning to wonder."
-       x_cpp="$cpp"
-       x_minus='-';
-elif echo 'Uh-uh.  Time to get fancy.  Trying a wrapper...'; \
-       $wrapper <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       x_cpp="$wrapper"
-       x_minus=''
-       echo "Eureka!"
-else
-       dflt=''
-       rp="No dice.  I can't find a C preprocessor.  Name one:"
-       . ./myread
-       x_cpp="$ans"
-       x_minus=''
-       $x_cpp <testcpp.c >testcpp.out 2>&1
-       if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-               echo "OK, that will do." >&4
-       else
-echo "Sorry, I can't get that to work.  Go find one and rerun Configure." >&4
-               exit 1
-       fi
-fi
-
-case "$ok" in
-false)
-       cppstdin="$x_cpp"
-       cppminus="$x_minus"
-       cpprun="$x_cpp"
-       cpplast="$x_minus"
-       set X $x_cpp
-       shift
-       case "$1" in
-       "$cpp")
-               echo "Perhaps can we force $cc -E using a wrapper..."
-               if $wrapper <testcpp.c >testcpp.out 2>&1; \
-                       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
-               then
-                       echo "Yup, we can."
-                       cppstdin="$wrapper"
-                       cppminus='';
-               else
-                       echo "Nope, we'll have to live without it..."
-               fi
-               ;;
-       esac
-       case "$cpprun" in
-       "$wrapper")
-               cpprun=''
-               cpplast=''
-               ;;
-       esac
-       ;;
-esac
-
-case "$cppstdin" in
-"$wrapper"|'cppstdin') ;;
-*) $rm -f $wrapper;;
-esac
-$rm -f testcpp.c testcpp.out
-
 : Set private lib path
 case "$plibpth" in
 '') if ./mips; then
@@ -5191,56 +5314,158 @@ y*|true)
                ;;
        esac
        ;;
-*)
-       usemymalloc='n'
-       mallocsrc=''
-       mallocobj=''
-       d_mymalloc="$undef"
+*)
+       usemymalloc='n'
+       mallocsrc=''
+       mallocobj=''
+       d_mymalloc="$undef"
+       ;;
+esac
+
+: compute the return types of malloc and free
+echo " "
+$cat >malloc.c <<END
+#$i_malloc I_MALLOC
+#$i_stdlib I_STDLIB
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef I_MALLOC
+#include <malloc.h>
+#endif
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+#ifdef TRY_MALLOC
+void *malloc();
+#endif
+#ifdef TRY_FREE
+void free();
+#endif
+END
+case "$malloctype" in
+'')
+       if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
+               malloctype='void *'
+       else
+               malloctype='char *'
+       fi
+       ;;
+esac
+echo "Your system wants malloc to return '$malloctype', it would seem." >&4
+
+case "$freetype" in
+'')
+       if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
+               freetype='void'
+       else
+               freetype='int'
+       fi
+       ;;
+esac
+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
 
-: compute the return types of malloc and free
-echo " "
-$cat >malloc.c <<END
-#$i_malloc I_MALLOC
-#$i_stdlib I_STDLIB
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef I_MALLOC
-#include <malloc.h>
-#endif
-#ifdef I_STDLIB
-#include <stdlib.h>
-#endif
-#ifdef TRY_MALLOC
-void *malloc();
-#endif
-#ifdef TRY_FREE
-void free();
-#endif
-END
-case "$malloctype" in
-'')
-       if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
-               malloctype='void *'
-       else
-               malloctype='char *'
-       fi
-       ;;
-esac
-echo "Your system wants malloc to return '$malloctype', it would seem." >&4
+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.
 
-case "$freetype" in
-'')
-       if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
-               freetype='void'
-       else
-               freetype='int'
-       fi
+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
-echo "Your system uses $freetype free(), it would seem." >&4
-$rm -f malloc.[co]
+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
@@ -5361,6 +5586,41 @@ 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
@@ -5444,77 +5704,6 @@ case "$perl5" in
 *)     echo "Using $perl5." ;;
 esac
 
-$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 list of previous versions to include in @INC
 $cat > getverlist <<EOPL
 #!$perl5 -w
@@ -7144,37 +7333,6 @@ 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.
-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
-
 : determine where add-on public executables go
 case "$sitebin" in
 '')    dflt=$siteprefix/bin ;;
@@ -8478,10 +8636,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'
@@ -9061,6 +9215,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
@@ -9138,6 +9296,10 @@ esac
 set getcwd d_getcwd
 eval $inlibc
 
+: see if getespwnam exists
+set getespwnam d_getespwnam
+eval $inlibc
+
 
 : see if getfsstat exists
 set getfsstat d_getfsstat
@@ -9316,6 +9478,10 @@ echo " "
 set d_getprotoprotos getprotoent $i_netdb netdb.h
 eval $hasproto
 
+: see if getprpwnam exists
+set getprpwnam d_getprpwnam
+eval $inlibc
+
 : see if getpwent exists
 set getpwent d_getpwent
 eval $inlibc
@@ -9338,10 +9504,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
@@ -9551,6 +9713,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
@@ -9633,7 +9803,7 @@ echo 'int main() { long long x = 7; return 0; }' > try.c
 set try
 if eval $compile; then
        val="$define"
-       echo "You have have long long."
+       echo "You have long long."
 else
        val="$undef"
        echo "You do not have long long."
@@ -9770,6 +9940,10 @@ esac
 
 
 
+: see if modfl exists
+set modfl d_modfl
+eval $inlibc
+
 : see if mprotect exists
 set mprotect d_mprotect
 eval $inlibc
@@ -10139,6 +10313,39 @@ 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 " "
@@ -10933,6 +11140,10 @@ eval $inlibc
 set setpriority d_setprior
 eval $inlibc
 
+: see if setproctitle exists
+set setproctitle d_setproctitle
+eval $inlibc
+
 : see if setpwent exists
 set setpwent d_setpwent
 eval $inlibc
@@ -10965,10 +11176,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
@@ -14174,6 +14381,10 @@ eval $inhdr
 set ieeefp.h i_ieeefp
 eval $inhdr
 
+: see if this is a libutil.h system
+set libutil.h i_libutil
+eval $inhdr
+
 : see if locale.h is available
 set locale.h i_locale
 eval $inhdr
@@ -14253,6 +14464,10 @@ eval $inhdr
 set poll.h i_poll
 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
@@ -14321,8 +14536,9 @@ $osname
 EOSH
 ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
 ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
-$cat Cppsym.a Cppsym.b | $tr ' ' $trnl | sort | uniq > Cppsym.know
-$rm -f Cppsym.a Cppsym.b
+$cat Cppsym.know > Cppsym.c
+$cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | sort | uniq > Cppsym.know
+$rm -f Cppsym.a Cppsym.b Cppsym.c
 cat <<EOSH > Cppsym
 $startsh
 if $test \$# -gt 0; then
@@ -14361,6 +14577,7 @@ cat <<EOSH >> Cppsym.try
 ccflags="$ccflags"
 case "$osname-$gccversion" in
 irix-) ccflags="\$ccflags -woff 1178" ;;
+os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
 esac
 $cc $optimize \$ccflags $ldflags -o try try.c $libs && ./try$exe_ext
 EOSH
@@ -14416,7 +14633,7 @@ if $test -z ccsym.raw; then
 else
        if $test -s ccsym.com; then
                echo "Your C compiler and pre-processor define these symbols:"
-               $sed -e 's/\(.*\)=.*/\1/' ccsym.com
+               $sed -e 's/\(..*\)=.*/\1/' ccsym.com
                also='also '
                symbols='ones'
                cppccsymbols=`$cat ccsym.com`
@@ -14426,7 +14643,7 @@ else
        if $test -s ccsym.cpp; then
                $test "$also" && echo " "
                echo "Your C pre-processor ${also}defines the following symbols:"
-               $sed -e 's/\(.*\)=.*/\1/' ccsym.cpp
+               $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
                also='further '
                cppsymbols=`$cat ccsym.cpp`
                cppsymbols=`echo $cppsymbols`
@@ -14435,14 +14652,14 @@ else
        if $test -s ccsym.own; then
                $test "$also" && echo " "
                echo "Your C compiler ${also}defines the following cpp symbols:"
-               $sed -e 's/\(.*\)=1/\1/' ccsym.own
-               $sed -e 's/\(.*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
+               $sed -e 's/\(..*\)=1/\1/' ccsym.own
+               $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
                ccsymbols=`$cat ccsym.own`
                ccsymbols=`echo $ccsymbols`
                $test "$silent" || sleep 1
        fi
 fi
-$rm -f ccsym*
+$rm -f ccsym* Cppsym.*
 
 : see if this is a termio system
 val="$undef"
@@ -14824,6 +15041,12 @@ for xxx in $known_extensions ; do
                true|$define|y) avail_ext="$avail_ext $xxx" ;;
                esac
                ;;
+       Sys/Syslog|sys/syslog)
+               : XXX syslog requires socket
+               case "$d_socket" in 
+               true|$define|y) avail_ext="$avail_ext $xxx" ;;
+               esac
+               ;;
        Thread|thread)
                case "$usethreads" in 
                true|$define|y) avail_ext="$avail_ext $xxx" ;;
@@ -15081,6 +15304,7 @@ cc='$cc'
 cccdlflags='$cccdlflags'
 ccdlflags='$ccdlflags'
 ccflags='$ccflags'
+ccflags_uselargefiles='$ccflags_uselargefiles'
 ccsymbols='$ccsymbols'
 cf_by='$cf_by'
 cf_email='$cf_email'
@@ -15161,7 +15385,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'
@@ -15176,6 +15399,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'
@@ -15184,6 +15408,7 @@ 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'
@@ -15208,12 +15433,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'
@@ -15225,6 +15450,8 @@ d_index='$d_index'
 d_inetaton='$d_inetaton'
 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'
@@ -15251,6 +15478,7 @@ 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'
@@ -15267,6 +15495,7 @@ 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'
@@ -15274,6 +15503,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'
@@ -15320,6 +15550,7 @@ d_setpgid='$d_setpgid'
 d_setpgrp2='$d_setpgrp2'
 d_setpgrp='$d_setpgrp'
 d_setprior='$d_setprior'
+d_setproctitle='$d_setproctitle'
 d_setpwent='$d_setpwent'
 d_setregid='$d_setregid'
 d_setresgid='$d_setresgid'
@@ -15329,7 +15560,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'
@@ -15429,6 +15659,7 @@ freetype='$freetype'
 full_ar='$full_ar'
 full_csh='$full_csh'
 full_sed='$full_sed'
+gccosandvers='$gccosandvers'
 gccversion='$gccversion'
 gidformat='$gidformat'
 gidsign='$gidsign'
@@ -15466,6 +15697,7 @@ i_grp='$i_grp'
 i_iconv='$i_iconv'
 i_ieeefp='$i_ieeefp'
 i_inttypes='$i_inttypes'
+i_libutil='$i_libutil'
 i_limits='$i_limits'
 i_locale='$i_locale'
 i_machcthr='$i_machcthr'
@@ -15479,6 +15711,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'
@@ -15560,6 +15793,7 @@ large='$large'
 ld='$ld'
 lddlflags='$lddlflags'
 ldflags='$ldflags'
+ldflags_uselargefiles='$ldflags_uselargefiles'
 ldlibpthname='$ldlibpthname'
 less='$less'
 lib_ext='$lib_ext'
@@ -15572,6 +15806,7 @@ libsfiles='$libsfiles'
 libsfound='$libsfound'
 libspath='$libspath'
 libswanted='$libswanted'
+libswanted_uselargefiles='$libswanted_uselargefiles'
 line='$line'
 lint='$lint'
 lkflags='$lkflags'
@@ -15632,6 +15867,7 @@ optimize='$optimize'
 orderlib='$orderlib'
 osname='$osname'
 osvers='$osvers'
+otherlibdirs='$otherlibdirs'
 package='$package'
 pager='$pager'
 passcat='$passcat'