This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid v-strings with require/use
[perl5.git] / Configure
index db14b23..dce7a06 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 Thu Jun 21 18:44:48 EET DST 2001 [metaconfig 3.0 PL70]
+# Generated on Thu Sep 20 17:20:27 EET DST 2001 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -178,6 +178,7 @@ nonxs_ext=''
 static_ext=''
 useopcode=''
 useposix=''
+extras=''
 d_bsd=''
 d_eunice=''
 d_xenix=''
@@ -327,6 +328,7 @@ d_castneg=''
 d_chown=''
 d_chroot=''
 d_chsize=''
+d_class=''
 d_closedir=''
 d_void_closedir=''
 d_cmsghdr_s=''
@@ -353,6 +355,7 @@ d_endnent=''
 d_endpent=''
 d_endpwent=''
 d_endsent=''
+d_fchdir=''
 d_fchmod=''
 d_fchown=''
 d_fcntl=''
@@ -361,10 +364,16 @@ d_fd_macros=''
 d_fd_set=''
 d_fds_bits=''
 d_fgetpos=''
+d_finite=''
+d_finitel=''
 d_flexfnam=''
 d_flock=''
 d_flockproto=''
 d_fork=''
+d_fp_class=''
+d_fpclass=''
+d_fpclassify=''
+d_fpclassl=''
 d_fpos64_t=''
 d_frexpl=''
 d_fs_data_s=''
@@ -418,10 +427,11 @@ d_getsbyport=''
 d_gnulibc=''
 d_hasmntopt=''
 d_htonl=''
-d_iconv=''
 d_inetaton=''
 d_int64_t=''
 d_isascii=''
+d_isfinite=''
+d_isinf=''
 d_isnan=''
 d_isnanl=''
 d_killpg=''
@@ -465,6 +475,7 @@ d_msgsnd=''
 d_msync=''
 d_munmap=''
 d_nice=''
+d_nl_langinfo=''
 d_off64_t=''
 d_open3=''
 d_fpathconf=''
@@ -475,6 +486,7 @@ d_poll=''
 d_portable=''
 d_old_pthread_create_joinable=''
 old_pthread_create_joinable=''
+d_pthread_atfork=''
 d_pthread_yield=''
 d_sched_yield=''
 sched_yield=''
@@ -608,6 +620,7 @@ d_umask=''
 d_semctl_semid_ds=''
 d_semctl_semun=''
 d_union_semun=''
+d_unordered=''
 d_usleep=''
 d_usleepproto=''
 d_ustat=''
@@ -661,12 +674,14 @@ i_dld=''
 i_dlfcn=''
 i_fcntl=''
 i_float=''
+i_fp=''
+i_fp_class=''
 i_gdbm=''
 d_grpasswd=''
 i_grp=''
-i_iconv=''
 i_ieeefp=''
 i_inttypes=''
+i_langinfo=''
 i_libutil=''
 i_limits=''
 i_locale=''
@@ -836,6 +851,7 @@ perl_patchlevel=''
 revision=''
 subversion=''
 version=''
+version_patchlevel_string=''
 perl5=''
 perladmin=''
 perlpath=''
@@ -1070,7 +1086,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 util"
+libswanted="$libswanted ucb bsd BSD PW x 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 ! !'`
@@ -1109,7 +1125,7 @@ case "$sh" in
 esac
 
 case "$sh" in
-'')    cat <<EOM >&2
+'')    cat >&2 <<EOM
 $me:  Fatal Error:  I can't find a Bourne Shell anywhere.  
 
 Usually it's in /bin/sh.  How did you even get this far?
@@ -1189,12 +1205,24 @@ config_args='$*'
 config_argc=$#
 EOSH
 argn=1
+args_exp=''
+args_sep=''
 for arg in "$@"; do
        cat >>cmdline.opt <<EOSH
 config_arg$argn='$arg'
 EOSH
+       # Extreme backslashitis: replace each ' by '"'"'
+       cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
+$arg
+EOC
+       arg_exp=`cat cmdl.opt`
+       args_exp="$args_exp$args_sep'$arg_exp'"
        argn=`expr $argn + 1`
+       args_sep=' '
 done
+# args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@"
+# used by ./hints/os2.sh
+rm -f cmdl.opt
 
 : produce awk script to parse command line options
 cat >options.awk <<'EOF'
@@ -1996,6 +2024,7 @@ $eunicefix loc
 loclist="
 awk
 cat
+chmod
 comm
 cp
 echo
@@ -2295,8 +2324,8 @@ $define|true|[yY]*)
                                fi
                        done
                        # Sanity check 2.
-                       if test ! -f t/base/commonsense.t; then
-                               echo "Failed to create the symlinks.  Aborting." >&4
+                       if test ! -f t/base/lex.t; then
+                               echo "Failed to create the symlinks (t/base/lex.t missing).  Aborting." >&4
                                exit 1
                        fi
                        cd UU
@@ -2322,20 +2351,20 @@ $define|true|[yY]*)
            nm=$targetarch-nm
            ranlib=$targetarch-ranlib
            $echo 'extern int foo;' > try.c
