[PATCH 5.004_65] Config_65-02-03.diff: SunOS and Solaris hints
[p5sagit/p5-mst-13.2.git] / Configure
index afba27c..38072f0 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 Tue Feb 24 12:36:41 EST 1998 [metaconfig 3.0 PL70]
+# Generated on Thu May 28 12:01:39 EDT 1998 [metaconfig 3.0 PL70]
 
 cat >/tmp/c1$$ <<EOF
 ARGGGHHHH!!!!!
@@ -63,7 +63,7 @@ if test -d c:/. ; then
                p_=\;
                PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
                OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
-       elif test -n "$DJDIR"; then
+       elif test -n "$DJGPP"; then
                p_=\;
        fi
 fi
@@ -109,7 +109,7 @@ if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
 fi
 case "$inksh/$needksh" in
 /[a-z]*)
-               unset ENV
+               ENV=''
                changesh=true
                reason="$needksh"
        ;;
@@ -140,7 +140,7 @@ esac
 
 : Configure runs within the UU subdirectory
 test -d UU || mkdir UU
-unset CDPATH
+CDPATH=''
 cd UU && rm -f ./*
 
 dynamic_ext=''
@@ -176,7 +176,6 @@ emacs=''
 expr=''
 find=''
 flex=''
-gcc=''
 grep=''
 gzip=''
 inews=''
@@ -194,6 +193,7 @@ make=''
 mkdir=''
 more=''
 mv=''
+nm=''
 nroff=''
 perl=''
 pg=''
@@ -211,6 +211,7 @@ submit=''
 tail=''
 tar=''
 tbl=''
+tee=''
 test=''
 touch=''
 tr=''
@@ -248,6 +249,7 @@ obj_ext=''
 path_sep=''
 afs=''
 alignbytes=''
+ansi2knr=''
 archlib=''
 archlibexp=''
 d_archlib=''
@@ -258,8 +260,6 @@ baserev=''
 bin=''
 binexp=''
 installbin=''
-bincompat3=''
-d_bincompat3=''
 byteorder=''
 cc=''
 gccversion=''
@@ -306,6 +306,10 @@ d_dlsymun=''
 d_dosuid=''
 d_suidsafe=''
 d_dup2=''
+d_endhent=''
+d_endnent=''
+d_endpent=''
+d_endsent=''
 d_fchmod=''
 d_fchown=''
 d_fcntl=''
@@ -328,22 +332,39 @@ aphostname=''
 d_gethname=''
 d_phostname=''
 d_uname=''
+d_gethostprotos=''
 d_getlogin=''
 d_getnbyaddr=''
+d_getnbyname=''
+d_getnent=''
+d_getnetprotos=''
+d_getpent=''
 d_getpgid=''
 d_getpgrp2=''
 d_bsdgetpgrp=''
 d_getpgrp=''
 d_getppid=''
 d_getprior=''
+d_getpbyname=''
+d_getpbynumber=''
+d_getprotoprotos=''
+d_getsent=''
+d_getservprotos=''
+d_getsbyname=''
+d_getsbyport=''
 d_gnulibc=''
 d_htonl=''
 d_inetaton=''
 d_isascii=''
 d_killpg=''
+d_lchown=''
 d_link=''
 d_locconv=''
 d_lockf=''
+d_longdbl=''
+longdblsize=''
+d_longlong=''
+longlongsize=''
 d_lstat=''
 d_mblen=''
 d_mbstowcs=''
@@ -354,6 +375,7 @@ d_memmove=''
 d_memset=''
 d_mkdir=''
 d_mkfifo=''
+d_mkstemp=''
 d_mktime=''
 d_msg=''
 d_msgctl=''
@@ -389,8 +411,11 @@ d_semop=''
 d_setegid=''
 d_seteuid=''
 d_setgrps=''
+d_sethent=''
 d_setlinebuf=''
 d_setlocale=''
+d_setnent=''
+d_setpent=''
 d_setpgid=''
 d_setpgrp2=''
 d_bsdsetpgrp=''
@@ -402,7 +427,9 @@ d_setresuid=''
 d_setreuid=''
 d_setrgid=''
 d_setruid=''
+d_setsent=''
 d_setsid=''
+d_setvbuf=''
 d_sfio=''
 usesfio=''
 d_shm=''
@@ -454,6 +481,9 @@ d_times=''
 d_truncate=''
 d_tzname=''
 d_umask=''
+d_semctl_semid_ds=''
+d_semctl_semun=''
+d_union_semun=''
 d_vfork=''
 usevfork=''
 d_voidsig=''
@@ -472,6 +502,7 @@ dlsrc=''
 ld=''
 lddlflags=''
 usedl=''
+doublesize=''
 fpostype=''
 gidtype=''
 groupstype=''
@@ -506,6 +537,7 @@ d_pwchange=''
 d_pwclass=''
 d_pwcomment=''
 d_pwexpire=''
+d_pwgecos=''
 d_pwquota=''
 i_pwd=''
 i_sfio=''
@@ -612,6 +644,7 @@ installprivlib=''
 privlib=''
 privlibexp=''
 prototype=''
+ptrsize=''
 randbits=''
 installscript=''
 scriptdir=''
@@ -644,6 +677,7 @@ nm_so_opt=''
 runnm=''
 usenm=''
 useperlio=''
+d_oldpthreads=''
 usethreads=''
 incpath=''
 mips=''
@@ -765,7 +799,7 @@ locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
 inclwanted=''
 
 : Trailing extension.  Override this in a hint file, if needed.
-_exe='' 
+_exe=''
 : Extra object files, if any, needed on this platform.
 archobjs=''
 groupstype=''
@@ -775,7 +809,8 @@ useposix=true
 useopcode=true
 : set usethreads on the Configure command line to enable threads.
 : List of libraries we want.
-libswanted='sfio net socket inet nsl nm ndbm gdbm dbm db malloc dl'
+: If anyone needs -lnet, put it in a hint file.
+libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl'
 libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt"
 libswanted="$libswanted ucb bsd BSD PW x"
 : We probably want to search /usr/shlib before most other libraries.
@@ -1431,7 +1466,7 @@ if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
 fi
 if $needman; then
        cat <<EOH
+
 This installation shell script will examine your system and ask you questions
 to determine how the perl5 package should be installed. If you get
 stuck on a question, you may use a ! shell escape to start a subshell or
@@ -1522,8 +1557,12 @@ for dir in \$*; do
                echo \$thisthing
                exit 0
        elif test -f \$dir/\$thing.exe; then
-               : on Eunice apparently
-               echo \$dir/\$thing
+               if test -n "$DJGPP"; then
+                       echo \$dir/\$thing.exe
+               else
+                       : on Eunice apparently
+                       echo \$dir/\$thing
+               fi
                exit 0
        fi
        ;;
@@ -1566,10 +1605,12 @@ less
 line
 ln
 more
+nm
 nroff
 perl
 pg
 sendmail
+tee
 test
 uname
 zip
@@ -1783,7 +1824,8 @@ fi
 if test ! -f config.sh; then
        $cat <<EOM
 
-First time through, eh?  I have some defaults handy for the following systems:
+First time through, eh?  I have some defaults handy for some systems
+that need some extra help getting the Configure answers right:
 
 EOM
        (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/   /g' >&4
@@ -1841,6 +1883,12 @@ EOM
                                fi
                        fi
                        ;;
+               pc*)
+                       if test -n "$DJGPP"; then
+                               osname=dos
+                               osvers=djgpp
+                       fi
+                       ;;
                esac
 
                case "$1" in
@@ -1877,6 +1925,8 @@ EOM
                        *.08.*) osvers=9 ;;
                        *.09.*) osvers=9 ;;
                        *.10.*) osvers=10 ;;
+                       *.11.*) osvers=11 ;;
+                       *.12.*) osvers=12 ;;
                        *)      osvers="$3" ;;
                        esac
                        ;;
@@ -1978,11 +2028,11 @@ EOM
                        *)      if test -f /etc/systemid; then
                                        osname=sco
                                        set `echo $3 | $sed 's/\./ /g'` $4
-                                       if $test -f sco_$1_$2_$3.sh; then
+                                       if $test -f $src/hints/sco_$1_$2_$3.sh; then
                                                osvers=$1.$2.$3
-                                       elif $test -f sco_$1_$2.sh; then
+                                       elif $test -f $src/hints/sco_$1_$2.sh; then
                                                osvers=$1.$2
-                                       elif $test -f sco_$1.sh; then
+                                       elif $test -f $src/hints/sco_$1.sh; then
                                                osvers=$1
                                        fi
                                else
@@ -2015,10 +2065,6 @@ EOM
                        set X $myuname
                        osname=os2
                        osvers="$5"
-                       if test -n "$DJDIR"; then
-                               osname=dos
-                               osvers=djgpp
-                       fi
                fi
        fi
        
@@ -2056,23 +2102,44 @@ EOM
                        esac
                        ;;
                esac
+               if $test -f Policy.sh ; then
+                       case "$dflt" in
+                       *Policy*) ;;
+                       none) dflt="Policy" ;;
+                       *) dflt="Policy $dflt" ;;
+                       esac
+               fi
                ;;
        *)
                dflt=`echo $hintfile | $sed 's/\.sh$//'`
                ;;
        esac
 
+       if $test -f Policy.sh ; then
+               $cat <<EOM
+
+There's also a Policy hint file available, which should make the
+site-specific (policy) questions easier to answer.
+EOM
+
+       fi
+
        $cat <<EOM
 
 You may give one or more space-separated answers, or "none" if appropriate.
-If your OS version has no hints, DO NOT give a wrong version -- say "none".
+A well-behaved OS will have no hints, so answering "none" or just "Policy"
+is a good thing.  DO NOT give a wrong version.
 
 EOM
+
        rp="Which of these apply, if any?"
        . UU/myread
        tans=$ans
        for file in $tans; do
-               if $test -f $src/hints/$file.sh; then
+               if $test X$file = XPolicy -a -f Policy.sh; then
+                       . Policy.sh
+                       $cat Policy.sh >> UU/config.sh
+               elif $test -f $src/hints/$file.sh; then
                        . $src/hints/$file.sh
                        $cat $src/hints/$file.sh >> UU/config.sh
                elif $test X$tans = X -o X$tans = Xnone ; then
@@ -2228,6 +2295,19 @@ y|Y)     val="$define" ;;
 esac
 set usethreads
 eval $setvar 
+: Look for a hint-file generated 'call-back-unit'.  Now that the
+: user has specified if a threading perl is to be built, we may need 
+: to set or change some other defaults.
+if $test -f usethreads.cbu; then
+    . ./usethreads.cbu
+fi
+case "$d_oldpthreads" in
+'')    : Configure tests would be welcome here.  For now, assume undef.
+       val="$undef" ;;
+*)     val="$d_oldpthreads" ;;
+esac
+set d_oldpthreads
+eval $setvar
 
 : determine the architecture name
 echo " "
@@ -2654,8 +2734,8 @@ baserev=5.0
 echo " "
 echo "Getting the current patchlevel..." >&4
 if $test -r $rsrc/patchlevel.h;then
-       patchlevel=`awk '/PATCHLEVEL/ {print $3}' $rsrc/patchlevel.h`
-       subversion=`awk '/SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
+       patchlevel=`awk '/define[       ]+PATCHLEVEL/ {print $3}' $rsrc/patchlevel.h`
+       subversion=`awk '/define[       ]+SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
 else
        patchlevel=0
        subversion=0
@@ -2944,71 +3024,6 @@ esac
 set d_dosuid
 eval $setvar
 
-: determine where public executables go
-echo " "
-set dflt bin bin
-eval $prefixit
-fn=d~
-rp='Pathname where the public executables will reside?'
-. ./getfile
-if $test "X$ansexp" != "X$binexp"; then
-       installbin=''
-fi
-bin="$ans"
-binexp="$ansexp"
-if $afs; then
-       $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in which
-executables reside from the directory in which they are installed (and from
-which they are presumably copied to the former directory by occult means).
-
-EOM
-       case "$installbin" in
-       '') dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;;
-       *) dflt="$installbin";;
-       esac
-       fn=de~
-       rp='Where will public executables be installed?'
-       . ./getfile
-       installbin="$ans"
-else
-       installbin="$binexp"
-fi
-
-
-: Binary compatibility with 5.003 is not possible with 5.004_50 and later.
-if test $patchlevel -ge 4 -o $subversion -ge 50; then
-    val=$undef
-else
-       $cat <<EOM
-
-Perl 5.004 can be compiled for binary compatibility with 5.003.
-If you decide to do so, you will be able to continue using any
-extensions that were compiled for Perl 5.003.  However, binary
-compatibility forces Perl to expose some of its internal symbols
-in the same way that 5.003 did.  So you may have symbol conflicts
-if you embed a binary-compatible Perl in other programs.
-
-EOM
-       case "$d_bincompat3" in
-       "$undef") dflt=n ;;
-       *) dflt=y ;;
-       esac
-       rp='Binary compatibility with Perl 5.003?'
-       . ./myread
-       case "$ans" in
-       y*) val="$define" ;;
-       *)  val="$undef" ;;
-       esac
-fi
-set d_bincompat3
-eval $setvar
-case "$d_bincompat3" in
-"$define") bincompat3=y ;;
-*) bincompat3=n ;;
-esac
-
 : determine where manual pages are on this system
 echo " "
 case "$sysman" in
@@ -3074,6 +3089,8 @@ put the appropriate flags later when it asks you for other cc and ld flags.
 Venix systems may wish to put "none" and let the compiler figure things out.
 (In the following question multiple model names should be space separated.)
 
+The default for most systems is "none".
+
 EOM
 rp="Which memory models are supported?"
 . ./myread
@@ -3192,8 +3209,9 @@ if ./usg; then
                esac;;
        *)  dflt="$cc";;
        esac
-       $cat <<'EOM'
-On some systems the default C compiler will not resolve multiple global
+       case "$dflt" in
+       *M*)    $cat <<'EOM'
+On some older systems the default C compiler will not resolve multiple global
 references that happen to have the same name.  On some such systems the "Mcc"
 command may be used to force these to be resolved.  On other systems a "cc -M"
 command is required.  (Note that the -M flag on other systems indicates a
@@ -3201,7 +3219,9 @@ memory model to use!) If you have the Gnu C compiler, you might wish to use
 that instead.
 
 EOM
-       rp="What command will force resolution on this system?"
+       ;;
+       esac
+       rp="Use which C compiler?"
        . ./myread
        cc="$ans"
 else
@@ -3213,6 +3233,12 @@ else
        . ./myread
        cc="$ans"
 fi
+: Look for a hint-file generated 'call-back-unit'.  Now that the
+: user has specified the compiler, we may need to set or change some
+: other defaults.
+if $test -f cc.cbu; then
+    . ./cc.cbu
+fi
 echo " "
 echo "Checking for GNU cc in disguise and/or its version number..." >&4
 $cat >gccvers.c <<EOM
@@ -3296,6 +3322,144 @@ 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 ..
+echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+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") ;;
+*) $rm -f $wrapper;;
+esac
+$rm -f testcpp.c testcpp.out
+
 : Set private lib path
 case "$plibpth" in
 '') if ./mips; then
@@ -3490,151 +3654,13 @@ none) libs=' ';;
 *) libs="$ans";;
 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 ..
-echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
-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") ;;
-*) $rm -f $wrapper;;
-esac
-$rm -f testcpp.c testcpp.out
-
-: determine optimize, if desired, or use for debug flag also
-case "$optimize" in
-' '|$undef) dflt='none';;
-'') dflt='-O';;
-*) dflt="$optimize";;
-esac
-$cat <<EOH
+: determine optimize, if desired, or use for debug flag also
+case "$optimize" in
+' '|$undef) dflt='none';;
+'') dflt='-O';;
+*) dflt="$optimize";;
+esac
+$cat <<EOH
 
 Some C compilers have problems with their optimizers.  By default, $package
 compiles with the -O flag to use the optimizer.  Alternately, you might want
@@ -3911,11 +3937,89 @@ n) echo "OK, that should do.";;
 esac
 $rm -f try try.* core
 
+: Cruising for prototypes
+echo " "
+echo "Checking out function prototypes..." >&4
+$cat >prototype.c <<'EOCP'
+main(int argc, char *argv[]) {
+       exit(0);}
+EOCP
+if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
+       echo "Your C compiler appears to support function prototypes."
+       val="$define"
+else
+       echo "Your C compiler doesn't seem to understand function prototypes."
+       val="$undef"
+fi
+set prototype
+eval $setvar
+$rm -f prototype*
+
+case "$prototype" in
+"$define") ;;
+*)     ansi2knr='ansi2knr'
+       echo " "
+       cat <<EOM >&4
+
+$me:  FATAL ERROR:
+This version of $package can only be compiled by a compiler that 
+understands function prototypes.  Unfortunately, your C compiler 
+       $cc $ccflags
+doesn't seem to understand them.  Sorry about that.
+
+If GNU cc is avaiable for your system, perhaps you could try that instead.  
+
+Eventually, we hope to support building Perl with pre-ANSI compilers.
+If you would like to help in that effort, please contact <perlbug@perl.org>.
+
+Aborting Configure now.
+EOM
+       exit 2
+       ;;
+esac
+
+: determine where public executables go
+echo " "
+set dflt bin bin
+eval $prefixit
+fn=d~
+rp='Pathname where the public executables will reside?'
+. ./getfile
+if $test "X$ansexp" != "X$binexp"; then
+       installbin=''
+fi
+bin="$ans"
+binexp="$ansexp"
+if $afs; then
+       $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+executables reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+       case "$installbin" in
+       '') dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;;
+       *) dflt="$installbin";;
+       esac
+       fn=de~
+       rp='Where will public executables be installed?'
+       . ./getfile
+       installbin="$ans"
+else
+       installbin="$binexp"
+fi
+
 : define a shorthand compile call
 compile='
 mc_file=$1;
 shift;
-$cc $optimize $ccflags $ldflags -o ${mc_file}$_exe $* ${mc_file}.c $libs > /dev/null 2>&1;'
+$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs > /dev/null 2>&1;'
+: define a shorthand compile call for compilations that should be ok.
+compile_ok='
+mc_file=$1;
+shift;
+$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs;'
 
 echo " "
 echo "Checking for GNU C Library..." >&4
@@ -3928,7 +4032,7 @@ main()
 EOM
 set gnulibc
 if eval $compile && \
-  ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then
+  ./gnulibc | $contains '^GNU C Library'; then
        val="$define"
        echo "You are using the GNU C Library"
 else
@@ -3942,12 +4046,26 @@ eval $setvar
 : see if nm is to be used to determine whether a symbol is defined or not
 case "$usenm" in
 '')
+       dflt=''
        case "$d_gnulibc" in
-       $define)
+       "$define")
+               echo " "
+               echo "nm probably won't work on the GNU C Library." >&4
                dflt=n
                ;;
-       *)
-               dflt=`egrep 'inlibc|csym' ../Configure | wc -l 2>/dev/null`
+       esac
+       case "$dflt" in
+       '') 
+               if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
+                       echo " "
+                       echo "Whoops!  This is an AIX system without /lib/syscalls.exp!" >&4
+                       echo "'nm' won't be sufficient on this sytem." >&4
+                       dflt=n
+               fi
+               ;;
+       esac
+       case "$dflt" in
+       '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
                if $test $dflt -gt 20; then
                        dflt=y
                else
@@ -3958,26 +4076,28 @@ case "$usenm" in
        ;;
 *)
        case "$usenm" in
-       true) dflt=y;;
+       true|$define) dflt=y;;
        *) dflt=n;;
        esac
        ;;
 esac
 $cat <<EOM
 
-I can use 'nm' to extract the symbols from your C libraries. This is a time
-consuming task which may generate huge output on the disk (up to 3 megabytes)
-but that should make the symbols extraction faster. The alternative is to skip
-the 'nm' extraction part and to compile a small test program instead to
-determine whether each symbol is present. If you have a fast C compiler and/or
-if your 'nm' output cannot be parsed, this may be the best solution.
-You shouldn't let me use 'nm' if you have the GNU C Library.
+I can use $nm to extract the symbols from your C libraries. This
+is a time consuming task which may generate huge output on the disk (up
+to 3 megabytes) but that should make the symbols extraction faster. The
+alternative is to skip the 'nm' extraction part and to compile a small
+test program instead to determine whether each symbol is present. If
+you have a fast C compiler and/or if your 'nm' output cannot be parsed,
+this may be the best solution.
+
+You probably shouldn't let me use 'nm' if you are using the GNU C Library.
 
 EOM
-rp='Shall I use nm to extract C symbols from the libraries?'
+rp="Shall I use $nm to extract C symbols from the libraries?"
 . ./myread
 case "$ans" in
-n|N) usenm=false;;
+[Nn]*) usenm=false;;
 *) usenm=true;;
 esac
 
@@ -4006,7 +4126,7 @@ esac
 case "$nm_so_opt" in
 '')    case "$myuname" in
        *linux*)
-               if nm --help | $grep 'dynamic' > /dev/null 2>&1; then
+               if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
                        nm_so_opt='--dynamic'
                fi
                ;;
@@ -4165,8 +4285,8 @@ $echo $n "This may take a while...$c" >&4
 
 for file in $*; do
        case $file in
-       *$so*) nm $nm_so_opt $nm_opt $file 2>/dev/null;;
-       *) nm $nm_opt $file 2>/dev/null;;
+       *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
+       *) $nm $nm_opt $file 2>/dev/null;;
        esac
 done >libc.tmp
 
@@ -4229,7 +4349,7 @@ elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
        $contains '^fprintf$' libc.list >/dev/null 2>&1; then
                eval $xrun
 else
-       nm -p $* 2>/dev/null >libc.tmp
+       $nm -p $* 2>/dev/null >libc.tmp
        $grep fprintf libc.tmp > libc.ptf
        if com="$sed -n -e 's/^.* [ADTSIW]  *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
                eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
@@ -4238,23 +4358,38 @@ else
                eval $xrun
        else
                echo " "
-               echo "nm didn't seem to work right. Trying ar instead..." >&4
+               echo "$nm didn't seem to work right. Trying $ar instead..." >&4
                com=''
-               if ar t $libc > libc.tmp; then
-                       for thisname in $libnames; do
-                               ar t $thisname >>libc.tmp
+               if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
+                       for thisname in $libnames $libc; do
+                               $ar t $thisname >>libc.tmp
                        done
                        $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
                        echo "Ok." >&4
+               elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
+                       # Repeat libc to extract forwarders to DLL entries too
+                       for thisname in $libnames $libc; do
+                               $ar tv $thisname >>libc.tmp
+                               # Revision 50 of EMX has bug in $ar.
+                               # it will not extract forwarders to DLL entries
+                               # Use emximp which will extract exactly them.
+                               emximp -o tmp.imp $thisname \
+                                   2>/dev/null && \
+                                   $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
+                                   < tmp.imp >>libc.tmp
+                               $rm tmp.imp
+                       done
+                       $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
+                       echo "Ok." >&4
                else
-                       echo "ar didn't seem to work right." >&4
+                       echo "$ar didn't seem to work right." >&4
                        echo "Maybe this is a Cray...trying bld instead..." >&4
                        if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
                        then
                                for thisname in $libnames; do
                                        bld t $libnames | \
                                        $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
-                                       ar t $thisname >>libc.tmp
+                                       $ar t $thisname >>libc.tmp
                                done
                                echo "Ok." >&4
                        else
@@ -4459,7 +4594,7 @@ $undef|n|false)
            $define) dflt='y' ;;
        esac
        : Does a dl_xxx.xs file exist for this operating system
-       $test -f ../$dldir/dl_${osname}.xs && dflt='y'
+       $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
        ;;
 esac
 rp="Do you wish to use dynamic loading?"
@@ -4469,7 +4604,7 @@ case "$ans" in
 y*) usedl="$define"
        case "$dlsrc" in
        '')
-               if $test -f ../$dldir/dl_${osname}.xs ; then
+               if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
                        dflt="$dldir/dl_${osname}.xs"
                elif $test "$d_dlopen" = "$define" ; then
                        dflt="$dldir/dl_dlopen.xs"
@@ -4484,15 +4619,17 @@ y*) usedl="$define"
        esac
     echo "The following dynamic loading files are available:"
        : Can not go over to $dldir because getfile has path hard-coded in.
-    cd ..; ls -C $dldir/dl*.xs; cd UU
-    rp="Source file to use for dynamic loading"
-    fn="fne"
-    . ./getfile
+       tdir=`pwd`; cd $rsrc; $ls -C $dldir/dl*.xs; cd $tdir
+       rp="Source file to use for dynamic loading"
+       fn="fne"
+       # XXX This getfile call will fail the existence check if you try 
+       # building away from $src (this is not supported yet).
+       . ./getfile
        usedl="$define"
        : emulate basename
        dlsrc=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@'`
 
-    $cat << EOM
+       $cat << EOM
 
 Some systems may require passing special flags to $cc -c to
 compile modules that will be used to create a shared library.
@@ -4674,10 +4811,6 @@ $undef)
                                ;;
                        esac
                        ;;
-               sunos)
-                       dflt=n
-                       also='Building a shared libperl will definitely not work on SunOS 4.'
-                       ;;
                *)      dflt=n
                        ;;
                esac
@@ -4709,12 +4842,14 @@ EOM
                # Why does next4 have to be so different?
                case "${osname}${osvers}" in
                next4*) xxx='DYLD_LIBRARY_PATH' ;;
+               os2*)   xxx='' ;; # Nothing special needed.
                *)              xxx='LD_LIBRARY_PATH' ;;
                esac
-               $cat <<EOM >&4
+               if test X"$xxx" != "X"; then
+                       $cat <<EOM  | $tee -a ../config.msg >&4
 
 To build perl, you must add the current working directory to your
-$xxx environtment variable before running make.  You can do
+$xxx environment variable before running make.  You can do
 this with
    $xxx=\`pwd\`; export $xxx
 for Bourne-style shells, or
@@ -4722,6 +4857,7 @@ for Bourne-style shells, or
 for Csh-style shells.  You *MUST* do this before running make.
 
 EOM
+               fi
                ;;
        *)      useshrplib='false' ;;
        esac
@@ -5968,7 +6104,7 @@ main()
 }
 EOCP
        set intsize
-       if eval $compile && ./intsize > /dev/null; then
+       if eval $compile_ok && ./intsize > /dev/null; then
                eval `./intsize`
                echo "Your integers are $intsize bytes long."
                echo "Your long integers are $longsize bytes long."
@@ -6045,33 +6181,40 @@ $rm -f $$.tmp
 : check for ability to cast large floats to 32-bit ints.
 echo " "
 echo 'Checking whether your C compiler can cast large floats to int32.' >&4
-if $test "$intsize" -eq 4; then
+if $test "$intsize" -ge 4; then
        xxx=int
 else
        xxx=long
 fi
 $cat >try.c <<EOCP
+#include <stdio.h>
 #include <sys/types.h>
 #include <signal.h>
-$signal_t blech() { exit(3); }
+$signal_t blech(s) int s; { exit(3); }
 main()
 {
        $xxx i32;
-       double f;
+       double f, g;
        int result = 0;
        signal(SIGFPE, blech);
 
-       f = (double) 0x7fffffff;
-       f = 10 * f;
-       i32  = ($xxx) f;
+       /* Don't let compiler optimize the test away */
+       sscanf("2147483647", "%lf", &f); /* f = (double) 0x7fffffff; */
+       g = 10 * f;
+       i32  = ($xxx) g;
 