-           set X `$cc -v -E perl.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
+           set X `$cc -v -E try.c 2>&1 | $awk '/^#include </,/^End of search /'|$grep '/include'`
            shift
             if $test $# -gt 0; then
                incpth="$incpth $*"
-               incpth="$echo $incpth|$sed 's/^ //'"
-                echo "Guessing incpth $incpth" >&4
+               incpth="`$echo $incpth|$sed 's/^ //'`"
+                echo "Guessing incpth '$incpth'." >&4
                 for i in $*; do
-                   j=`$echo $i|$sed 's,/include$,/lib,'`
+                   j="`$echo $i|$sed 's,/include$,/lib,'`"
                    if $test -d $j; then
                        libpth="$libpth $j"
                    fi
                 done   
-               libpth="$echo $libpth|$sed 's/^ //'"
-                echo "Guessing libpth $libpth." >&4
+               libpth="`$echo $libpth|$sed 's/^ //'`"
+                echo "Guessing libpth '$libpth'." >&4
            fi
            $rm -f try.c
            ;;
@@ -2346,11 +2375,11 @@ $define|true|[yY]*)
        esac
        case "$incpth" in
        '') echo "Incpth not defined." >&4; croak=y ;;
-        *)  echo "Using incpth $incpth." >&4 ;;
+        *)  echo "Using incpth '$incpth'." >&4 ;;
        esac
        case "$libpth" in
        '') echo "Libpth not defined." >&4; croak=y ;;
-        *)  echo "Using libpth $libpth." >&4 ;;
+        *)  echo "Using libpth '$libpth'." >&4 ;;
        esac
        case "$usrinc" in
        '') for i in $incpth; do
@@ -2383,7 +2412,7 @@ $define|true|[yY]*)
            ;;
        *)  pwd=`$test -f ../Configure & cd ..; pwd`
            run=$pwd/Cross/run
-           targetmkdir=$pwd/Cross/mkdirkrun
+           targetmkdir=$pwd/Cross/mkdir
            to=$pwd/Cross/to
            from=$pwd/Cross/from
            ;;
@@ -2447,6 +2476,7 @@ EOF
 #!/bin/sh
 $targetrun -l $targetuser $targethost "mkdir -p \$@"
 EOF
+           $chmod a+rx $targetmkdir
            ;;
        *)  echo "Unknown targetmkdir '$targetmkdir'" >&4
            exit 1
@@ -2523,23 +2553,24 @@ EOF
        if $test ! -f $run; then
            echo "Target 'run' script '$run' not found." >&4
        else
-           chmod a+rx $run
+           $chmod a+rx $run
        fi
        if $test ! -f $to; then
            echo "Target 'to' script '$to' not found." >&4
        else
-           chmod a+rx $to
+           $chmod a+rx $to
        fi
        if $test ! -f $from; then
            echo "Target 'from' script '$from' not found." >&4
        else
-           chmod a+rx $from
+           $chmod a+rx $from
        fi
        if $test ! -f $run -o ! -f $to -o ! -f $from; then
            exit 1
        fi
        cat >&4 <<EOF
-Using '$run' for remote execution, and '$from' and '$to'
+Using '$run' for remote execution,
+and '$from' and '$to'
 for remote file transfer.
 EOF
        ;;
@@ -3304,6 +3335,17 @@ esac
 set usemultiplicity
 eval $setvar
 
+
+case "$usemorebits" in
+"$define"|true|[yY]*)
+       use64bitint="$define"
+       uselongdouble="$define"
+       usemorebits="$define"
+       ;;
+*)     usemorebits="$undef"
+       ;;
+esac
+
 : make some quick guesses about what we are up against
 echo " "
 $echo $n "Hmm...  $c"
@@ -3487,162 +3529,6 @@ case "$ccname" in
 '') ccname="$cc" ;;
 esac
 
-case "$gccversion" in
-'') ;;
-*)  case "$ccflags" in
-    *-Wall*) ;;
-    *) ccflags="$ccflags -Wall" ;;
-    esac
-    ;;
-esac
-
-: see how we invoke the C preprocessor
-echo " "
-echo "Now, how can we feed standard input to your C preprocessor..." >&4
-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
@@ -3970,79 +3856,227 @@ y)     fn=d/
        ;;
 esac
 
-: Set private lib path
-case "$plibpth" in
-'') if ./mips; then
-               plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
-       fi;;
-esac
-case "$libpth" in
-' ') dlist='';;
-'') dlist="$loclibpth $plibpth $glibpth";;
-*) dlist="$libpth";;
-esac
-
-: Now check and see which directories actually exist, avoiding duplicates
-libpth=''
-for xxx in $dlist
-do
-    if $test -d $xxx; then
-               case " $libpth " in
-               *" $xxx "*) ;;
-               *) libpth="$libpth $xxx";;
-               esac
-    fi
-done
-$cat <<'EOM'
-
-Some systems have incompatible or broken versions of libraries.  Among
-the directories listed in the question below, please remove any you
-know not to be holding relevant libraries, and add any that are needed.
-Say "none" for none.
-
-EOM
-case "$libpth" in
-'') dflt='none';;
-*)
-       set X $libpth
-       shift
-       dflt=${1+"$@"}
-       ;;
-esac
-rp="Directories to use for library searches?"
-. ./myread
-case "$ans" in
-none) libpth=' ';;
-*) libpth="$ans";;
-esac
-
-: compute shared library extension
-case "$so" in
-'')
-       if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
-               dflt='sl'
+: 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
-               dflt='so'
+               echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
        fi
-       ;;
-*) dflt="$so";;
-esac
-$cat <<EOM
-
-On some systems, shared libraries may be available.  Answer 'none' if
-you want to suppress searching of shared libraries for the remainder
-of this configuration.
-
-EOM
-rp='What is the file extension used for shared libraries?'
-. ./myread
-so="$ans"
+else
+       echo "Keeping your $hint cppstdin wrapper."
+fi
+chmod 755 cppstdin
+wrapper=`pwd`/cppstdin
+ok='false'
+cd UU
 
-: Define several unixisms.
-: Hints files or command line option can be used to override them.
-: The convoluted testing is in case hints files set either the old
-: or the new name.
-case "$_exe" in
+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
+               plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
+       fi;;
+esac
+case "$libpth" in
+' ') dlist='';;
+'') dlist="$loclibpth $plibpth $glibpth";;
+*) dlist="$libpth";;
+esac
+
+: Now check and see which directories actually exist, avoiding duplicates
+libpth=''
+for xxx in $dlist
+do
+    if $test -d $xxx; then
+               case " $libpth " in
+               *" $xxx "*) ;;
+               *) libpth="$libpth $xxx";;
+               esac
+    fi
+done
+$cat <<'EOM'
+
+Some systems have incompatible or broken versions of libraries.  Among
+the directories listed in the question below, please remove any you
+know not to be holding relevant libraries, and add any that are needed.
+Say "none" for none.
+
+EOM
+case "$libpth" in
+'') dflt='none';;
+*)
+       set X $libpth
+       shift
+       dflt=${1+"$@"}
+       ;;
+esac
+rp="Directories to use for library searches?"
+. ./myread
+case "$ans" in
+none) libpth=' ';;
+*) libpth="$ans";;
+esac
+
+: compute shared library extension
+case "$so" in
+'')
+       if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
+               dflt='sl'
+       else
+               dflt='so'
+       fi
+       ;;
+*) dflt="$so";;
+esac
+$cat <<EOM
+
+On some systems, shared libraries may be available.  Answer 'none' if
+you want to suppress searching of shared libraries for the remainder
+of this configuration.
+
+EOM
+rp='What is the file extension used for shared libraries?'
+. ./myread
+so="$ans"
+
+: Define several unixisms.
+: Hints files or command line option can be used to override them.
+: The convoluted testing is in case hints files set either the old
+: or the new name.
+case "$_exe" in
 '')    case "$exe_ext" in
     '')        ;;
        *)      _exe="$exe_ext" ;;
@@ -4525,62 +4559,6 @@ n) echo "OK, that should do.";;
 esac
 $rm -f try try.* core
 
-: define an is-a-typedef? function
-typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
-case "$inclist" in
-"") inclist="sys/types.h";;
-esac;
-eval "varval=\$$var";
-case "$varval" in
-"")
-       $rm -f temp.c;
-       for inc in $inclist; do
-               echo "#include <$inc>" >>temp.c;
-       done;
-       echo "#ifdef $type" >> temp.c;
-       echo "printf(\"We have $type\");" >> temp.c;
-       echo "#endif" >> temp.c;
-       $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
-       if $contains $type temp.E >/dev/null 2>&1; then
-               eval "$var=\$type";
-       else
-               eval "$var=\$def";
-       fi;
-       $rm -f temp.?;;
-*) eval "$var=\$varval";;
-esac'
-
-: define an is-a-typedef? function that prompts if the type is not available.
-typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
-case "$inclist" in
-"") inclist="sys/types.h";;
-esac;
-eval "varval=\$$var";
-case "$varval" in
-"")
-       $rm -f temp.c;
-       for inc in $inclist; do
-               echo "#include <$inc>" >>temp.c;
-       done;
-       echo "#ifdef $type" >> temp.c;
-       echo "printf(\"We have $type\");" >> temp.c;
-       echo "#endif" >> temp.c;
-       $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
-       echo " " ;
-       echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
-       if $contains $type temp.E >/dev/null 2>&1; then
-               echo "$type found." >&4;
-               eval "$var=\$type";
-       else
-               echo "$type NOT found." >&4;
-               dflt="$def";
-               . ./myread ;
-               eval "$var=\$ans";
-       fi;
-       $rm -f temp.?;;
-*) eval "$var=\$varval";;
-esac'
-
 : define a shorthand compile call
 compile='
 mc_file=$1;
@@ -4604,228 +4582,39 @@ int main()
        printf("intsize=%d;\n", (int)sizeof(int));
        printf("longsize=%d;\n", (int)sizeof(long));
        printf("shortsize=%d;\n", (int)sizeof(short));
-       exit(0);
-}
-EOCP
-       set try
-       if eval $compile_ok && $run ./try > /dev/null; then
-               eval `$run ./try`
-               echo "Your integers are $intsize bytes long."
-               echo "Your long integers are $longsize bytes long."
-               echo "Your short integers are $shortsize bytes long."
-       else
-               $cat >&4 <<EOM
-!
-Help! I can't compile and run the intsize test program: please enlighten me!
-(This is probably a misconfiguration in your system or libraries, and
-you really ought to fix it.  Still, I'll try anyway.)
-!
-EOM
-               dflt=4
-               rp="What is the size of an integer (in bytes)?"
-               . ./myread
-               intsize="$ans"
-               dflt=$intsize
-               rp="What is the size of a long integer (in bytes)?"
-               . ./myread
-               longsize="$ans"
-               dflt=2
-               rp="What is the size of a short integer (in bytes)?"
-               . ./myread
-               shortsize="$ans"
-       fi
-       ;;
-esac
-$rm -f try try.*
-
-: see what type lseek is declared as in the kernel
-rp="What is the type used for lseek's offset on this system?"
-set off_t lseektype long stdio.h sys/types.h
-eval $typedef_ask
-
-echo " "
-echo "Checking to see how big your file offsets are..." >&4
-$cat >try.c <<EOCP
-#include <sys/types.h>
-#include <stdio.h>
-int main()
-{
-    printf("%d\n", (int)sizeof($lseektype));
-    return(0); 
-}
-EOCP
-set try
-if eval $compile_ok; then
-       lseeksize=`$run ./try`
-       echo "Your file offsets are $lseeksize bytes long."
-else
-       dflt=$longsize
-       echo " "
-       echo "(I can't seem to compile the test program.  Guessing...)"
-       rp="What is the size of your file offsets (in bytes)?"
-       . ./myread
-       lseeksize="$ans"
-fi
-$rm -f try.c try
-
-: see what type file positions are declared as in the library
-rp="What is the type for file position used by fsetpos()?"
-set fpos_t fpostype long stdio.h sys/types.h
-eval $typedef_ask
-
-echo " "
-case "$fpostype" in
-*_t) zzz="$fpostype"   ;;
-*)   zzz="fpos_t"      ;;
-esac
-echo "Checking the size of $zzz..." >&4 
-cat > try.c <<EOCP
-#include <sys/types.h>
-#include <stdio.h>
-int main() {
-    printf("%d\n", (int)sizeof($fpostype));
-    exit(0);
-}
-EOCP
-set try
-if eval $compile_ok; then
-       yyy=`$run ./try`
-       case "$yyy" in
-       '')     fpossize=4
-               echo "(I can't execute the test program--guessing $fpossize.)" >&4
-               ;;
-       *)      fpossize=$yyy
-               echo "Your $zzz is $fpossize bytes long."
-               ;;
-       esac
-else
-       dflt="$longsize"
-       echo " " >&4
-       echo "(I can't compile the test program.  Guessing...)" >&4
-       rp="What is the size of your file positions (in bytes)?"
-       . ./myread
-       fpossize="$ans"
-fi
-
-
-
-# Backward compatibility (uselfs is deprecated).
-case "$uselfs" in
-"$define"|true|[yY]*)
-       cat <<EOM >&4
-
-*** Configure -Duselfs is deprecated, using -Duselargefiles instead.
-EOM
-       uselargefiles="$define"
-       ;;
-esac                          
-
-case "$lseeksize:$fpossize" in
-8:8) cat <<EOM
-
-You can have files larger than 2 gigabytes.
-EOM
-   val="$define" ;;
-*)    case "$uselargefiles" in
-   "$undef"|false|[nN]*) dflt='n' ;;
-   *)  dflt='y' ;;
-   esac
-   cat <<EOM
-
-Perl can be built to understand large files (files larger than 2 gigabytes)
-on some systems.  To do so, Configure can be run with -Duselargefiles.
-
-If this doesn't make any sense to you, just accept the default '$dflt'.
-EOM
-   rp='Try to understand large files, if available?'
-   . ./myread
-   case "$ans" in
-   y|Y)        val="$define" ;;
-   *)          val="$undef"  ;;
-   esac
-   ;;
-esac
-set uselargefiles
-eval $setvar
-case "$uselargefiles" in
-"$define")
-: Look for a hint-file generated 'call-back-unit'.  If the
-: user has specified that a large files perl is to be built,
-: we may need to set or change some other defaults.
-       if $test -f uselargefiles.cbu; then
-               echo "Your platform has some specific hints for large file builds, using them..."
-               . ./uselargefiles.cbu
-               echo " "
-               echo "Rechecking to see how big your file offsets are..." >&4
-               $cat >try.c <<EOCP
-#include <sys/types.h>
-#include <stdio.h>
-int main()
-{
-    printf("%d\n", (int)sizeof($lseektype));
-    return(0); 
-}
-EOCP
-               set try
-               if eval $compile_ok; then
-                       lseeksize=`$run ./try`
-                       $echo "Your file offsets are now $lseeksize bytes long."
-               else
-                       dflt="$lseeksize"
-                       echo " "
-                       echo "(I can't seem to compile the test program.  Guessing...)"
-                       rp="What is the size of your file offsets (in bytes)?"
-                       . ./myread
-                       lseeksize="$ans"
-               fi
-               case "$fpostype" in
-               *_t) zzz="$fpostype"    ;;
-               *)   zzz="fpos_t"       ;;
-               esac
-               $echo $n "Rechecking the size of $zzz...$c" >&4 
-               $cat > try.c <<EOCP
-#include <sys/types.h>
-#include <stdio.h>
-int main() {
-    printf("%d\n", (int)sizeof($fpostype));
-    exit(0);
-}
-EOCP
-               set try
-               if eval $compile_ok; then
-                       yyy=`$run ./try`
-                       dflt="$lseeksize"
-                       case "$yyy" in
-                       '')     echo " "
-                               echo "(I can't execute the test program--guessing $fpossize.)" >&4
-                               ;;
-                       *)      fpossize=$yyy
-                               echo " $fpossize bytes." >&4
-                               ;;
-                       esac
-               else
-                       dflt="$fpossize"
-                       echo " "
-                       echo "(I can't compile the test program.  Guessing...)" >&4
-                       rp="What is the size of your file positions (in bytes)?"
-                       . ./myread
-                       fpossize="$ans"
-               fi
-               $rm -f try.c try
+       exit(0);
+}
+EOCP
+       set try
+       if eval $compile_ok && $run ./try > /dev/null; then
+               eval `$run ./try`
+               echo "Your integers are $intsize bytes long."
+               echo "Your long integers are $longsize bytes long."
+               echo "Your short integers are $shortsize bytes long."
+       else
+               $cat >&4 <<EOM
+!
+Help! I can't compile and run the intsize test program: please enlighten me!
+(This is probably a misconfiguration in your system or libraries, and
+you really ought to fix it.  Still, I'll try anyway.)
+!
+EOM
+               dflt=4
+               rp="What is the size of an integer (in bytes)?"
+               . ./myread
+               intsize="$ans"
+               dflt=$intsize
+               rp="What is the size of a long integer (in bytes)?"
+               . ./myread
+               longsize="$ans"
+               dflt=2
+               rp="What is the size of a short integer (in bytes)?"
+               . ./myread
+               shortsize="$ans"
        fi
        ;;
 esac
-
-
-case "$usemorebits" in
-"$define"|true|[yY]*)
-       use64bitint="$define"
-       uselongdouble="$define"
-       usemorebits="$define"
-       ;;
-*)     usemorebits="$undef"
-       ;;
-esac
+$rm -f try try.*
 
 : check for void type
 echo " "
@@ -5792,7 +5581,7 @@ nm_extract="$com"
 if $test -f /lib/syscalls.exp; then
        echo " "
        echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
-       $sed -n 's/^\([^        ]*\)[   ]*syscall[0-9]*$/\1/p' /lib/syscalls.exp >>libc.list
+       $sed -n 's/^\([^        ]*\)[   ]*syscall[0-9]*[        ]*$/\1/p' /lib/syscalls.exp >>libc.list
 fi
 ;;
 esac
@@ -6129,7 +5918,7 @@ $define)
        echo "Long doubles selected." >&4
        case "$longdblsize" in
        $doublesize)
-               "...but long doubles are equal to doubles, not changing architecture name." >&4
+               echo "...but long doubles are equal to doubles, not changing architecture name." >&4
                ;;
        *)
                case "$archname" in
@@ -6277,7 +6066,6 @@ prefixit='case "$3" in
        esac;;
 esac'
 
-
 : get the patchlevel
 echo " "
 echo "Getting the current patchlevel..." >&4
@@ -6304,11 +6092,15 @@ if $test -r $rsrc/.patch ; then
                perl_patchlevel=`cat $rsrc/.patch`
        fi
 fi
+: Define a handy string here to avoid duplication in myconfig.SH and configpm.
+version_patchlevel_string="version $patchlevel subversion $subversion"
 case "$perl_patchlevel" in
-0)  ;;
-'') $echo "(You have $package version $patchlevel subversion $subversion.)" ;;
-*)  $echo "(You have $package version $patchlevel subversion $subversion patchlevel $perl_patchlevel.)" ;;
+0|'') ;;
+*) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
 esac
+
+$echo "(You have $package $version_patchlevel_string.)"
+
 case "$osname" in
 dos|vms)
        : XXX Should be a Configure test for double-dots in filenames.
@@ -6975,6 +6767,58 @@ else
        installbin="$binexp"
 fi
 
+echo " "
+case "$extras" in
+'') dflt='n';;
+*) dflt='y';;
+esac
+cat <<EOM
+Perl can be built with extra modules or bundles of modules which
+will be fetched from the CPAN and installed alongside Perl.
+
+Notice that you will need access to the CPAN; either via the Internet,
+or a local copy, for example a CD-ROM or a local CPAN mirror.  (You will
+be asked later to configure the CPAN.pm module which will in turn do
+the installation of the rest of the extra modules or bundles.)
+
+Notice also that if the modules require any external software such as
+libraries and headers (the libz library and the zlib.h header for the
+Compress::Zlib module, for example) you MUST have any such software
+already installed, this configuration process will NOT install such
+things for you.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+rp='Install any extra modules (y or n)?'
+. ./myread
+case "$ans" in
+y|Y)
+       cat <<EOM
+
+Please list any extra modules or bundles to be installed from CPAN,
+with spaces between the names.  The names can be in any format the
+'install' command of CPAN.pm will understand.  (Answer 'none',
+without the quotes, to install no extra modules or bundles.)
+EOM
+       rp='Extras?'
+       dflt="$extras"
+       . ./myread
+       extras="$ans"
+esac
+case "$extras" in
+''|'none')
+       val=''
+       $rm -f ../extras.lst
+       ;;
+*)     echo "(Saving the list of extras for later...)"
+       echo "$extras" > ../extras.lst
+       val="'$extras'"
+       ;;
+esac
+set extras
+eval $setvar
+echo " "
+
 : Find perl5.005 or later.
 echo "Looking for a previously installed perl5.005 or later... "
 case "$perl5" in
@@ -7207,6 +7051,7 @@ EOM
                    esac
                        ;;
                *)  case "$osname" in
+                       darwin) dflt='none' ;;
                        svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
                        *)      dflt='-fpic' ;;
                    esac ;;
@@ -7567,8 +7412,9 @@ esac
 echo " "
 case "$sysman" in
 '') 
-       syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
-       syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
+       syspath='/usr/share/man/man1 /usr/man/man1'
+       syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
+       syspath="$syspath /usr/man/u_man/man1"
        syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
        syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
        syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
@@ -7600,7 +7446,8 @@ case "$man1dir" in
 ' ') dflt=none
        ;;
 '')
-       lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
+       lookpath="$prefixexp/share/man/man1"
+       lookpath="$lookpath $prefixexp/man/man1 $prefixexp/man/l_man/man1"
        lookpath="$lookpath $prefixexp/man/p_man/man1"
        lookpath="$lookpath $prefixexp/man/u_man/man1"
        lookpath="$lookpath $prefixexp/man/man.1"
@@ -8184,63 +8031,297 @@ case "$startperl" in
 *)     echo "I'll use $perlpath in \"eval 'exec'\"" ;;
 esac
 
-: determine where public executable scripts go
-set scriptdir scriptdir
-eval $prefixit
-case "$scriptdir" in
-'')
-       dflt="$bin"
-       : guess some guesses
-       $test -d /usr/share/scripts && dflt=/usr/share/scripts
-       $test -d /usr/share/bin     && dflt=/usr/share/bin
-       $test -d /usr/local/script  && dflt=/usr/local/script
-       $test -d /usr/local/scripts && dflt=/usr/local/scripts
-       $test -d $prefixexp/script  && dflt=$prefixexp/script
-       set dflt
-       eval $prefixup
-       ;;
-*)  dflt="$scriptdir"
+: determine where public executable scripts go
+set scriptdir scriptdir
+eval $prefixit
+case "$scriptdir" in
+'')
+       dflt="$bin"
+       : guess some guesses
+       $test -d /usr/share/scripts && dflt=/usr/share/scripts
+       $test -d /usr/share/bin     && dflt=/usr/share/bin
+       $test -d /usr/local/script  && dflt=/usr/local/script
+       $test -d /usr/local/scripts && dflt=/usr/local/scripts
+       $test -d $prefixexp/script  && dflt=$prefixexp/script
+       set dflt
+       eval $prefixup
+       ;;
+*)  dflt="$scriptdir"
+       ;;
+esac
+$cat <<EOM
+Some installations have a separate directory just for executable scripts so
+that they can mount it across multiple architectures but keep the scripts in
+one spot.  You might, for example, have a subdirectory of /usr/share for this.
+Or you might just lump your scripts in with all your other executables.
+EOM
+fn=d~
+rp='Where do you keep publicly executable scripts?'
+. ./getfile
+if $test "X$ansexp" != "X$scriptdirexp"; then
+       installscript=''
+fi
+scriptdir="$ans"
+scriptdirexp="$ansexp"
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+       installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
+else
+       installscript="$scriptdirexp"
+fi
+
+: determine where add-on public executables go
+case "$sitebin" in
+'')    dflt=$siteprefix/bin ;;
+*)     dflt=$sitebin ;;
+esac
+fn=d~
+rp='Pathname where the add-on public executables should be installed?'
+. ./getfile
+sitebin="$ans"
+sitebinexp="$ansexp"
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+       installsitebin=`echo $sitebinexp | sed "s#^$prefix#$installprefix#"`
+else
+       installsitebin="$sitebinexp"
+fi
+
+: define an is-a-typedef? function
+typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
+case "$inclist" in
+"") inclist="sys/types.h";;
+esac;
+eval "varval=\$$var";
+case "$varval" in
+"")
+       $rm -f temp.c;
+       for inc in $inclist; do
+               echo "#include <$inc>" >>temp.c;
+       done;
+       echo "#ifdef $type" >> temp.c;
+       echo "printf(\"We have $type\");" >> temp.c;
+       echo "#endif" >> temp.c;
+       $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
+       if $contains $type temp.E >/dev/null 2>&1; then
+               eval "$var=\$type";
+       else
+               eval "$var=\$def";
+       fi;
+       $rm -f temp.?;;
+*) eval "$var=\$varval";;
+esac'
+
+: define an is-a-typedef? function that prompts if the type is not available.
+typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
+case "$inclist" in
+"") inclist="sys/types.h";;
+esac;
+eval "varval=\$$var";
+case "$varval" in
+"")
+       $rm -f temp.c;
+       for inc in $inclist; do
+               echo "#include <$inc>" >>temp.c;
+       done;
+       echo "#ifdef $type" >> temp.c;
+       echo "printf(\"We have $type\");" >> temp.c;
+       echo "#endif" >> temp.c;
+       $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
+       echo " " ;
+       echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
+       if $contains $type temp.E >/dev/null 2>&1; then
+               echo "$type found." >&4;
+               eval "$var=\$type";
+       else
+               echo "$type NOT found." >&4;
+               dflt="$def";
+               . ./myread ;
+               eval "$var=\$ans";
+       fi;
+       $rm -f temp.?;;
+*) eval "$var=\$varval";;
+esac'
+
+: see what type lseek is declared as in the kernel
+rp="What is the type used for lseek's offset on this system?"
+set off_t lseektype long stdio.h sys/types.h
+eval $typedef_ask
+
+echo " "
+echo "Checking to see how big your file offsets are..." >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#include <stdio.h>
+int main()
+{
+    printf("%d\n", (int)sizeof($lseektype));
+    return(0); 
+}
+EOCP
+set try
+if eval $compile_ok; then
+       lseeksize=`$run ./try`
+       echo "Your file offsets are $lseeksize bytes long."
+else
+       dflt=$longsize
+       echo " "
+       echo "(I can't seem to compile the test program.  Guessing...)"
+       rp="What is the size of your file offsets (in bytes)?"
+       . ./myread
+       lseeksize="$ans"
+fi
+$rm -f try.c try
+
+: see what type file positions are declared as in the library
+rp="What is the type for file position used by fsetpos()?"
+set fpos_t fpostype long stdio.h sys/types.h
+eval $typedef_ask
+
+echo " "
+case "$fpostype" in
+*_t) zzz="$fpostype"   ;;
+*)   zzz="fpos_t"      ;;
+esac
+echo "Checking the size of $zzz..." >&4 
+cat > try.c <<EOCP
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+    printf("%d\n", (int)sizeof($fpostype));
+    exit(0);
+}
+EOCP
+set try
+if eval $compile_ok; then
+       yyy=`$run ./try`
+       case "$yyy" in
+       '')     fpossize=4
+               echo "(I can't execute the test program--guessing $fpossize.)" >&4
+               ;;
+       *)      fpossize=$yyy
+               echo "Your $zzz is $fpossize bytes long."
+               ;;
+       esac
+else
+       dflt="$longsize"
+       echo " " >&4
+       echo "(I can't compile the test program.  Guessing...)" >&4
+       rp="What is the size of your file positions (in bytes)?"
+       . ./myread
+       fpossize="$ans"
+fi
+
+
+
+# Backward compatibility (uselfs is deprecated).
+case "$uselfs" in
+"$define"|true|[yY]*)
+       cat <<EOM >&4
+
+*** Configure -Duselfs is deprecated, using -Duselargefiles instead.
+EOM
+       uselargefiles="$define"
        ;;
-esac
-$cat <<EOM
-Some installations have a separate directory just for executable scripts so
-that they can mount it across multiple architectures but keep the scripts in
-one spot.  You might, for example, have a subdirectory of /usr/share for this.
-Or you might just lump your scripts in with all your other executables.
+esac                          
+
+case "$lseeksize:$fpossize" in
+8:8) cat <<EOM
+
+You can have files larger than 2 gigabytes.
 EOM
-fn=d~
-rp='Where do you keep publicly executable scripts?'
-. ./getfile
-if $test "X$ansexp" != "X$scriptdirexp"; then
-       installscript=''
-fi
-scriptdir="$ans"
-scriptdirexp="$ansexp"
-: Change installation prefix, if necessary.
-if $test X"$prefix" != X"$installprefix"; then
-       installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
-else
-       installscript="$scriptdirexp"
-fi
+   val="$define" ;;
+*)    case "$uselargefiles" in
+   "$undef"|false|[nN]*) dflt='n' ;;
+   *)  dflt='y' ;;
+   esac
+   cat <<EOM
 
-: determine where add-on public executables go
-case "$sitebin" in
-'')    dflt=$siteprefix/bin ;;
-*)     dflt=$sitebin ;;
+Perl can be built to understand large files (files larger than 2 gigabytes)
+on some systems.  To do so, Configure can be run with -Duselargefiles.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+   rp='Try to understand large files, if available?'
+   . ./myread
+   case "$ans" in
+   y|Y)        val="$define" ;;
+   *)          val="$undef"  ;;
+   esac
+   ;;
+esac
+set uselargefiles
+eval $setvar
+case "$uselargefiles" in
+"$define")
+: Look for a hint-file generated 'call-back-unit'.  If the
+: user has specified that a large files perl is to be built,
+: we may need to set or change some other defaults.
+       if $test -f uselargefiles.cbu; then
+               echo "Your platform has some specific hints for large file builds, using them..."
+               . ./uselargefiles.cbu
+               echo " "
+               echo "Rechecking to see how big your file offsets are..." >&4
+               $cat >try.c <<EOCP
+#include <sys/types.h>
+#include <stdio.h>
+int main()
+{
+    printf("%d\n", (int)sizeof($lseektype));
+    return(0); 
+}
+EOCP
+               set try
+               if eval $compile_ok; then
+                       lseeksize=`$run ./try`
+                       $echo "Your file offsets are now $lseeksize bytes long."
+               else
+                       dflt="$lseeksize"
+                       echo " "
+                       echo "(I can't seem to compile the test program.  Guessing...)"
+                       rp="What is the size of your file offsets (in bytes)?"
+                       . ./myread
+                       lseeksize="$ans"
+               fi
+               case "$fpostype" in
+               *_t) zzz="$fpostype"    ;;
+               *)   zzz="fpos_t"       ;;
+               esac
+               $echo $n "Rechecking the size of $zzz...$c" >&4 
+               $cat > try.c <<EOCP
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+    printf("%d\n", (int)sizeof($fpostype));
+    exit(0);
+}
+EOCP
+               set try
+               if eval $compile_ok; then
+                       yyy=`$run ./try`
+                       dflt="$lseeksize"
+                       case "$yyy" in
+                       '')     echo " "
+                               echo "(I can't execute the test program--guessing $fpossize.)" >&4
+                               ;;
+                       *)      fpossize=$yyy
+                               echo " $fpossize bytes." >&4
+                               ;;
+                       esac
+               else
+                       dflt="$fpossize"
+                       echo " "
+                       echo "(I can't compile the test program.  Guessing...)" >&4
+                       rp="What is the size of your file positions (in bytes)?"
+                       . ./myread
+                       fpossize="$ans"
+               fi
+               $rm -f try.c try
+       fi
+       ;;
 esac
-fn=d~
-rp='Pathname where the add-on public executables should be installed?'
-. ./getfile
-sitebin="$ans"
-sitebinexp="$ansexp"
-: Change installation prefix, if necessary.
-if $test X"$prefix" != X"$installprefix"; then
-       installsitebin=`echo $sitebinexp | sed "s#^$prefix#$installprefix#"`
-else
-       installsitebin="$sitebinexp"
-fi
 
 case "$vendorprefix" in
 '')    d_vendorbin="$undef"
@@ -9035,6 +9116,10 @@ eval $inlibc
 set chsize d_chsize
 eval $inlibc
 
+: see if class exists
+set class d_class
+eval $inlibc
+
 hasstruct='varname=$1; struct=$2; shift; shift;
 while $test $# -ge 2; do
        case "$1" in
@@ -9647,6 +9732,7 @@ case "$o_nonblock" in
        $cat head.c > try.c
        $cat >>try.c <<'EOCP'
 #include <stdio.h>
+#include <stdlib.h>
 int main() {
 #ifdef O_NONBLOCK
        printf("O_NONBLOCK\n");
@@ -9688,6 +9774,7 @@ case "$eagain" in
 #include <sys/types.h>
 #include <signal.h>
 #include <stdio.h> 
+#include <stdlib.h> 
 #define MY_O_NONBLOCK $o_nonblock
 #ifndef errno  /* XXX need better Configure test */
 extern int errno;
@@ -9824,6 +9911,10 @@ EOCP
 esac
 $rm -f try try.* .out core head.c mtry
 
+: see if fchdir exists
+set fchdir d_fchdir
+eval $inlibc
+
 : see if fchmod exists
 set fchmod d_fchmod
 eval $inlibc
@@ -9838,10 +9929,12 @@ eval $inlibc
 
 echo " "
 : See if fcntl-based locking works.
-$cat >try.c <<'EOCP'
+$cat >try.c <<EOCP
 #include <stdlib.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <signal.h>
+$signal_t blech(x) int x; { exit(3); }
 int main() {
 #if defined(F_SETLK) && defined(F_SETLKW)
      struct flock flock;
@@ -9850,6 +9943,8 @@ int main() {
      flock.l_type = F_RDLCK;
      flock.l_whence = SEEK_SET;
      flock.l_start = flock.l_len = 0;
+     signal(SIGALRM, blech);
+     alarm(10);
      retval = fcntl(fd, F_SETLK, &flock);
      close(fd);
      (retval < 0 ? exit(2) : exit(0));
@@ -9869,6 +9964,18 @@ case "$d_fcntl" in
                else
                        echo "Nope, it didn't work."
                        val="$undef"
+                       case "$?" in
+                       3) $cat >&4 <<EOM
+***
+*** I had to forcibly timeout from fcntl(..., F_SETLK, ...).
+*** This is (almost) impossible.
+*** If your NFS lock daemons are not feeling well, something like
+*** this may happen, please investigate.  Cannot continue, aborting.
+***
+EOM
+                               exit 1
+                               ;;
+                       esac
                fi
        else
                echo "I'm unable to compile the test program, so I'll assume not."
@@ -10050,6 +10157,14 @@ $rm -f try try.*
 set fgetpos d_fgetpos
 eval $inlibc
 
+: see if finite exists
+set finite d_finite
+eval $inlibc
+
+: see if finitel exists
+set finitel d_finitel
+eval $inlibc
+
 : see if flock exists
 set flock d_flock
 eval $inlibc
@@ -10087,6 +10202,10 @@ eval $hasproto
 set fork d_fork
 eval $inlibc
 
+: see if fp_class exists
+set fp_class d_fp_class
+eval $inlibc
+
 : see if pathconf exists
 set pathconf d_pathconf
 eval $inlibc
@@ -10095,6 +10214,18 @@ eval $inlibc
 set fpathconf d_fpathconf
 eval $inlibc
 
+: see if fpclass exists
+set fpclass d_fpclass
+eval $inlibc
+
+: see if fpclassify exists
+set fpclassify d_fpclassify
+eval $inlibc
+
+: see if fpclassl exists
+set fpclassl d_fpclassl
+eval $inlibc
+
 
 : check for fpos64_t
 echo " "
@@ -10495,10 +10626,6 @@ esac
 set d_htonl
 eval $setvar
 
-: see if iconv exists
-set iconv d_iconv
-eval $inlibc
-
 : index or strchr
 echo " "
 if set index val -f; eval $csym; $val; then
@@ -10561,6 +10688,14 @@ set d_isascii
 eval $setvar
 $rm -f isascii*
 
+: see if isfinite exists
+set isfinite d_isfinite
+eval $inlibc
+
+: see if isinf exists
+set isinf d_isinf
+eval $inlibc
+
 : see if isnan exists
 set isnan d_isnan
 eval $inlibc
@@ -10794,7 +10929,7 @@ EOCP
                d_modfl="$undef"
        fi
        case "$osname:$gccversion" in
-       aix:)   $ccflags="saveccflags" ;; # restore
+       aix:)   ccflags="$saveccflags" ;; # restore
        esac
        ;;
 esac
@@ -10878,6 +11013,14 @@ eval $inlibc
 set nice d_nice
 eval $inlibc
 
+: see if this is a langinfo.h system
+set langinfo.h i_langinfo
+eval $inhdr
+
+: see if nl_langinfo exists
+set nl_langinfo d_nl_langinfo
+eval $inlibc
+
 : check for length of character
 echo " "
 case "$charsize" in
@@ -11278,6 +11421,10 @@ eval $inlibc
 set poll d_poll
 eval $inlibc
 
+: see if pthread_atfork exists
+set pthread_atfork d_pthread_atfork
+eval $inlibc
+
 
 : see whether the various POSIXish _yields exist
 $cat >try.c <<EOP
@@ -11493,12 +11640,14 @@ set i_memory
 eval $setvar
 
 : can bcopy handle overlapping blocks?
+echo " "
 val="$undef"
-case "$d_bcopy" in
-"$define")
-       echo " "
-       echo "Checking to see if your bcopy() can do overlapping copies..." >&4
-       $cat >try.c <<EOCP
+case "$d_memmove" in
+"$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
+*)     case "$d_bcopy" in
+       "$define")
+               echo "Checking to see if bcopy() can do overlapping copies..." >&4
+               $cat >try.c <<EOCP
 #$i_memory I_MEMORY
 #$i_stdlib I_STDLIB
 #$i_string I_STRING
@@ -11528,6 +11677,8 @@ int len;
 int off;
 int align;
 
+/* Copy "abcde..." string to char abc[] so that gcc doesn't
+   try to store the string in read-only memory. */
 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
 
 for (align = 7; align >= 0; align--) {
@@ -11545,36 +11696,34 @@ for (align = 7; align >= 0; align--) {
 exit(0);
 }
 EOCP
-       set try
-       if eval $compile_ok; then
-               if $run ./try 2>/dev/null; then
-                       echo "Yes, it can."
-                       val="$define"
+               set try
+               if eval $compile_ok; then
+                       if ./try 2>/dev/null; then
+                               echo "Yes, it can."
+                               val="$define"
+                       else
+                               echo "It can't, sorry."
+                       fi
                else
-                       echo "It can't, sorry."
-                       case "$d_memmove" in
-                       "$define") echo "But that's Ok since you have memmove()." ;;
-                       esac
+                       echo "(I can't compile the test program, so we'll assume not...)"
                fi
-       else
-               echo "(I can't compile the test program, so we'll assume not...)"
-               case "$d_memmove" in
-               "$define") echo "But that's Ok since you have memmove()." ;;
-               esac
-       fi
+               ;;
+       esac
+       $rm -f try.* try core
        ;;
 esac
-$rm -f try.* try core
 set d_safebcpy
 eval $setvar
 
 : can memcpy handle overlapping blocks?
+echo " "
 val="$undef"
-case "$d_memcpy" in
-"$define")
-       echo " "
-       echo "Checking to see if your memcpy() can do overlapping copies..." >&4
-       $cat >try.c <<EOCP
+case "$d_memmove" in
+"$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
+*)     case "$d_memcpy" in
+       "$define")
+               echo "Checking to see if memcpy() can do overlapping copies..." >&4
+               $cat >try.c <<EOCP
 #$i_memory I_MEMORY
 #$i_stdlib I_STDLIB
 #$i_string I_STRING
@@ -11623,26 +11772,22 @@ for (align = 7; align >= 0; align--) {
 exit(0);
 }
 EOCP
-       set try
-       if eval $compile_ok; then
-               if $run ./try 2>/dev/null; then
-                       echo "Yes, it can."
-                       val="$define"
+               set try
+               if eval $compile_ok; then
+                       if ./try 2>/dev/null; then
+                               echo "Yes, it can."
+                               val="$define"
+                       else
+                               echo "It can't, sorry."
+                       fi
                else
-                       echo "It can't, sorry."
-                       case "$d_memmove" in
-                       "$define") echo "But that's Ok since you have memmove()." ;;
-                       esac
+                       echo "(I can't compile the test program, so we'll assume not...)"
                fi
-       else
-               echo "(I can't compile the test program, so we'll assume not...)"
-               case "$d_memmove" in
-               "$define") echo "But that's Ok since you have memmove()." ;;
-               esac
-       fi
+               ;;
+       esac
+       $rm -f try.* try core
        ;;
 esac
-$rm -f try.* try core
 set d_safemcpy
 eval $setvar
 
@@ -12094,10 +12239,15 @@ esac
 case "$d_sfio" in
 $define) ;;
 *)     : Remove sfio from list of libraries to use
-       set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
-       shift
-       libs="$*"
-       echo "libs = $libs" >&4
+       case "$libs" in
+       *-lsfio*)
+               echo "Removing unneeded -lsfio from library list" >&4
+               set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'`
+               shift
+               libs="$*"
+               echo "libs = $libs" >&4
+               ;;
+       esac
 ;;
 esac
 