+       /* x86 processors will probably give 0x8000 0000, which is a
+       sign change.  We don't want that.  We want to mimic SPARC
+          behavior here, which is to preserve the sign and give
+          back 0x7fff ffff.
+       */
        if (i32 != ($xxx) f)
                result |= 1;
        exit(result);
 }
 EOCP
 set try
-if eval $compile; then
+if eval $compile_ok; then
        ./try
        yyy=$?
 else
@@ -6094,20 +6237,26 @@ $rm -f try try.*
 echo " "
 echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
 $cat >try.c <<EOCP
+#include <stdio.h>
 #include <sys/types.h>
 #include <signal.h>
-$signal_t blech() { exit(7); }
-$signal_t blech_in_list() { exit(4); }
+$signal_t blech(s) int s; { exit(7); }
+$signal_t blech_in_list(s) int s; { exit(4); }
 unsigned long dummy_long(p) unsigned long p; { return p; }
 unsigned int dummy_int(p) unsigned int p; { return p; }
 unsigned short dummy_short(p) unsigned short p; { return p; }
 main()
 {
-       double f = -123.;
+       double f;
        unsigned long along;
        unsigned int aint;
        unsigned short ashort;
        int result = 0;
+       /* Frustrate gcc-2.7.2's optimizer which failed this test with
+          a direct f = -123. assignment.  gcc-2.8.0 reportedly
+          optimized the whole file away
+       */
+       sscanf("-123.", "%lf", &f);  /* f = -123.; */
 
        signal(SIGFPE, blech);
        along = (unsigned long)f;
@@ -6119,7 +6268,7 @@ main()
                result |= 1;
        if (ashort != (unsigned short)-123)
                result |= 1;
-       f = (double)0x40000000;
+       sscanf("1073741824.", "%lf", &f); /* f = (double)0x40000000; */
        f = f + f;
        along = 0;
        along = (unsigned long)f;
@@ -6138,7 +6287,7 @@ main()
        if (result)
                exit(result);
        signal(SIGFPE, blech_in_list);
-       f = 123.;
+       sscanf("123.", "%lf", &f);  /* f = 123.; */
        along = dummy_long((unsigned long)f);
        aint = dummy_int((unsigned int)f);
        ashort = dummy_short((unsigned short)f);
@@ -6153,7 +6302,7 @@ main()
 }
 EOCP
 set try