@@ -13184,6 +13334,10 @@ eval $inlibc
 set umask d_umask
 eval $inlibc
 
+: see if unordered exists
+set unordered d_unordered
+eval $inlibc
+
 : see if usleep exists
 set usleep d_usleep
 eval $inlibc
@@ -15659,8 +15813,12 @@ esac
 set i_fcntl
 eval $setvar
 
-: see if this is a iconv.h system
-set iconv.h i_iconv
+: see if this is a fp.h system
+set fp.h i_fp
+eval $inhdr
+
+: see if this is a fp_class.h system
+set fp_class.h i_fp_class
 eval $inhdr
 
 : see if this is a ieeefp.h system
@@ -16198,11 +16356,16 @@ for xxx in $known_extensions ; do
                $define) avail_ext="$avail_ext $xxx" ;;
                esac
                ;;
+       I18N/Langinfo|i18n_lan)
+               case "$i_langinfo$d_nl_langinfo" in 
+               $define$define) avail_ext="$avail_ext $xxx" ;;
+               esac
+               ;;
        NDBM_File|ndbm_fil)
                case "$i_ndbm" in
                $define)
                    case "$osname-$use64bitint" in
-                   hpux-define)
+                   cygwin-*|hpux-define)
                        case "$libs" in
                        *-lndbm*) avail_ext="$avail_ext $xxx" ;;
                        esac