-if eval $compile; then
+if eval $compile_ok; then
        ./try
        castflags=$?
 else
@@ -6277,18 +6426,6 @@ fi
 set d_crypt
 eval $setvar
 
-: get csh whereabouts
-case "$csh" in
-'csh') val="$undef" ;;
-*) val="$define" ;;
-esac
-set d_csh
-eval $setvar
-: Respect a hint or command line value for full_csh.
-case "$full_csh" in
-'') full_csh=$csh ;;
-esac
-
 : see if cuserid exists
 set cuserid d_cuserid
 eval $inlibc
@@ -6416,7 +6553,7 @@ $define|y|true)
        $cat << EOM
 
 On a few systems, the dynamically loaded modules that perl generates and uses
-will need a different extension then shared libs. The default will probably
+will need a different extension than shared libs. The default will probably
 be appropriate.
 
 EOM
@@ -6520,6 +6657,22 @@ eval $setvar
 set dup2 d_dup2
 eval $inlibc
 
+: see if endhostent exists
+set endhostent d_endhent
+eval $inlibc
+
+: see if endnetent exists
+set endnetent d_endnent
+eval $inlibc
+
+: see if endprotoent exists
+set endprotoent d_endpent
+eval $inlibc
+
+: see if endservent exists
+set endservent d_endsent
+eval $inlibc
+
 : Locate the flags for 'open()'
 echo " "
 $cat >open3.c <<'EOCP'