@@ -16216,7 +16379,7 @@ for xxx in $known_extensions ; do
                case "${i_dbm}${i_rpcsvcdbm}" in
                *"${define}"*)
                    case "$osname-$use64bitint" in
-                   hpux-define)
+                   cygwin-*|hpux-define)
                        case "$libs" in
                        *-ldbm*) avail_ext="$avail_ext $xxx" ;;
                        esac
@@ -16255,6 +16418,14 @@ for xxx in $known_extensions ; do
                         esac
                esac
                ;;
+       threads)
+                case "$usethreads" in
+                true|$define|y)
+                        case "$useithreads" in
+                        $define|true|[yY]*) avail_ext="$avail_ext $xxx" ;;
+                        esac
+               esac
+               ;;
        IPC/SysV|ipc/sysv)
                : XXX Do we need a useipcsysv variable here
                case "${d_msg}${d_sem}${d_shm}" in 
@@ -16590,6 +16761,7 @@ d_charvspr='$d_charvspr'
 d_chown='$d_chown'
 d_chroot='$d_chroot'
 d_chsize='$d_chsize'
+d_class='$d_class'
 d_closedir='$d_closedir'
 d_cmsghdr_s='$d_cmsghdr_s'
 d_const='$d_const'
@@ -16615,6 +16787,7 @@ d_endpwent='$d_endpwent'
 d_endsent='$d_endsent'
 d_eofnblk='$d_eofnblk'
 d_eunice='$d_eunice'
+d_fchdir='$d_fchdir'
 d_fchmod='$d_fchmod'
 d_fchown='$d_fchown'
 d_fcntl='$d_fcntl'
@@ -16623,11 +16796,17 @@ d_fd_macros='$d_fd_macros'
 d_fd_set='$d_fd_set'
 d_fds_bits='$d_fds_bits'
 d_fgetpos='$d_fgetpos'
+d_finite='$d_finite'
+d_finitel='$d_finitel'
 d_flexfnam='$d_flexfnam'
 d_flock='$d_flock'
 d_flockproto='$d_flockproto'
 d_fork='$d_fork'
+d_fp_class='$d_fp_class'
 d_fpathconf='$d_fpathconf'
+d_fpclass='$d_fpclass'
+d_fpclassify='$d_fpclassify'
+d_fpclassl='$d_fpclassl'
 d_fpos64_t='$d_fpos64_t'
 d_frexpl='$d_frexpl'
 d_fs_data_s='$d_fs_data_s'
@@ -16678,11 +16857,12 @@ d_gnulibc='$d_gnulibc'
 d_grpasswd='$d_grpasswd'
 d_hasmntopt='$d_hasmntopt'
 d_htonl='$d_htonl'
-d_iconv='$d_iconv'
 d_index='$d_index'
 d_inetaton='$d_inetaton'
 d_int64_t='$d_int64_t'
 d_isascii='$d_isascii'