@@ -6603,7 +6756,7 @@ main() {
 }
 EOCP
        set try
-       if eval $compile; then
+       if eval $compile_ok; then
                o_nonblock=`./try`
                case "$o_nonblock" in
                '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
@@ -6627,7 +6780,9 @@ case "$eagain" in
 #include <sys/types.h>
 #include <signal.h>
 #define MY_O_NONBLOCK $o_nonblock
+#ifndef errno  /* XXX need better Configure test */
 extern int errno;
+#endif
 $signal_t blech(x) int x; { exit(3); }
 EOCP
        $cat >> try.c <<'EOCP'
@@ -6682,7 +6837,7 @@ main()
 }
 EOCP
        set try
-       if eval $compile; then
+       if eval $compile_ok; then
                echo "$startsh" >mtry
                echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
                chmod +x mtry
@@ -6781,30 +6936,119 @@ eval $inlibc
 set fsetpos d_fsetpos
 eval $inlibc
 
+: see if gethostbyaddr exists
+set gethostbyaddr d_gethbyaddr
+eval $inlibc
+
+: see if gethostbyname exists
+set gethostbyname d_gethbyname
+eval $inlibc
+
 : see if gethostent exists
 set gethostent d_gethent
 eval $inlibc
 
+hasproto='varname=$1; func=$2; shift; shift;
+while $test $# -ge 2; do
+       case "$1" in
+       $define) echo "#include <$2>";;
+       esac ;
+    shift 2;
+done > try.c;
+$cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
+if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
+       echo "$func() prototype found.";
+       val="$define";
+else
+       echo "$func() prototype NOT found.";
+       val="$undef";
+fi;
+set $varname;
+eval $setvar;
+$rm -f try.c tryout.c'
+
+: see if this is a netdb.h system
+set netdb.h i_netdb
+eval $inhdr
+
+: see if prototypes for various gethostxxx netdb.h functions are available
+echo " "
+set d_gethostprotos gethostent $i_netdb netdb.h
+eval $hasproto
+
 : see if getlogin exists
 set getlogin d_getlogin
 eval $inlibc
 
-: see if getpgid exists
-set getpgid d_getpgid
+: see if getnetbyaddr exists
+set getnetbyaddr d_getnbyaddr
 eval $inlibc
 
-: see if getpgrp2 exists
-set getpgrp2 d_getpgrp2
+: see if getnetbyname exists
+set getnetbyname d_getnbyname
 eval $inlibc
 
-: see if getppid exists
-set getppid d_getppid
+: see if getnetent exists
+set getnetent d_getnent
 eval $inlibc
 
-: see if getpriority exists
-set getpriority d_getprior
+: see if prototypes for various getnetxxx netdb.h functions are available
+echo " "
+set d_getnetprotos getnetent $i_netdb netdb.h
+eval $hasproto
+
+
+: see if getprotobyname exists
+set getprotobyname d_getpbyname
 eval $inlibc
 
+: see if getprotobynumber exists
+set getprotobynumber d_getpbynumber
+eval $inlibc
+
+: see if getprotoent exists
+set getprotoent d_getpent
+eval $inlibc
+
+: see if getpgid exists
+set getpgid d_getpgid
+eval $inlibc
+
+: see if getpgrp2 exists
+set getpgrp2 d_getpgrp2
+eval $inlibc
+
+: see if getppid exists
+set getppid d_getppid
+eval $inlibc
+
+: see if getpriority exists
+set getpriority d_getprior
+eval $inlibc
+
+: see if prototypes for various getprotoxxx netdb.h functions are available
+echo " "
+set d_getprotoprotos getprotoent $i_netdb netdb.h
+eval $hasproto
+
+
+: see if getservbyname exists
+set getservbyname d_getsbyname
+eval $inlibc
+
+: see if getservbyport exists
+set getservbyport d_getsbyport
+eval $inlibc
+
+: see if getservent exists
+set getservent d_getsent
+eval $inlibc
+
+: see if prototypes for various getservxxx netdb.h functions are available
+echo " "
+set d_getservprotos getservent $i_netdb netdb.h
+eval $hasproto
+
 : see if gettimeofday or ftime exists
 set gettimeofday d_gettimeod
 eval $inlibc
@@ -6950,6 +7194,38 @@ $rm -f isascii*
 set killpg d_killpg
 eval $inlibc
 
+: see if lchown exists
+echo " "
+$cat > try.c <<'EOCP'
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char lchown(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char lchown();
+int main() {
+    /*  The GNU C library defines this for functions which it implements
+        to always fail with ENOSYS.  Some functions are actually named
+       something starting with __ and the normal name is an alias.  */
+#if defined (__stub_lchown) || defined (__stub___lchown)
+choke me
+#else
+lchown();
+#endif
+; return 0; }
+EOCP
+set try
+if eval $compile; then
+    $echo "lchown() found." >&4
+    val="$define"
+else
+    $echo "lchown() NOT found." >&4
+    val="$undef"
+fi
+set d_lchown
+eval $setvar
+
 : see if link exists
 set link d_link
 eval $inlibc
@@ -6962,6 +7238,92 @@ eval $inlibc
 set lockf d_lockf
 eval $inlibc
 
+: check for long doubles
+echo " "
+echo $n "Checking to see if your system supports long doubles...$c" >&4
+echo 'long double foo() { long double x; x = 7.0; return x; }' > try.c
+if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+       val="$define"
+       echo " Yup, it does." >&4
+else
+       val="$undef"
+       echo " Nope, it doesn't." >&4
+fi
+$rm try.*
+set d_longdbl
+eval $setvar
+
+: check for length of long double
+case "${d_longdbl}${longdblsize}" in
+$define)
+       echo " "
+       $echo $n "Checking to see how big your long doubles are...$c" >&4
+       $cat >try.c <<'EOCP'
+#include <stdio.h>
+main()
+{
+       printf("%d\n", sizeof(long double));
+}
+EOCP
+       set try
+       if eval $compile; then
+               longdblsize=`./try`
+               $echo " $longdblsize bytes." >&4
+       else
+               dflt='8'
+               echo " "
+               echo "(I can't seem to compile the test program.  Guessing...)" >&4
+               rp="What is the size of a long double (in bytes)?"
+               . ./myread
+               longdblsize="$ans"
+       fi
+       ;;
+esac
+$rm -f try.c try
+
+: check for long long
+echo " "
+echo $n "Checking to see if your system supports long long...$c" >&4
+echo 'long long foo() { long long x; x = 7; return x; }' > try.c
+if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+       val="$define"
+       echo " Yup, it does." >&4
+else
+       val="$undef"
+       echo " Nope, it doesn't." >&4
+fi
+$rm try.*
+set d_longlong
+eval $setvar
+
+: check for length of long long
+case "${d_longlong}${longlongsize}" in
+$define)
+       echo " "
+       $echo $n "Checking to see how big your long longs are...$c" >&4
+       $cat >try.c <<'EOCP'
+#include <stdio.h>
+main()
+{
+       printf("%d\n", sizeof(long long));
+}
+EOCP
+       set try
+       if eval $compile_ok; then
+               longlongsize=`./try`
+               $echo " $longlongsize bytes." >&4
+       else
+               dflt='8'
+               echo " "
+               echo "(I can't seem to compile the test program.  Guessing...)"
+               rp="What is the size of a long long (in bytes)?"
+               . ./myread
+               longlongsize="$ans"
+       fi
+       ;;
+esac
+$rm -f try.c try
+
 : see if lstat exists
 set lstat d_lstat
 eval $inlibc
@@ -7002,6 +7364,10 @@ eval $inlibc
 set mkfifo d_mkfifo
 eval $inlibc
 
+: see if mkstemp exists
+set mkstemp d_mkstemp
+eval $inlibc
+
 : see if mktime exists
 set mktime d_mktime
 eval $inlibc
@@ -7177,8 +7543,8 @@ eval $setvar
 $rm -f try try.*
 
 : test whether pthreads are created in joinable -- aka undetached -- state
-if test "X$usethreads" != X; then
-       echo >&4 "Checking whether pthreads are created joinable."
+if test "X$usethreads" = "X$define"; then
+       echo $n "Checking whether pthreads are created joinable. $c" >&4 
        $cat >try.c <<'EOCP'
 #include <pthread.h>
 #include <stdio.h>
@@ -7197,11 +7563,12 @@ EOCP
        if eval $compile; then
                yyy=`./try`
                case "$yyy" in
-                       detached) echo "Nope, they aren't." ;;
-                       *) echo "Yup, they are." ;;
+                       detached) echo "Nope, they aren't." >&4 ;;
+                       *) echo "Yup, they are." >&4 ;;
                esac
        else
-               echo "(I can't execute the test program--assuming they are.)"
+               echo " "
+               echo "(I can't execute the test program--assuming they are.)" >&4
                yyy=joinable
        fi
        $rm -f try try.*
@@ -7272,6 +7639,14 @@ $define)
        set d_pwcomment
        eval $setvar
 
+       if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
+               val="$define"
+       else
+               val="$undef"
+       fi
+       set d_pwgecos
+       eval $setvar
+
        $rm -f $$.h
        ;;
 *)
@@ -7282,6 +7657,7 @@ $define)
        set d_pwclass; eval $setvar
        set d_pwexpire; eval $setvar
        set d_pwcomment; eval $setvar
+       set d_pwgecos; eval $setvar
        ;;
 esac
 
@@ -7385,7 +7761,7 @@ exit(0);
 }
 EOCP
        set try