+d_isfinite='$d_isfinite'
+d_isinf='$d_isinf'
 d_isnan='$d_isnan'
 d_isnanl='$d_isnanl'
 d_killpg='$d_killpg'
@@ -16729,6 +16909,7 @@ d_msync='$d_msync'
 d_munmap='$d_munmap'
 d_mymalloc='$d_mymalloc'
 d_nice='$d_nice'
+d_nl_langinfo='$d_nl_langinfo'
 d_nv_preserves_uv='$d_nv_preserves_uv'
 d_nv_preserves_uv_bits='$d_nv_preserves_uv_bits'
 d_off64_t='$d_off64_t'
@@ -16743,6 +16924,7 @@ d_phostname='$d_phostname'
 d_pipe='$d_pipe'
 d_poll='$d_poll'
 d_portable='$d_portable'
+d_pthread_atfork='$d_pthread_atfork'
 d_pthread_yield='$d_pthread_yield'
 d_pwage='$d_pwage'
 d_pwchange='$d_pwchange'
@@ -16867,6 +17049,7 @@ d_ualarm='$d_ualarm'
 d_umask='$d_umask'
 d_uname='$d_uname'
 d_union_semun='$d_union_semun'
+d_unordered='$d_unordered'
 d_usleep='$d_usleep'
 d_usleepproto='$d_usleepproto'
 d_ustat='$d_ustat'
@@ -16907,6 +17090,7 @@ eunicefix='$eunicefix'
 exe_ext='$exe_ext'
 expr='$expr'
 extensions='$extensions'
+extras='$extras'
 fflushNULL='$fflushNULL'
 fflushall='$fflushall'
 find='$find'
@@ -16951,11 +17135,13 @@ i_dld='$i_dld'
 i_dlfcn='$i_dlfcn'
 i_fcntl='$i_fcntl'
 i_float='$i_float'
+i_fp='$i_fp'
+i_fp_class='$i_fp_class'
 i_gdbm='$i_gdbm'
 i_grp='$i_grp'
-i_iconv='$i_iconv'
 i_ieeefp='$i_ieeefp'
 i_inttypes='$i_inttypes'
+i_langinfo='$i_langinfo'
 i_libutil='$i_libutil'
 i_limits='$i_limits'
 i_locale='$i_locale'
@@ -17307,6 +17493,7 @@ vendorlibexp='$vendorlibexp'
 vendorprefix='$vendorprefix'
 vendorprefixexp='$vendorprefixexp'
 version='$version'
+version_patchlevel_string='$version_patchlevel_string'
 versiononly='$versiononly'
 vi='$vi'
 voidflags='$voidflags'