-       if eval $compile; then
+       if eval $compile_ok; then
                if ./try 2>/dev/null; then
                        echo "Yes, it can."
                        val="$define"
@@ -7463,7 +7839,7 @@ exit(0);
 }
 EOCP
        set try
-       if eval $compile; then
+       if eval $compile_ok; then
                if ./try 2>/dev/null; then
                        echo "Yes, it can."
                        val="$define"
@@ -7523,7 +7899,7 @@ exit(0);
 }
 EOCP
        set try
-       if eval $compile; then
+       if eval $compile_ok; then
                if ./try 2>/dev/null; then
                        echo "Yes, it can."
                        val="$define"
@@ -7572,6 +7948,165 @@ fi
 set d_sem
 eval $setvar
 
+: see whether sys/sem.h defines union semun
+echo " "
+$cat > try.c <<'END'
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+int main () { union semun semun; semun.buf = 0; }
+END
+set try
+if eval $compile; then
+    echo "You have union semun in <sys/sem.h>." >&4
+    val="$define"
+else
+    echo "You do not have union semun in <sys/sem.h>." >&4
+    val="$undef"
+fi
+$rm -f try try.c
+set d_union_semun
+eval $setvar
+
+: see how to do semctl IPC_STAT
+case "$d_sem" in
+$define)
+    : see whether semctl IPC_STAT can use union semun
+    echo " "
+    $cat > try.c <<END
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+#$d_union_semun HAS_UNION_SEMUN
+int main() {
+    union semun
+#ifndef HAS_UNION_SEMUN
+    {
+       int val;
+       struct semid_ds *buf;
+       unsigned short *array;
+    }
+#endif
+    arg;
+    int sem, st;
+
+#if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT)
+    sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
+    if (sem > -1) {
+       struct semid_ds argbuf;
+       arg.buf = &argbuf;
+#      ifdef IPC_STAT
+       st = semctl(sem, 0, IPC_STAT, arg);
+       if (st == 0)
+           printf("semun\n");
+       else
+#      endif /* IPC_STAT */
+           printf("semctl IPC_STAT failed: errno = %d\n", errno);
+#      ifdef IPC_RMID
+       if (semctl(sem, 0, IPC_RMID, arg) != 0)
+#      endif /* IPC_RMID */
+           printf("semctl IPC_RMID failed: errno = %d\n", errno);
+    } else
+#endif /* IPC_PRIVATE && ... */
+       printf("semget failed: errno = %d\n", errno);
+  return 0;
+}
+END
+    val="$undef"
+    set try
+    if eval $compile; then
+       xxx=`./try`
+        case "$xxx" in
+        semun) val="$define" ;;
+        esac
+    fi
+    $rm -f try try.c
+    set d_semctl_semun
+    eval $setvar
+    case "$d_semctl_semun" in
+    $define)
+        echo "You can use union semun for semctl IPC_STAT." >&4
+       also='also'
+        ;;
+    *)  echo "You cannot use union semun for semctl IPC_STAT." >&4
+       also=''
+        ;;
+    esac
+
+    : see whether semctl IPC_STAT can use struct semid_ds pointer
+    $cat > try.c <<'END'
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+int main() {
+    struct semid_ds arg;
+    int sem, st;
+
+#if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) &&  defined(S_IRWXO) && defined(IPC_CREAT)
+    sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
+    if (sem > -1) {
+#      ifdef IPC_STAT
+       st = semctl(sem, 0, IPC_STAT, &arg);
+       if (st == 0)
+           printf("semid_ds\n");
+       else
+#      endif /* IPC_STAT */
+           printf("semctl IPC_STAT failed: errno = %d\n", errno);
+#      ifdef IPC_RMID
+       if (semctl(sem, 0, IPC_RMID, &arg) != 0)
+#      endif /* IPC_RMID */
+           printf("semctl IPC_RMID failed: errno = %d\n", errno);
+    } else
+#endif /* IPC_PRIVATE && ... */
+       printf("semget failed: errno = %d\n", errno);
+
+    return 0;
+}
+END
+    val="$undef"
+    set try
+    if eval $compile; then
+        xxx=`./try`
+        case "$xxx" in
+        semid_ds) val="$define" ;;
+        esac
+    fi
+    $rm -f try try.c
+    set d_semctl_semid_ds
+    eval $setvar
+    case "$d_semctl_semid_ds" in
+    $define)
+        echo "You can $also use struct semid_ds * for semctl IPC_STAT." >&4
+        ;;
+    *)  echo "You cannot use struct semid_ds * for semctl IPC_STAT." >&4
+        ;;
+    esac
+    ;;
+*)  val="$undef"
+
+    # We do not have the full sem*(2) library, so assume we can not
+    # use either.
+
+    set d_semctl_semun
+    eval $setvar
+
+    set d_semctl_semid_ds
+    eval $setvar
+    ;;
+esac
+
 : see if setegid exists
 set setegid d_setegid
 eval $inlibc
@@ -7580,6 +8115,10 @@ eval $inlibc
 set seteuid d_seteuid
 eval $inlibc
 
+: see if sethostent exists
+set sethostent d_sethent
+eval $inlibc
+
 : see if setlinebuf exists
 set setlinebuf d_setlinebuf
 eval $inlibc
@@ -7588,6 +8127,14 @@ eval $inlibc
 set setlocale d_setlocale
 eval $inlibc
 
+: see if setnetent exists
+set setnetent d_setnent
+eval $inlibc
+
+: see if setprotoent exists
+set setprotoent d_setpent
+eval $inlibc
+
 : see if setpgid exists
 set setpgid d_setpgid
 eval $inlibc
@@ -7620,10 +8167,18 @@ eval $inlibc
 set setruid d_setruid
 eval $inlibc
 
+: see if setservent exists
+set setservent d_setsent
+eval $inlibc
+
 : see if setsid exists
 set setsid d_setsid
 eval $inlibc
 
+: see if setvbuf exists
+set setvbuf d_setvbuf
+eval $inlibc
+
 : see if sfio.h is available
 set sfio.h i_sfio
 eval $inhdr
@@ -7743,12 +8298,7 @@ echo " "
 : see if we have sigaction
 if set sigaction val -f d_sigaction; eval $csym; $val; then
        echo 'sigaction() found.' >&4
-       val="$define"
-else
-       echo 'sigaction NOT found.' >&4
-       val="$undef"
-fi
-$cat > try.c <<'EOP'
+       $cat > try.c <<'EOP'
 #include <stdio.h>
 #include <sys/types.h>
 #include <signal.h>
@@ -7757,11 +8307,15 @@ main()
     struct sigaction act, oact;
 }
 EOP
-set try
-if eval $compile; then
-       :
+       set try
+       if eval $compile_ok; then
+               val="$define"
+       else
+               echo "But you don't seem to have a useable struct sigaction." >&4
+               val="$undef"
+       fi
 else
-       echo "But you don't seem to have a useable struct sigaction." >&4
+       echo 'sigaction NOT found.' >&4
        val="$undef"
 fi
 set d_sigaction; eval $setvar
@@ -7835,8 +8389,8 @@ else
        else
                echo "You don't have Berkeley networking in libc$_a..." >&4
                if test -f /usr/lib/libnet$_a; then
-                       ( (nm $nm_opt /usr/lib/libnet$_a | eval $nm_extract) ||  \
-                       ar t /usr/lib/libnet$_a) 2>/dev/null >> libc.list
+                       ( ($nm $nm_opt /usr/lib/libnet$_a | eval $nm_extract) ||  \
+                       $ar t /usr/lib/libnet$_a) 2>/dev/null >> libc.list
                        if $contains socket libc.list >/dev/null 2>&1; then
                        echo "...but the Wollongong group seems to have hacked it in." >&4
                                socketlib="-lnet"
@@ -8127,6 +8681,9 @@ case "$varval" in
        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";
@@ -8137,6 +8694,37 @@ case "$varval" in
 *) 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 if this is a sys/times.h system
 set sys/times.h i_systimes
 eval $inhdr
@@ -8150,13 +8738,9 @@ if set times val -f d_times; eval $csym; $val; then
        case "$i_systimes" in
        "$define") inc='sys/times.h';;
        esac
+       rp="What is the type returned by times() on this system?"
        set clock_t clocktype long stdio.h sys/types.h $inc
-       eval $typedef
-       dflt="$clocktype"
-       echo " "
-       rp="What type is returned by times() on this system?"
-       . ./myread
-       clocktype="$ans"
+       eval $typedef_ask
 else
        echo 'times() NOT found, hope that will do.' >&4
        d_times="$undef"
@@ -8299,7 +8883,7 @@ case "$d_closedir" in
 int main() { return closedir(opendir(".")); }
 EOM
        set closedir
-       if eval $compile; then
+       if eval $compile_ok; then
                if ./closedir > /dev/null 2>&1 ; then
                        echo "Yes, it does."
                        val="$undef"
@@ -8388,7 +8972,7 @@ main()
 }
 EOCP
        set try
-       if eval $compile; then
+       if eval $compile_ok; then
                dflt=`./try`
        else
                dflt='8'
@@ -8500,51 +9084,6 @@ set db.h i_db
 eval $inhdr
 
 case "$i_db" in
-define)
-       : Check the return type needed for hash 
-       echo " "
-       echo "Checking return type needed for hash for Berkeley DB ..." >&4
-       $cat >try.c <<EOCP
-#$d_const HASCONST
-#ifndef HASCONST
-#define const
-#endif
-#include <sys/types.h>
-#include <db.h>
-
-#ifndef DB_VERSION_MAJOR
-u_int32_t hash_cb (ptr, size)
-const void *ptr;
-size_t size;
-{
-}
-HASHINFO info;
-main()
-{
-       info.hash = hash_cb;
-}
-#endif
-EOCP
-       if $cc $ccflags -c try.c >try.out 2>&1 ; then
-               if $contains warning try.out >>/dev/null 2>&1 ; then
-                       db_hashtype='int'
-               else
-                       db_hashtype='u_int32_t'
-               fi
-       else
-               : XXX Maybe we should just give up here.
-               db_hashtype=u_int32_t
-               echo "Help:  I can't seem to compile the db test program." >&4
-               echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
-       fi
-       $rm -f try.*
-       echo "Your version of Berkeley DB uses $db_hashtype for hash."
-       ;;
-*)     db_hashtype=u_int32_t
-       ;;
-esac
-
-case "$i_db" in
 $define)
        : Check db version.
        echo " "
@@ -8561,6 +9100,7 @@ main()
 {
 #ifdef DB_VERSION_MAJOR        /* DB version >= 2 */
     int Major, Minor, Patch ;
+    unsigned long Version ;
     (void)db_version(&Major, &Minor, &Patch) ;
     printf("You have Berkeley DB Version 2 or greater\n");
 
@@ -8576,9 +9116,14 @@ main()
     }
 
     printf("db.h and libdb are compatible\n") ;
-    /* needs to be >= 2.05 */
-    if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) {
-       printf("but Perl needs Berkeley DB 2.0.5 or greater\n") ;
+
+    Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
+               + DB_VERSION_PATCH ;
+
+    /* needs to be >= 2.3.4 */
+    if (Version < 2003004) {
+    /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { */
+       printf("but Perl needs Berkeley DB 2.3.4 or greater\n") ;
         exit(2);       
     }
 
@@ -8616,6 +9161,51 @@ esac
 
 case "$i_db" in
 define)
+       : Check the return type needed for hash 
+       echo " "
+       echo "Checking return type needed for hash for Berkeley DB ..." >&4
+       $cat >try.c <<EOCP
+#$d_const HASCONST
+#ifndef HASCONST
+#define const
+#endif
+#include <sys/types.h>
+#include <db.h>
+
+#ifndef DB_VERSION_MAJOR
+u_int32_t hash_cb (ptr, size)
+const void *ptr;
+size_t size;
+{
+}
+HASHINFO info;
+main()
+{
+       info.hash = hash_cb;
+}
+#endif
+EOCP
+       if $cc $ccflags -c try.c >try.out 2>&1 ; then
+               if $contains warning try.out >>/dev/null 2>&1 ; then
+                       db_hashtype='int'
+               else
+                       db_hashtype='u_int32_t'
+               fi
+       else
+               : XXX Maybe we should just give up here.
+               db_hashtype=u_int32_t
+               $cat try.out >&4
+               echo "Help:  I can't seem to compile the db test program." >&4
+               echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
+       fi
+       $rm -f try.*
+       echo "Your version of Berkeley DB uses $db_hashtype for hash."
+       ;;
+*)     db_hashtype=u_int32_t
+       ;;
+esac
+case "$i_db" in
+define)
        : Check the return type needed for prefix 
        echo " "
        echo "Checking return type needed for prefix for Berkeley DB ..." >&4
@@ -8649,6 +9239,7 @@ EOCP
        else
                db_prefixtype='size_t'
                : XXX Maybe we should just give up here.
+               $cat try.out >&4
                echo "Help:  I can't seem to compile the db test program." >&4
                echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
        fi
@@ -8754,19 +9345,56 @@ case "$voidflags" in
 esac
 $rm -f try.* .out
 
-: see what type file positions are declared as in the library
-set fpos_t fpostype long stdio.h sys/types.h
-eval $typedef
+: check for length of double
 echo " "
-dflt="$fpostype"
+case "$doublesize" in
+'')
+       $echo $n "Checking to see how big your double precision numbers are...$c" >&4
+       $cat >try.c <<'EOCP'
+#include <stdio.h>
+main()
+{
+       printf("%d\n", sizeof(double));
+}
+EOCP
+       set try
+       if eval $compile_ok; then
+               doublesize=`./try`
+               $echo " $doublesize bytes." >&4
+       else
+               dflt='8'
+               echo "(I can't seem to compile the test program.  Guessing...)"
+               rp="What is the size of a double precision number (in bytes)?"
+               . ./myread
+               doublesize="$ans"
+       fi
+       ;;
+esac
+$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()?"
-. ./myread
-fpostype="$ans"
+set fpos_t fpostype long stdio.h sys/types.h
+eval $typedef_ask
+
+: get csh whereabouts
+case "$csh" in
+'csh') val="$undef" ;;
+*) val="$define" ;;
+esac
+set d_csh
+eval $setvar
+: Respect a hint or command line value for full_csh.
+case "$full_csh" in
+'') full_csh=$csh ;;
+esac
 
 : Store the full pathname to the sed program for use in the C program
 full_sed=$sed
 
 : see what type gids are declared as in the kernel
+echo " "
+echo "Looking for the type for group ids returned by getgid()."
 set gid_t gidtype xxx stdio.h sys/types.h
 eval $typedef
 case "$gidtype" in
@@ -8780,10 +9408,13 @@ xxx)
        ;;
 *) dflt="$gidtype";;
 esac
-echo " "
-rp="What is the type for group ids returned by getgid()?"
-. ./myread
-gidtype="$ans"
+case "$gidtype" in
+gid_t) echo "gid_t found." ;;
+*)     rp="What is the type for group ids returned by getgid()?"
+       . ./myread
+       gidtype="$ans"
+       ;;
+esac
 
 : see if getgroups exists
 set getgroups d_getgrps
@@ -8803,11 +9434,11 @@ case "$d_getgrps$d_setgrps" in
        *)  dflt="$groupstype" ;;
        esac
        $cat <<EOM
-What is the type of the second argument to getgroups() and setgroups()?
+What type of pointer is the second argument to getgroups() and setgroups()?
 Usually this is the same as group ids, $gidtype, but not always.
 
 EOM
-       rp='What type is the second argument to getgroups() and setgroups()?'
+       rp='What type pointer is the second argument to getgroups() and setgroups()?'
        . ./myread
        groupstype="$ans"
        ;;
@@ -8815,13 +9446,9 @@ EOM
 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
-echo " "
-dflt="$lseektype"
-rp="What type is lseek's offset on this system declared as?"
-. ./myread
-lseektype="$ans"
+eval $typedef_ask
 
 echo " "
 echo "Checking if your $make program sets \$(MAKE)..." >&4
@@ -8844,31 +9471,9 @@ case "$make_set_make" in
 esac
 
 : see what type is used for mode_t
+rp="What is the type used for file modes for system calls (e.g. fchmod())?"
 set mode_t modetype int stdio.h sys/types.h
-eval $typedef
-dflt="$modetype"
-echo " "
-rp="What type is used for file modes?"
-. ./myread
-modetype="$ans"
-
-: Cruising for prototypes
-echo " "
-echo "Checking out function prototypes..." >&4
-$cat >prototype.c <<'EOCP'
-main(int argc, char *argv[]) {
-       exit(0);}
-EOCP
-if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
-       echo "Your C compiler appears to support function prototypes."
-       val="$define"
-else
-       echo "Your C compiler doesn't seem to understand function prototypes."
-       val="$undef"
-fi
-set prototype
-eval $setvar
-$rm -f prototype*
+eval $typedef_ask
 
 : define a fucntion to check prototypes
 $cat > protochk <<EOSH
@@ -8911,30 +9516,10 @@ EOSH
 chmod +x protochk
 $eunicefix protochk
 
-: see if gethostbyaddr exists
-set gethostbyaddr d_gethbyaddr
-eval $inlibc
-
-: see if gethostbyname exists
-set gethostbyname d_gethbyname
-eval $inlibc
-
-: see if getnetbyaddr exists
-set getnetbyaddr d_getnbyaddr
-eval $inlibc
-
-: see if this is a netdb.h system
-set netdb.h i_netdb
-eval $inhdr
-
 : see what type is used for size_t
+rp="What is the type used for the length parameter for string functions?"
 set size_t sizetype 'unsigned int' stdio.h sys/types.h
-eval $typedef
-dflt="$sizetype"
-echo " "
-rp="What type is used for the length parameter for string functions?"
-. ./myread
-sizetype="$ans"
+eval $typedef_ask
 
 : check for type of arguments to gethostbyaddr. 
 if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
@@ -9059,7 +9644,7 @@ EOM
                esac
                ;;
        *)      : no getnetbyaddr, so pick harmless default
-               netdb_name_type='long'
+               netdb_net_type='long'
                ;;
        esac
 fi
@@ -9089,13 +9674,42 @@ rp='What pager is used on your system?'
 pager="$ans"
 
 : see what type pids are declared as in the kernel
+rp="What is the type of process ids on this system?"
 set pid_t pidtype int stdio.h sys/types.h
-eval $typedef
-dflt="$pidtype"
+eval $typedef_ask
+
+: check for length of pointer
 echo " "
-rp="What type are process ids on this system declared as?"
-. ./myread
-pidtype="$ans"
+case "$ptrsize" in
+'')
+       $echo $n "Checking to see how big your pointers are...$c" >&4
+       if test "$voidflags" -gt 7; then
+               echo '#define VOID_PTR char *' > try.c
+       else
+               echo '#define VOID_PTR void *' > try.c
+       fi
+       $cat >>try.c <<'EOCP'
+#include <stdio.h>
+main()
+{
+       printf("%d\n", sizeof(VOID_PTR));
+       exit(0);
+}
+EOCP
+       set try
+       if eval $compile_ok; then
+               ptrsize=`./try`
+               $echo " $ptrsize bytes." >&4
+       else
+               dflt='4'
+               echo "(I can't seem to compile the test program.  Guessing...)" >&4
+               rp="What is the size of a pointer (in bytes)?"
+               . ./myread
+               ptrsize="$ans"
+       fi
+       ;;
+esac
+$rm -f try.c try
 
 : check for size of random number generator
 echo " "
@@ -9130,7 +9744,7 @@ main()
 }
 EOCP
        set try
-       if eval $compile; then
+       if eval $compile_ok; then
                dflt=`./try$_exe`
        else
                dflt='?'
@@ -9160,13 +9774,13 @@ $cc $ccflags -c foo.c >/dev/null 2>&1
 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
 if $cc $ccflags $ldflags -o foobar foo$_o bar$_a $libs > /dev/null 2>&1 &&
        ./foobar >/dev/null 2>&1; then
-       echo "ar appears to generate random libraries itself."
+       echo "$ar appears to generate random libraries itself."
        orderlib=false
        ranlib=":"
 elif $ar ts bar$_a >/dev/null 2>&1 &&
        $cc $ccflags $ldflags -o foobar foo$_o bar$_a $libs > /dev/null 2>&1 &&
        ./foobar >/dev/null 2>&1; then
-               echo "a table of contents needs to be added with 'ar ts'."
+               echo "a table of contents needs to be added with '$ar ts'."
                orderlib=false
                ranlib="$ar ts"
 else
@@ -9427,9 +10041,10 @@ xxx="$xxx LOST PHONE PIPE POLL PROF PWR QUIT SEGV STKFLT STOP SYS TERM TRAP"
 xxx="$xxx TSTP TTIN TTOU URG USR1 USR2 USR3 USR4 VTALRM"
 xxx="$xxx WINCH WIND WINDOW XCPU XFSZ"
 : generate a few handy files for later
-$cat > signal.c <<'EOP'
+$cat > signal.c <<'EOCP'
 #include <sys/types.h>
 #include <signal.h>
+#include <stdio.h>
 int main() {
 
 /* Strange style to avoid deeply-nested #if/#else/#endif */
@@ -9484,7 +10099,10 @@ int main() {
 
 printf("NSIG %d\n", NSIG);
 
-EOP
+#ifndef JUST_NSIG
+
+EOCP
+
 echo $xxx | $tr ' ' '\012' | $sort | $uniq | $awk '
 {
        printf "#ifdef SIG"; printf $1; printf "\n"
@@ -9493,6 +10111,7 @@ echo $xxx | $tr ' ' '\012' | $sort | $uniq | $awk '
        printf "#endif\n"
 }
 END {
+       printf "#endif /* JUST_NSIG */\n";
        printf "}\n";
 }
 ' >>signal.c
@@ -9529,22 +10148,69 @@ END {
 EOP
 $cat >signal_cmd <<EOS
 $startsh
-$test -s signal.lst && exit 0
-if $cc $optimize $ccflags $ldflags -o signal signal.c $libs >/dev/null 2>&1; then
+if $test -s signal.lst; then
+    echo "Using your existing signal.lst file"
+       exit 0
+fi
+xxx="$xxx"
+EOS
+$cat >>signal_cmd <<'EOS'
+
+set signal
+if eval $compile_ok; then
        ./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
 else
-       echo "(I can't seem be able to compile the test program -- Guessing)"
+       echo "(I can't seem be able to compile the whole test program)" >&4
+       echo "(I'll try it in little pieces.)" >&4
+       set signal -DJUST_NSIG
+       if eval $compile_ok; then
+               ./signal$_exe > signal.nsg
+               $cat signal.nsg
+       else
+               echo "I can't seem to figure out how many signals you have." >&4
+               echo "Guessing 50." >&4
+               echo 'NSIG 50' > signal.nsg
+       fi
+       : Now look at all the signal names, one at a time.
+       for xx in `echo $xxx | $tr ' ' '\012' | $sort | $uniq`; do
+               $cat > signal.c <<EOCP
+#include <sys/types.h>
+#include <signal.h>
+#include <stdio.h>
+int main() {
+printf("$xx %d\n", SIG${xx});
+return 0;
+}
+EOCP
+               set signal
+               if eval $compile; then
+                       echo "SIG${xx} found."
+                       ./signal$_exe  >> signal.ls1
+               else
+                       echo "SIG${xx} NOT found."
+               fi
+       done
+       if $test -s signal.ls1; then
+               $cat signal.nsg signal.ls1 |
+                       $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
+       fi
+
+fi
+if $test -s signal.lst; then
+       :
+else
+       echo "(AAK! I can't compile the test programs -- Guessing)" >&4
        echo 'kill -l' >signal
-       set X \`csh -f <signal\`
+       set X `csh -f <signal`
        $rm -f signal
        shift
-       case \$# in
+       case $# in
        0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
        esac
-       echo \$@ | $tr ' ' '\012' | \
-               $awk '{ printf \$1; printf " %d\n", ++s; }' >signal.lst
+       echo $@ | $tr ' ' '\012' | \
+               $awk '{ printf $1; printf " %d\n", ++s; }' >signal.lst
 fi
-$rm -f signal.c signal signal$_o
+$rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
 EOS
 chmod a+x signal_cmd
 $eunicefix signal_cmd
@@ -9554,7 +10220,7 @@ echo " "
 case "$sig_name_init" in
 '')
        echo "Generating a list of signal names and numbers..." >&4
-       ./signal_cmd
+       . ./signal_cmd
        sig_name=`$awk '{printf "%s ", $1}' signal.lst`
        sig_name="ZERO $sig_name"
        sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
@@ -9605,7 +10271,7 @@ main()
 EOM
 echo " "
 set ssize
-if eval $compile && ./ssize > /dev/null; then
+if eval $compile_ok && ./ssize > /dev/null; then
        ssizetype=`./ssize`
        echo "I'll be using $ssizetype for functions returning a byte count." >&4
 else
@@ -9639,13 +10305,9 @@ echo " "
 if set time val -f d_time; eval $csym; $val; then
        echo 'time() found.' >&4
        val="$define"
+       rp="What is the type returned by time() on this system?"
        set time_t timetype long stdio.h sys/types.h
-       eval $typedef
-       dflt="$timetype"
-       echo " "
-       rp="What type is returned by time() on this system?"
-       . ./myread
-       timetype="$ans"
+       eval $typedef_ask
 else
        echo 'time() not found, hope that will do.' >&4
        val="$undef"
@@ -9655,6 +10317,8 @@ set d_time
 eval $setvar
 
 : see what type uids are declared as in the kernel
+echo " "
+echo "Looking for the type for user ids returned by getuid()."
 set uid_t uidtype xxx stdio.h sys/types.h
 eval $typedef
 case "$uidtype" in
@@ -9668,10 +10332,13 @@ xxx)
        ;;
 *) dflt="$uidtype";;
 esac
-echo " "
-rp="What is the type for user ids returned by getuid()?"
-. ./myread
-uidtype="$ans"
+case "$uidtype" in
+uid_t) echo "uid_t found." ;;
+*)     rp="What is the type for user ids returned by getuid()?"
+       . ./myread
+       uidtype="$ans"
+       ;;
+esac
 
 : see if dbm.h is available
 : see if dbmclose exists
@@ -10167,7 +10834,8 @@ eval $setvar
 
 echo " "
 echo "Looking for extensions..." >&4
-cd ../ext
+tdir=`pwd`
+cd $rsrc/ext
 : If we are using the old config.sh, known_extensions may contain
 : old or inaccurate or duplicate values.
 known_extensions=''
@@ -10176,67 +10844,76 @@ known_extensions=''
 : some additional extensions into the source tree and expect them
 : to be built.
 for xxx in * ; do
-    case "$xxx" in
-    DynaLoader) ;;
-    *) if $test -f $xxx/$xxx.xs; then
-           known_extensions="$known_extensions $xxx"
-       else
-           if $test -d $xxx; then
-               cd $xxx
-               for yyy in * ; do
-                   if $test -f $yyy/$yyy.xs; then
-                       known_extensions="$known_extensions $xxx/$yyy"
-                   fi
-               done
-               cd ..
-           fi
-       fi ;;
-    esac
+       case "$xxx" in
+       DynaLoader) ;;
+       *)      if $test -f $xxx/$xxx.xs; then
+                       known_extensions="$known_extensions $xxx"
+               else
+                       if $test -d $xxx; then
+                               cd $xxx
+                               for yyy in * ; do
+                               if $test -f $yyy/$yyy.xs; then
+                                       known_extensions="$known_extensions $xxx/$yyy"
+                               fi
+                               done
+                               cd ..
+                       fi
+               fi 
+               ;;
+       esac
 done
 set X $known_extensions
 shift
 known_extensions="$*"
-cd ../UU
+cd $tdir
 
 : Now see which are supported on this system.
 avail_ext=''
 for xxx in $known_extensions ; do
-    case "$xxx" in
-    DB_File|db_file) case "$i_db" in
-           $define) avail_ext="$avail_ext $xxx" ;;
-           esac
-           ;;
-    GDBM_File|gdbm_fil) case "$i_gdbm" in 
-           $define) avail_ext="$avail_ext $xxx" ;;
-           esac
-           ;;
-    NDBM_File|ndbm_fil) case "$i_ndbm" in
-           $define) avail_ext="$avail_ext $xxx" ;;
-           esac
-           ;;
-    ODBM_File|odbm_fil) case "${i_dbm}${i_rpcsvcdbm}" in
-           *"${define}"*) avail_ext="$avail_ext $xxx" ;;
-           esac
-           ;;
-    POSIX|posix) case "$useposix" in
-           true|define|y) avail_ext="$avail_ext $xxx" ;;
-           esac
-           ;;
-    Opcode|opcode) case "$useopcode" in
-           true|define|y) avail_ext="$avail_ext $xxx" ;;
-           esac
-           ;;
-    Socket|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" ;;
-           esac
-           ;;
-    *)      avail_ext="$avail_ext $xxx"
-           ;;
-    esac
+       case "$xxx" in
+       DB_File|db_file)
+               case "$i_db" in
+               $define) avail_ext="$avail_ext $xxx" ;;
+               esac
+               ;;
+       GDBM_File|gdbm_fil)
+               case "$i_gdbm" in 
+               $define) avail_ext="$avail_ext $xxx" ;;
+               esac
+               ;;
+       NDBM_File|ndbm_fil)
+               case "$i_ndbm" in
+               $define) avail_ext="$avail_ext $xxx" ;;
+               esac
+               ;;
+       ODBM_File|odbm_fil) 
+               case "${i_dbm}${i_rpcsvcdbm}" in
+               *"${define}"*) avail_ext="$avail_ext $xxx" ;;
+               esac
+               ;;
+       POSIX|posix)
+               case "$useposix" in
+               true|define|y) avail_ext="$avail_ext $xxx" ;;
+               esac
+               ;;
+       Opcode|opcode)
+               case "$useopcode" in
+               true|define|y) avail_ext="$avail_ext $xxx" ;;
+               esac
+               ;;
+       Socket|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" ;;
+               esac
+               ;;
+       *)      avail_ext="$avail_ext $xxx"
+               ;;
+       esac
 done
 
 set X $avail_ext
@@ -10250,11 +10927,28 @@ A number of extensions are supplied with $package.  You may choose to
 compile these extensions for dynamic loading (the default), compile
 them into the $package executable (static loading), or not include
 them at all.  Answer "none" to include no extensions.
+Note that DynaLoader is always built and need not be mentioned here.
 
 EOM
        case "$dynamic_ext" in
        '') dflt="$avail_ext" ;;
-       *)      dflt="$dynamic_ext" ;;
+       *)      dflt="$dynamic_ext"
+               # Perhaps we are reusing an old out-of-date config.sh.
+               case "$hint" in
+               previous)
+                       if test X"$dynamic_ext" != X"$avail_ext"; then
+                               $cat <<EOM
+NOTICE:  Your previous config.sh list may be incorrect. 
+The extensions now available to you are 
+       ${avail_ext}
+but the default list from your previous config.sh is
+       ${dynamic_ext} 
+
+EOM
+                       fi
+                       ;;
+               esac
+               ;;
        esac
        case "$dflt" in
        '')     dflt=none;;
@@ -10298,13 +10992,29 @@ EOM
        $cat <<EOM
 A number of extensions are supplied with $package.  Answer "none" 
 to include no extensions. 
+Note that DynaLoader is always built and need not be mentioned here.
 
 EOM
        case "$static_ext" in
        '') dflt="$avail_ext" ;;
-       *)      dflt="$static_ext" ;;
-       esac
+       *)      dflt="$static_ext"
+               # Perhaps we are reusing an old out-of-date config.sh.
+               case "$hint" in
+               previous)
+                       if test X"$static_ext" != X"$avail_ext"; then
+                               $cat <<EOM
+NOTICE:  Your previous config.sh list may be incorrect. 
+The extensions now available to you are 
+       ${avail_ext}
+but the default list from your previous config.sh is
+       ${static_ext} 
 
+EOM
+                       fi
+                       ;;
+               esac
+               ;;
+       esac
        case "$dflt" in
        '')     dflt=none;;
        esac
@@ -10364,7 +11074,9 @@ case "$d_portable" in
        echo " "
        echo "Stripping down executable paths..." >&4
        for file in $loclist $trylist; do
-               eval $file="\$file"
+               if test X$file != Xln -a X$file != Xar -o X$osname != Xos2; then
+                       eval $file="\$file"
+               fi
        done
        ;;
 esac
@@ -10403,6 +11115,7 @@ _exe='$_exe'
 _o='$_o'
 afs='$afs'
 alignbytes='$alignbytes'
+ansi2knr='$ansi2knr'
 aphostname='$aphostname'
 ar='$ar'
 archlib='$archlib'
@@ -10413,7 +11126,6 @@ awk='$awk'
 baserev='$baserev'
 bash='$bash'
 bin='$bin'
-bincompat3='$bincompat3'
 binexp='$binexp'
 bison='$bison'
 byacc='$byacc'
@@ -10453,7 +11165,6 @@ d_archlib='$d_archlib'
 d_attribut='$d_attribut'
 d_bcmp='$d_bcmp'
 d_bcopy='$d_bcopy'
-d_bincompat3='$d_bincompat3'
 d_bsd='$d_bsd'
 d_bsdgetpgrp='$d_bsdgetpgrp'
 d_bsdsetpgrp='$d_bsdsetpgrp'
@@ -10477,6 +11188,10 @@ d_dlopen='$d_dlopen'
 d_dlsymun='$d_dlsymun'
 d_dosuid='$d_dosuid'
 d_dup2='$d_dup2'
+d_endhent='$d_endhent'
+d_endnent='$d_endnent'
+d_endpent='$d_endpent'
+d_endsent='$d_endsent'
 d_eofnblk='$d_eofnblk'
 d_eunice='$d_eunice'
 d_fchmod='$d_fchmod'
@@ -10497,13 +11212,25 @@ d_gethbyaddr='$d_gethbyaddr'
 d_gethbyname='$d_gethbyname'
 d_gethent='$d_gethent'
 d_gethname='$d_gethname'
+d_gethostprotos='$d_gethostprotos'
 d_getlogin='$d_getlogin'
 d_getnbyaddr='$d_getnbyaddr'
+d_getnbyname='$d_getnbyname'
+d_getnent='$d_getnent'
+d_getnetprotos='$d_getnetprotos'
+d_getpbyname='$d_getpbyname'
+d_getpbynumber='$d_getpbynumber'
+d_getpent='$d_getpent'
 d_getpgid='$d_getpgid'
 d_getpgrp2='$d_getpgrp2'
 d_getpgrp='$d_getpgrp'
 d_getppid='$d_getppid'
 d_getprior='$d_getprior'
+d_getprotoprotos='$d_getprotoprotos'
+d_getsbyname='$d_getsbyname'
+d_getsbyport='$d_getsbyport'
+d_getsent='$d_getsent'
+d_getservprotos='$d_getservprotos'
 d_gettimeod='$d_gettimeod'
 d_gnulibc='$d_gnulibc'
 d_htonl='$d_htonl'
@@ -10511,9 +11238,12 @@ d_index='$d_index'
 d_inetaton='$d_inetaton'
 d_isascii='$d_isascii'
 d_killpg='$d_killpg'
+d_lchown='$d_lchown'
 d_link='$d_link'
 d_locconv='$d_locconv'
 d_lockf='$d_lockf'
+d_longdbl='$d_longdbl'
+d_longlong='$d_longlong'
 d_lstat='$d_lstat'
 d_mblen='$d_mblen'
 d_mbstowcs='$d_mbstowcs'
@@ -10524,6 +11254,7 @@ d_memmove='$d_memmove'
 d_memset='$d_memset'
 d_mkdir='$d_mkdir'
 d_mkfifo='$d_mkfifo'
+d_mkstemp='$d_mkstemp'
 d_mktime='$d_mktime'
 d_msg='$d_msg'
 d_msgctl='$d_msgctl'
@@ -10532,6 +11263,7 @@ d_msgrcv='$d_msgrcv'
 d_msgsnd='$d_msgsnd'
 d_mymalloc='$d_mymalloc'
 d_nice='$d_nice'
+d_oldpthreads='$d_oldpthreads'
 d_oldsock='$d_oldsock'
 d_open3='$d_open3'
 d_pathconf='$d_pathconf'
@@ -10547,6 +11279,7 @@ d_pwchange='$d_pwchange'
 d_pwclass='$d_pwclass'
 d_pwcomment='$d_pwcomment'
 d_pwexpire='$d_pwexpire'
+d_pwgecos='$d_pwgecos'
 d_pwquota='$d_pwquota'
 d_readdir='$d_readdir'
 d_readlink='$d_readlink'
@@ -10561,13 +11294,18 @@ d_seekdir='$d_seekdir'
 d_select='$d_select'
 d_sem='$d_sem'
 d_semctl='$d_semctl'
+d_semctl_semid_ds='$d_semctl_semid_ds'
+d_semctl_semun='$d_semctl_semun'
 d_semget='$d_semget'
 d_semop='$d_semop'
 d_setegid='$d_setegid'
 d_seteuid='$d_seteuid'
 d_setgrps='$d_setgrps'
+d_sethent='$d_sethent'
 d_setlinebuf='$d_setlinebuf'
 d_setlocale='$d_setlocale'
+d_setnent='$d_setnent'
+d_setpent='$d_setpent'
 d_setpgid='$d_setpgid'
 d_setpgrp2='$d_setpgrp2'
 d_setpgrp='$d_setpgrp'
@@ -10578,7 +11316,9 @@ d_setresuid='$d_setresuid'
 d_setreuid='$d_setreuid'
 d_setrgid='$d_setrgid'
 d_setruid='$d_setruid'
+d_setsent='$d_setsent'
 d_setsid='$d_setsid'
+d_setvbuf='$d_setvbuf'
 d_sfio='$d_sfio'
 d_shm='$d_shm'
 d_shmat='$d_shmat'
@@ -10620,6 +11360,7 @@ d_truncate='$d_truncate'
 d_tzname='$d_tzname'
 d_umask='$d_umask'
 d_uname='$d_uname'
+d_union_semun='$d_union_semun'
 d_vfork='$d_vfork'
 d_void_closedir='$d_void_closedir'
 d_voidsig='$d_voidsig'
@@ -10638,6 +11379,7 @@ defvoidused='$defvoidused'
 direntrytype='$direntrytype'
 dlext='$dlext'
 dlsrc='$dlsrc'
+doublesize='$doublesize'
 dynamic_ext='$dynamic_ext'
 eagain='$eagain'
 echo='$echo'
@@ -10654,7 +11396,6 @@ fpostype='$fpostype'
 freetype='$freetype'
 full_csh='$full_csh'
 full_sed='$full_sed'
-gcc='$gcc'
 gccversion='$gccversion'
 gidtype='$gidtype'
 glibpth='$glibpth'
@@ -10751,6 +11492,8 @@ ln='$ln'
 lns='$lns'
 locincpth='$locincpth'
 loclibpth='$loclibpth'
+longdblsize='$longdblsize'
+longlongsize='$longlongsize'
 longsize='$longsize'
 lp='$lp'
 lpr='$lpr'
@@ -10786,6 +11529,7 @@ netdb_hlen_type='$netdb_hlen_type'
 netdb_host_type='$netdb_host_type'
 netdb_name_type='$netdb_name_type'
 netdb_net_type='$netdb_net_type'
+nm='$nm'
 nm_opt='$nm_opt'
 nm_so_opt='$nm_so_opt'
 nroff='$nroff'
@@ -10814,6 +11558,7 @@ prefixexp='$prefixexp'
 privlib='$privlib'
 privlibexp='$privlibexp'
 prototype='$prototype'
+ptrsize='$ptrsize'
 randbits='$randbits'
 ranlib='$ranlib'
 rd_nodata='$rd_nodata'
@@ -10869,6 +11614,7 @@ sysman='$sysman'
 tail='$tail'
 tar='$tar'
 tbl='$tbl'
+tee='$tee'
 test='$test'
 timeincl='$timeincl'
 timetype='$timetype'
@@ -10993,6 +11739,22 @@ else
        echo "Done."
 fi
 
+if $test -f Policy.sh; then
+    $cat <<EOM
+
+If you compile $package on a different machine or from a different object
+directory, copy the Policy.sh file from this object directory to the
+new one before you run Configure -- this will help you with most of
+the policy defaults.
+
+EOM
+fi
+if $test -f config.msg; then
+    echo "Hmm.  I also noted the following information while running:"
+    echo " "
+    $cat config.msg >&4
+    $rm -f config.msg
+fi
 $rm -f kit*isdone ark*isdone
 $rm -rf UU