X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=8805bca215a837d00c976ce50db05a959e25eac4;hb=2b7d8dfb16883bbf415fa28447ef22b443aa29c1;hp=b801ab8de9fc7bd40283c8b08eaedb1714bd09d7;hpb=c5f05a911e8d8ba7e1354bba36ffbd709c382a86;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index b801ab8..8805bca 100755 --- 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 Feb 24 20:37:06 EET 2000 [metaconfig 3.0 PL70] +# Generated on Fri Aug 25 21:43:24 EET DST 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <&4 <&4 "Okay, continuing." ;; + *) echo >&4 "Okay, bye." + exit 1 + ;; + esac + ;; + esac + ;; +esac + : general instructions needman=true firsttime=true @@ -1879,7 +1959,6 @@ ln more nm nroff -perl pg test uname @@ -2004,6 +2083,62 @@ FOO ;; esac +cat <checkcc +$startsh +EOS +cat <<'EOSC' >>checkcc +case "$cc" in +'') ;; +*) $rm -f try try.* + $cat >try.c <&4 + despair=yes + trygcc=yes + case "$cc" in + *gcc*) trygcc=no ;; + esac + case "`$cc -v -c try.c 2>&1`" in + *gcc*) trygcc=no ;; + esac + if $test X"$trygcc" = Xyes; then + if gcc -o try -c try.c; then + echo " " + echo "You seem to have a working gcc, though." >&4 + rp="Would you like to use it?" + dflt=y + if $test -f myread; then + . ./myread + else + if $test -f UU/myread; then + . ./UU/myread + else + echo "Cannot find myread, sorry. Aborting." >&2 + exit 1 + fi + fi + case "$ans" in + [yY]*) cc=gcc; ccflags=''; despair=no ;; + esac + fi + fi + if $test X"$despair" = Xyes; then + echo "You need to find a working C compiler." >&4 + echo "I cannot continue any further, aborting." >&4 + exit 1 + fi + fi + $rm -f try try.* + ;; +esac +EOSC + : determine whether symbolic links are supported echo " " $touch blurfl @@ -2136,6 +2271,7 @@ if test -f config.sh; then ;; esac fi +. ./UU/checkcc if test ! -f config.sh; then $cat </dev/null 2>&1 + case "$cc" in + '') modelcc="$cc" ;; + *) modelcc="cc" ;; + esac + ( $modelcc -o pdp11 pdp11.c ) >/dev/null 2>&1 if $test -f pdp11 && ./pdp11 2>/dev/null; then dflt='unsplit split' else @@ -3046,6 +3191,8 @@ fi if $test -f cc.cbu; then . ./cc.cbu fi +. ./checkcc + echo " " echo "Checking for GNU cc in disguise and/or its version number..." >&4 $cat >gccvers.c <&1|grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"` + gccshortvers='' + case "$gccosandvers" in + $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr + $osname$osvers) ;; # looking good + $osname*) cat <&4 + +*** WHOA THERE!!! *** + + Your gcc has not been compiled for the exact release of + your operating system ($gccosandvers versus $osname$osvers). + + In general it is a good idea to keep gcc synchronized with + the operating system because otherwise serious problems + may ensue when trying to compile software, like Perl. + + I'm trying to be optimistic here, though, and will continue. + If later during the configuration and build icky compilation + problems appear (headerfile conflicts being the most common + manifestation), I suggest reinstalling the gcc to match + your operating system release. + +EOM + ;; + *) gccosandvers='' ;; # failed to parse, better be silent + esac + ;; +esac + + + + +: see how we invoke the C preprocessor +echo " " +echo "Now, how can we feed standard input to your C preprocessor..." >&4 +cat <<'EOT' >testcpp.c +#define ABC abc +#define XYZ xyz +ABC.XYZ +EOT +cd .. +if test ! -f cppstdin; then + if test "X$osname" = "Xaix" -a "X$gccversion" = X; then + # AIX cc -E doesn't show the absolute headerfile + # locations but we'll cheat by using the -M flag. + echo 'cat >.$$.c; rm -f .$$.u; '"$cc"' ${1+"$@"} -M -c .$$.c 2>/dev/null; test -s .$$.u && awk '"'"'$2 ~ /\.h$/ { print "# 0 \""$2"\"" }'"'"' .$$.u; rm -f .$$.o .$$.u; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' > cppstdin + else + echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin + fi +else + echo "Keeping your $hint cppstdin wrapper." +fi +chmod 755 cppstdin +wrapper=`pwd`/cppstdin +ok='false' +cd UU + +if $test "X$cppstdin" != "X" && \ + $cppstdin $cppminus testcpp.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.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.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.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.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.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.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.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.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.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.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 @@ -3249,6 +3578,7 @@ while test "$type"; do true) case "$ansexp" in /*) value="$ansexp" ;; + [a-zA-Z]:/*) value="$ansexp" ;; *) redo=true case "$already" in @@ -3295,13 +3625,15 @@ while test "$type"; do Directory) for fp in $gfpth; do if test "X$fp" = X.; then - pf="$ansexp" + dir="$ans" + direxp="$ansexp" else - pf="$fp/$ansexp" + dir="$fp/$ansexp" + direxp="$fp/$ansexp" fi - if test -d "$pf"; then + if test -d "$direxp"; then type='' - value="$pf" + value="$dir" break fi done @@ -3374,7 +3706,7 @@ if $test -f /bin/mips && /bin/mips; then /bsd43 #endif EOCP - if $cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then + if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then dflt='/bsd43/usr/include' incpath='/bsd43' mips_type='BSD 4.3' @@ -3407,165 +3739,17 @@ y) fn=d/ ;; esac -: see how we invoke the C preprocessor -echo " " -echo "Now, how can we feed standard input to your C preprocessor..." >&4 -cat <<'EOT' >testcpp.c -#define ABC abc -#define XYZ xyz -ABC.XYZ -EOT -cd .. -if test ! -f cppstdin; then - if test "X$osname" = "Xaix" -a "X$gccversion" = X; then - # AIX cc -E doesn't show the absolute headerfile - # locations but we'll cheat by using the -M flag. - echo 'cat >.$$.c; rm -f .$$.u; '"$cc"' ${1+"$@"} -M -c .$$.c 2>/dev/null; test -s .$$.u && awk '"'"'$2 ~ /\.h$/ { print "# 0 \""$2"\"" }'"'"' .$$.u; rm -f .$$.o .$$.u; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' > cppstdin - else - echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin - fi -else - echo "Keeping your $hint cppstdin wrapper." -fi -chmod 755 cppstdin -wrapper=`pwd`/cppstdin -ok='false' -cd UU - -if $test "X$cppstdin" != "X" && \ - $cppstdin $cppminus testcpp.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.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.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.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.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.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.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.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.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.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.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 +: 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='' @@ -3696,9 +3880,7 @@ case "$libswanted" in '') libswanted='c_s';; esac case "$usesocks" in -$define) - libswanted="$libswanted socks5 socks5_sh" - ;; +"$define") libswanted="$libswanted socks5 socks5_sh" ;; esac libsfound='' libsfiles='' @@ -3734,6 +3916,7 @@ for thislib in $libswanted; do xxx=$thisdir/lib${thislib}_s$_a $test -f "$xxx" && eval $libscheck $test -f "$xxx" && libstyle=static + $test -f "$xxx" && thislib=${thislib}_s fi if test ! -f "$xxx"; then xxx=$thisdir/Slib$thislib$_a @@ -4221,7 +4404,7 @@ set off_t lseektype long stdio.h sys/types.h eval $typedef_ask echo " " -$echo $n "Checking to see how big your file offsets are...$c" >&4 +echo "Checking to see how big your file offsets are..." >&4 $cat >try.c < #include @@ -4234,7 +4417,7 @@ EOCP set try if eval $compile_ok; then lseeksize=`./try` - $echo " $lseeksize bytes." >&4 + echo "Your file offsets are $lseeksize bytes long." else dflt=$longsize echo " " @@ -4255,7 +4438,7 @@ case "$fpostype" in *_t) zzz="$fpostype" ;; *) zzz="fpos_t" ;; esac -$echo $n "Checking the size of $zzz...$c" >&4 +echo "Checking the size of $zzz..." >&4 cat > try.c < #include @@ -4269,11 +4452,10 @@ if eval $compile_ok; then yyy=`./try` case "$yyy" in '') fpossize=4 - echo " " >&4 echo "(I can't execute the test program--guessing $fpossize.)" >&4 ;; *) fpossize=$yyy - echo " $fpossize bytes." >&4 + echo "Your $zzz is $fpossize bytes long." ;; esac else @@ -4287,6 +4469,17 @@ fi +# Backward compatibility (uselfs is deprecated). +case "$uselfs" in +"$define"|true|[yY]*) + cat <&4 + +*** Configure -Duselfs is deprecated, using -Duselargefiles instead. +EOM + uselargefiles="$define" + ;; +esac + case "$lseeksize:$fpossize" in 8:8) cat <&4 + echo "Rechecking to see how big your file offsets are..." >&4 $cat >try.c < #include @@ -4336,7 +4529,7 @@ EOCP set try if eval $compile_ok; then lseeksize=`./try` - $echo " $lseeksize bytes." >&4 + $echo "Your file offsets are now $lseeksize bytes long." else dflt="$lseeksize" echo " " @@ -4367,7 +4560,7 @@ EOCP echo "(I can't execute the test program--guessing $fpossize.)" >&4 ;; *) fpossize=$yyy - echo " $fpossize bytes." + echo " $fpossize bytes." >&4 ;; esac else @@ -4386,7 +4579,7 @@ esac case "$usemorebits" in "$define"|true|[yY]*) - use64bits="$define" + use64bitint="$define" uselongdouble="$define" usemorebits="$define" ;; @@ -4395,28 +4588,84 @@ case "$usemorebits" in esac -case "$intsize:$longsize" in -8:*|*:8) cat <&4 + +*** Configure -Duselonglong is deprecated, using -Duse64bitint instead. +EOM + use64bitint="$define" + ;; +esac +case "$use64bits" in +"$define"|true|[yY]*) + cat <&4 + +*** Configure -Duse64bits is deprecated, using -Duse64bitint instead. +EOM + use64bitint="$define" + ;; +esac +case "$use64bitints" in +"$define"|true|[yY]*) + cat <&4 + +*** There is no Configure -Duse64bitints, using -Duse64bitint instead. +EOM + use64bitint="$define" + ;; +esac +case "$use64bitsint" in +"$define"|true|[yY]*) + cat <&4 + +*** There is no Configure -Duse64bitsint, using -Duse64bitint instead. +EOM + use64bitint="$define" + ;; +esac +case "$uselonglongs" in +"$define"|true|[yY]*) + cat <&4 + +*** There is no Configure -Duselonglongs, using -Duse64bitint instead. +EOM + use64bitint="$define" + ;; +esac +case "$use64bitsall" in +"$define"|true|[yY]*) + cat <&4 + +*** There is no Configure -Duse64bitsall, using -Duse64bitall instead. +EOM + use64bitall="$define" + ;; +esac + +case "$ccflags" in +*-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";; +esac +case "$use64bitall" in +"$define"|true|[yY]*) use64bitint="$define" ;; +esac + +case "$longsize" in +8) cat <&4 if $test -r $rsrc/patchlevel.h;then + revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h` patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h` api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h` api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` else + revision=0 patchlevel=0 subversion=0 api_revision=0 api_version=0 api_subversion=0 fi -$echo $n "(You have $package" $c -case "$package" in -"*$baserev") ;; -*) $echo $n " $baserev" $c ;; -esac +$echo $n "(You have $package revision $revision" $c $echo $n " patchlevel $patchlevel" $c test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c echo ".)" case "$osname" in dos|vms) : XXX Should be a Configure test for double-dots in filenames. - version=`echo $baserev $patchlevel $subversion | \ + version=`echo $revision $patchlevel $subversion | \ $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` api_versionstring=`echo $api_revision $api_version $api_subversion | \ $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` ;; *) - version=`echo $baserev $patchlevel $subversion | \ + version=`echo $revision $patchlevel $subversion | \ $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` api_versionstring=`echo $api_revision $api_version $api_subversion | \ $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` @@ -4712,7 +4992,7 @@ case "$installstyle" in *) dflt='lib/perl5' ;; esac ;; -*) dflt='lib/perl5' ;; +*) dflt="$installstyle" ;; esac : Probably not worth prompting for this since we prompt for all : the directories individually, and the prompt would be too long and @@ -4802,9 +5082,9 @@ case "$usethreads$usemultiplicity" in ;; *) $cat <&4 $rm -f malloc.[co] $cat </dev/null 2>&1; then + perl5=$tdir/perl + break; + elif $test -x $tdir/perl5 && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then + perl5=$tdir/perl + break; + fi + done + ;; +*) perl5="$perl5" + ;; +esac +case "$perl5" in +'') echo "None found. That's ok.";; +*) echo "Using $perl5." ;; +esac + : Determine list of previous versions to include in @INC $cat > getverlist <> getverlist <<'EOPL' # Can't have leading @ because metaconfig interprets it as a command! ;@inc_version_list=(); -$stem=dirname($sitelib); -# Redo to do opendir/readdir? +# XXX Redo to do opendir/readdir? if (-d $stem) { chdir($stem); ;@candidates = glob("5.*"); @@ -5360,10 +5776,10 @@ else { foreach $d (@candidates) { if ($d lt $version) { if ($d ge $api_versionstring) { - unshift(@inc_version_list, "$d/$archname", $d); + unshift(@inc_version_list, grep { -d } "$d/$archname", $d); } elsif ($d ge "5.005") { - unshift(@inc_version_list, $d); + unshift(@inc_version_list, grep { -d } $d); } } else { @@ -5382,8 +5798,8 @@ else { EOPL chmod +x getverlist case "$inc_version_list" in -'') if test -x $perl; then - dflt=`$perl getverlist` +'') if test -x "$perl5"; then + dflt=`$perl5 getverlist` else dflt='none' fi @@ -5391,6 +5807,16 @@ case "$inc_version_list" in $undef) dflt='none' ;; *) dflt="$inc_version_list" ;; esac +case "$dflt" in +''|' ') dflt=none ;; +esac +case "$dflt" in +5.005) case "$bincompat5005" in + $define|true|[yY]*) ;; + *) dflt=none ;; + esac + ;; +esac $cat <<'EOM' In order to ease the process of upgrading, this version of perl @@ -5408,7 +5834,7 @@ EOM rp='List of earlier versions to include in @INC?' . ./myread case "$ans" in -[Nn]one) inc_version_list=' ' ;; +[Nn]one|''|' ') inc_version_list=' ' ;; *) inc_version_list="$ans" ;; esac case "$inc_version_list" in @@ -5425,7 +5851,7 @@ $rm -f getverlist echo " " if $test -d /usr/bin -a "X$installbin" != X/usr/bin; then $cat <$first) 2>/dev/null; then if $test -f 123456789abcde; then echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4 val="$undef" else - if (echo hi >$second) 2>/dev/null; then - if $test -f /tmp/cf$$/123456789abcde; then - $cat <<'EOM' -That's peculiar... You can have filenames longer than 14 characters, but only -on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems -I shall consider your system cannot support long filenames at all. -EOM - val="$undef" - else - echo 'You can have filenames longer than 14 characters.' >&4 - val="$define" - fi - else - $cat <<'EOM' -How confusing! Some of your filesystems are sane enough to allow filenames -longer than 14 characters but some others like /tmp can't even think about them. -So, for now on, I shall assume your kernel does not allow them at all. -EOM - val="$undef" - fi + echo 'You can have filenames longer than 14 characters.'>&4 + val="$define" fi else $cat <<'EOM' -You can't have filenames longer than 14 chars. You can't even think about them! +You can't have filenames longer than 14 chars. +You can't even think about them! EOM val="$undef" fi set d_flexfnam eval $setvar -$rm -rf /tmp/cf$$ 123456789abcde* +$rm -rf 123456789abcde* : determine where library module manual pages go set man3dir man3dir none @@ -6498,7 +6908,7 @@ esac echo "If you don't want the manual sources installed, answer 'none'." prog=`echo $package | $sed 's/-*[0-9.]*$//'` case "$man3dir" in -'') dflt=`echo $man1dir | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` +'') dflt=`echo "$man1dir" | $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` if $test -d "$privlib/man/man3"; then cat <&4 @@ -6516,16 +6926,18 @@ EOM esac fi ;; -' ') dflt=none;; *) dflt="$man3dir" ;; esac +case "$dflt" in +' ') dflt=none ;; +esac echo " " fn=dn+~ rp="Where do the $package library man pages (source) go?" . ./getfile man3dir="$ans" man3direxp="$ansexp" -case "$man1dir" in +case "$man3dir" in '') man3dir=' ' installman3dir='';; esac @@ -6970,40 +7382,10 @@ else installscript="$scriptdirexp" fi -: determine where site specific architecture-dependent libraries go. -: sitelib default is /usr/local/lib/perl5/site_perl/$version -: sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname -: sitelib may have an optional trailing /share. -tdflt=`echo $sitelib | $sed 's,/share$,,'` -tdflt="$tdflt/$archname" -set sitearch sitearch none -eval $prefixit -case "$sitearch" in -'') dflt="$tdflt" ;; -*) dflt="$sitearch" ;; -esac -$cat <&4 -You requested the use of long doubles but you do not seem to have -the mathematic functions for long doubles. I'm disabling the use -of long doubles. +*** You requested the use of long doubles but you do not seem to have +*** the mathematic functions for long doubles. I'm disabling the use +*** of long doubles. + EOM uselongdouble=$undef ;; @@ -7114,26 +7497,33 @@ case "$vendorprefix" in ;; *) d_vendorbin="$define" : determine where vendor-supplied executables go. - dflt=$vendorprefix/bin + case "$vendorbin" in + '') dflt=$vendorprefix/bin ;; + *) dflt="$vendorbin" ;; + esac fn=d~+ rp='Pathname for the vendor-supplied executables directory?' . ./getfile vendorbin="$ans" vendorbinexp="$ansexp" - : Change installation prefix, if necessary. - if $test X"$prefix" != X"$installprefix"; then - installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"` - else - installvendorbin="$vendorbinexp" - fi ;; esac +: Change installation prefix, if necessary. +if $test X"$prefix" != X"$installprefix"; then + installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"` +else + installvendorbin="$vendorbinexp" +fi + +: see if qgcvt exists +set qgcvt d_qgcvt +eval $inlibc : check for length of double echo " " case "$doublesize" in '') - $echo $n "Checking to see how big your double precision numbers are...$c" >&4 + echo "Checking to see how big your double precision numbers are..." >&4 $cat >try.c <<'EOCP' #include int main() @@ -7145,7 +7535,7 @@ EOCP set try if eval $compile_ok; then doublesize=`./try` - $echo " $doublesize bytes." >&4 + echo "Your double is $doublesize bytes long." else dflt='8' echo "(I can't seem to compile the test program. Guessing...)" @@ -7177,7 +7567,7 @@ eval $setvar case "${d_longdbl}${longdblsize}" in $define) echo " " - $echo $n "Checking to see how big your long doubles are..." $c >&4 + echo "Checking to see how big your long doubles are..." >&4 $cat >try.c <<'EOCP' #include int main() @@ -7189,7 +7579,7 @@ EOCP set try if eval $compile; then longdblsize=`./try$exe_ext` - $echo " $longdblsize bytes." >&4 + echo "Your long doubles are $longdblsize bytes long." else dflt='8' echo " " @@ -7205,118 +7595,6 @@ EOCP esac $rm -f try.* try -: Check how to convert floats to strings. -if test "X$d_Gconvert" = X; then - echo " " - echo "Checking for an efficient way to convert floats to strings." - $cat >try.c < - -#define I_STDLIB $i_stdlib -#ifdef I_STDLIB -#include -#endif - -int -checkit(expect, got) -char *expect; -char *got; -{ - if (strcmp(expect, got)) { - printf("%s oddity: Expected %s, got %s\n", - myname, expect, got); - exit(1); - } -} - -int main() -{ - char buf[64]; - buf[63] = '\0'; - - /* This must be 1st test on (which?) platform */ - /* Alan Burlison */ - Gconvert((DOUBLETYPE)0.1, 8, 0, buf); - checkit("0.1", buf); - - Gconvert((DOUBLETYPE)1.0, 8, 0, buf); - checkit("1", buf); - - Gconvert((DOUBLETYPE)0.0, 8, 0, buf); - checkit("0", buf); - - Gconvert((DOUBLETYPE)-1.0, 8, 0, buf); - checkit("-1", buf); - - /* Some Linux gcvt's give 1.e+5 here. */ - Gconvert((DOUBLETYPE)100000.0, 8, 0, buf); - checkit("100000", buf); - - /* Some Linux gcvt's give -1.e+5 here. */ - Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf); - checkit("-100000", buf); - - exit(0); -} -EOP - case "$d_Gconvert" in - gconvert*) xxx_list='gconvert gcvt sprintf' ;; - gcvt*) xxx_list='gcvt gconvert sprintf' ;; - sprintf*) xxx_list='sprintf gconvert gcvt' ;; - *) xxx_list='gconvert gcvt sprintf' ;; - esac - - case "$d_longdbl$uselongdouble" in - definedefine) xxx_list="`echo $xxx_list|sed 's/gcvt/qgcvt gcvt/'`" ;; - esac - - for xxx_convert in $xxx_list; do - echo "Trying $xxx_convert..." - $rm -f try try$_o - set try -DTRY_$xxx_convert - if eval $compile; then - echo "$xxx_convert() found." >&4 - if ./try; then - echo "I'll use $xxx_convert to convert floats into a string." >&4 - break; - else - echo "...But $xxx_convert didn't work as I expected." - fi - else - echo "$xxx_convert NOT found." >&4 - fi - done - - case "$xxx_convert" in - gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;; - gcvt) d_Gconvert='gcvt((x),(n),(b))' ;; - qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;; - *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;; - esac -fi - echo " " if $test X"$d_longdbl" = X"$define"; then @@ -7428,6 +7706,162 @@ case "$sPRIfldbl" in ;; esac +: Check how to convert floats to strings. +echo " " +echo "Checking for an efficient way to convert floats to strings." +echo " " > try.c +case "$uselongdouble" in +"$define") echo "#define USE_LONG_DOUBLE" >>try.c ;; +esac +case "$d_longdbl" in +"$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;; +esac +case "$d_PRIgldbl" in +"$define") echo "#define HAS_PRIgldbl" >>try.c ;; +esac +$cat >>try.c < + +#define I_STDLIB $i_stdlib +#ifdef I_STDLIB +#include +#endif + +int +checkit(expect, got) +char *expect; +char *got; +{ + if (strcmp(expect, got)) { + printf("%s oddity: Expected %s, got %s\n", + myname, expect, got); + exit(1); + } +} + +int main() +{ + char buf[64]; + buf[63] = '\0'; + + /* This must be 1st test on (which?) platform */ + /* Alan Burlison */ + Gconvert((DOUBLETYPE)0.1, 8, 0, buf); + checkit("0.1", buf); + + Gconvert((DOUBLETYPE)1.0, 8, 0, buf); + checkit("1", buf); + + Gconvert((DOUBLETYPE)1.1, 8, 0, buf); + checkit("1.1", buf); + + Gconvert((DOUBLETYPE)1.01, 8, 0, buf); + checkit("1.01", buf); + + Gconvert((DOUBLETYPE)1.001, 8, 0, buf); + checkit("1.001", buf); + + Gconvert((DOUBLETYPE)1.0001, 8, 0, buf); + checkit("1.0001", buf); + + Gconvert((DOUBLETYPE)1.00001, 8, 0, buf); + checkit("1.00001", buf); + + Gconvert((DOUBLETYPE)1.000001, 8, 0, buf); + checkit("1.000001", buf); + + Gconvert((DOUBLETYPE)0.0, 8, 0, buf); + checkit("0", buf); + + Gconvert((DOUBLETYPE)-1.0, 8, 0, buf); + checkit("-1", buf); + + /* Some Linux gcvt's give 1.e+5 here. */ + Gconvert((DOUBLETYPE)100000.0, 8, 0, buf); + checkit("100000", buf); + + /* Some Linux gcvt's give -1.e+5 here. */ + Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf); + checkit("-100000", buf); + + exit(0); +} +EOP +case "$d_Gconvert" in +gconvert*) xxx_list='gconvert gcvt sprintf' ;; +gcvt*) xxx_list='gcvt gconvert sprintf' ;; +*) xxx_list='sprintf gconvert gcvt' ;; +esac + +case "$d_longdbl$uselongdouble$d_PRIgldbl" in +"$define$define$define") + xxx_list="`echo $xxx_list|sed s/sprintf//`" + xxx_list="sprintf $xxx_list" + case "$d_qgcvt" in + "$define") xxx_list="qgcvt $xxx_list" ;; + esac + ;; +esac + +for xxx_convert in $xxx_list; do + echo "Trying $xxx_convert..." + $rm -f try try$_o + set try -DTRY_$xxx_convert + if eval $compile; then + echo "$xxx_convert() found." >&4 + if ./try; then + echo "I'll use $xxx_convert to convert floats into a string." >&4 + break; + else + echo "...But $xxx_convert didn't work as I expected." + fi + else + echo "$xxx_convert NOT found." >&4 + fi +done + +case "$xxx_convert" in +gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;; +gcvt) d_Gconvert='gcvt((x),(n),(b))' ;; +qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;; +*) case "$uselongdouble$d_longdbl$d_PRIgldbl" in + "$define$define$define") + d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;; + *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;; + esac + ;; +esac + : Initialize h_fcntl h_fcntl=false @@ -8251,11 +8685,7 @@ set endpwent d_endpwent eval $inlibc : see if endservent exists -set endservent d_endsent -eval $inlibc - -: see if endspent exists -set endspent d_endspent +set endservent d_endsent eval $inlibc : Locate the flags for 'open()' @@ -8396,7 +8826,8 @@ extern int errno; #ifdef I_UNISTD #include #endif -#ifdef $i_string +#$i_string I_STRING +#ifdef I_STRING #include #else #include @@ -8836,6 +9267,10 @@ $rm -f try.* try set d_fpos64_t eval $setvar +: see if frexpl exists +set frexpl d_frexpl +eval $inlibc + hasstruct='varname=$1; struct=$2; shift; shift; while $test $# -ge 2; do case "$1" in @@ -8913,6 +9348,15 @@ esac set getcwd d_getcwd eval $inlibc +: see if getespwnam exists +set getespwnam d_getespwnam +eval $inlibc + + +: see if getfsstat exists +set getfsstat d_getfsstat +eval $inlibc + : see if getgrent exists set getgrent d_getgrent eval $inlibc @@ -9086,6 +9530,10 @@ echo " " set d_getprotoprotos getprotoent $i_netdb netdb.h eval $hasproto +: see if getprpwnam exists +set getprpwnam d_getprpwnam +eval $inlibc + : see if getpwent exists set getpwent d_getpwent eval $inlibc @@ -9108,10 +9556,6 @@ echo " " set d_getservprotos getservent $i_netdb netdb.h eval $hasproto -: see if getspent exists -set getspent d_getspent -eval $inlibc - : see if getspnam exists set getspnam d_getspnam eval $inlibc @@ -9321,6 +9765,14 @@ set d_isascii eval $setvar $rm -f isascii* +: see if isnan exists +set isnan d_isnan +eval $inlibc + +: see if isnanl exists +set isnanl d_isnanl +eval $inlibc + : see if killpg exists set killpg d_killpg eval $inlibc @@ -9403,7 +9855,7 @@ echo 'int main() { long long x = 7; return 0; }' > try.c set try if eval $compile; then val="$define" - echo "You have have long long." + echo "You have long long." else val="$undef" echo "You do not have long long." @@ -9416,7 +9868,7 @@ eval $setvar case "${d_longlong}${longlongsize}" in $define) echo " " - $echo $n "Checking to see how big your long longs are..." $c >&4 + echo "Checking to see how big your long longs are..." >&4 $cat >try.c <<'EOCP' #include int main() @@ -9428,7 +9880,7 @@ EOCP set try if eval $compile_ok; then longlongsize=`./try$exe_ext` - $echo " $longlongsize bytes." >&4 + echo "Your long longs are $longlongsize bytes long." else dflt='8' echo " " @@ -9444,10 +9896,19 @@ EOCP esac $rm -f try.* try +: see if prototype for lseek is available +echo " " +set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h +eval $hasproto + : see if lstat exists set lstat d_lstat eval $inlibc +: see if madvise exists +set madvise d_madvise +eval $inlibc + : see if mblen exists set mblen d_mblen eval $inlibc @@ -9531,6 +9992,10 @@ esac +: see if modfl exists +set modfl d_modfl +eval $inlibc + : see if mprotect exists set mprotect d_mprotect eval $inlibc @@ -9653,7 +10118,7 @@ case "$quadtype" in '') echo "Alas, no 64-bit integer types in sight." >&4 d_quad="$undef" ;; -*) if test X"$use64bits" = Xdefine -o X"$longsize" = X8; then +*) if test X"$use64bitint" = Xdefine -o X"$longsize" = X8; then verb="will" else verb="could" @@ -9697,7 +10162,7 @@ $rm -f try.c try echo " " $echo "Choosing the C types to be used for Perl's internal types..." >&4 -case "$use64bits:$d_quad:$quadtype" in +case "$use64bitint:$d_quad:$quadtype" in define:define:?*) ivtype="$quadtype" uvtype="$uquadtype" @@ -9900,6 +10365,39 @@ esac $rm -f try.* try +case "$d_nv_preserves_uv" in +"$define") d_nv_preserves_uv_bits=`expr $uvsize \* 8` ;; +*) $echo "Checking how many bits of your UVs your NVs can preserve..." >&4 + $cat <try.c +#include +int main() { + $uvtype u = 0; + int n = 8 * $uvsize; + int i; + for (i = 0; i < n; i++) { + u = u << 1 | ($uvtype)1; + if (($uvtype)($nvtype)u != u) + break; + } + printf("%d\n", i); + exit(0); +} +EOP + set try + if eval $compile; then + d_nv_preserves_uv_bits="`./try$exe_ext`" + fi + case "$d_nv_preserves_uv_bits" in + [1-9]*) $echo "Your NVs can preserve $d_nv_preserves_uv_bits bits of your UVs." 2>&1 ;; + *) $echo "Can't figure out how many bits your NVs preserve." 2>&1 + d_nv_preserves_uv_bits="$undef" + ;; + esac + $rm -f try.* try + ;; +esac + + : check for off64_t echo " " @@ -10694,6 +11192,10 @@ eval $inlibc set setpriority d_setprior eval $inlibc +: see if setproctitle exists +set setproctitle d_setproctitle +eval $inlibc + : see if setpwent exists set setpwent d_setpwent eval $inlibc @@ -10726,10 +11228,6 @@ eval $inlibc set setsid d_setsid eval $inlibc -: see if setspent exists -set setspent d_setspent -eval $inlibc - : see if setvbuf exists set setvbuf d_setvbuf eval $inlibc @@ -10758,10 +11256,19 @@ $define) *) dflt='n';; esac echo "$package can use the sfio library, but it is experimental." + case "$useperlio" in + "$undef") + echo "For sfio also the PerlIO abstraction layer is needed." + echo "Earlier you said you wouldn't want that." + ;; + esac rp="You seem to have sfio available, do you want to try using it?" . ./myread case "$ans" in - y|Y) ;; + y|Y) echo "Ok, turning on both sfio and PerlIO, then." + useperlio="$define" + val="$define" + ;; *) echo "Ok, avoiding sfio this time. I'll use stdio instead." val="$undef" : Remove sfio from list of libraries to use @@ -10774,8 +11281,9 @@ $define) ;; *) case "$usesfio" in true|$define|[yY]*) - echo "Sorry, cannot find sfio on this machine" >&4 - echo "Ignoring your setting of usesfio=$usesfio" >&4 + echo "Sorry, cannot find sfio on this machine." >&4 + echo "Ignoring your setting of usesfio=$usesfio." >&4 + val="$undef" ;; esac ;; @@ -10944,36 +11452,9 @@ set d_sigsetjmp eval $setvar $rm -f try.c try -: 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_ask - -: check for socklen_t -echo " " -echo "Checking to see if you have socklen_t..." >&4 -$cat >try.c < -#$d_socket HAS_SOCKET -#ifdef HAS_SOCKET -#include -#endif -int main() { socklen_t x = 16; } -EOCP -set try -if eval $compile; then - val="$define" - echo "You have socklen_t." -else - val="$undef" - echo "You do not have socklen_t." - case "$sizetype" in - size_t) echo "(You do have size_t, that might work.)" ;; - esac -fi -$rm -f try try.* -set d_socklen_t -eval $setvar +: see if socks5_init exists +set socks5_init d_socks5_init +eval $inlibc : see if sys/stat.h is available set sys/stat.h i_sysstat @@ -11271,6 +11752,54 @@ eval $inlibc set strtoll d_strtoll eval $inlibc +case "$d_longlong-$d_strtoll" in +"$define-$define") + $cat <try.c <<'EOCP' +#include +#ifdef __hpux +#define strtoll __strtoll +#endif +#include +extern long long int strtoll(char *s, char **, int); +static int bad = 0; +int check(char *s, long long ell, int een) { + long long gll; + errno = 0; + gll = strtoll(s, 0, 10); + if (!((gll == ell) && (errno == een))) + bad++; +} +int main() { + check(" 1", 1LL, 0); + check(" 0", 0LL, 0); + check("-1", -1LL, 0); + check("-9223372036854775808", -9223372036854775808LL, 0); + check("-9223372036854775808", -9223372036854775808LL, 0); + check(" 9223372036854775807", 9223372036854775807LL, 0); + check("-9223372036854775808", -9223372036854775808LL, 0); + check(" 9223372036854775808", 9223372036854775807LL, ERANGE); + check("-9223372036854775809", -9223372036854775808LL, ERANGE); + if (!bad) + printf("ok\n"); +} +EOCP + set try + if eval $compile; then + case "`./try`" in + ok) echo "Your strtoll() seems to be working okay." ;; + *) cat <&4 +Your strtoll() doesn't seem to be working okay. +EOM + d_strtoll="$undef" + ;; + esac + fi + ;; +esac + : see if strtoul exists set strtoul d_strtoul eval $inlibc @@ -11279,6 +11808,49 @@ eval $inlibc set strtoull d_strtoull eval $inlibc +case "$d_longlong-$d_strtoull" in +"$define-$define") + $cat <try.c <<'EOCP' +#include +#ifdef __hpux +#define strtoull __strtoull +#endif +#include +extern unsigned long long int strtoull(char *s, char **, int); +static int bad = 0; +int check(char *s, long long eull, int een) { + long long gull; + errno = 0; + gull = strtoull(s, 0, 10); + if (!((gull == eull) && (errno == een))) + bad++; +} +int main() { + check(" 1", 1LL, 0); + check(" 0", 0LL, 0); + check("18446744073709551615", 18446744073709551615ULL, 0); + check("18446744073709551616", 18446744073709551615ULL, ERANGE); + if (!bad) + printf("ok\n"); +} +EOCP + set try + if eval $compile; then + case "`./try`" in + ok) echo "Your strtoull() seems to be working okay." ;; + *) cat <&4 +Your strtoull() doesn't seem to be working okay. +EOM + d_strtoull="$undef" + ;; + esac + fi + ;; +esac + : see if strtouq exists set strtouq d_strtouq eval $inlibc @@ -11533,7 +12105,7 @@ case "$crosscompile" in esac case "$osname" in -next|rhapsody) multiarch="$define" ;; +next|rhapsody|darwin) multiarch="$define" ;; esac case "$multiarch" in ''|[nN]*) multiarch="$undef" ;; @@ -11595,6 +12167,9 @@ EOCP esac +: set the base revision +baserev=5.0 + : check for ordering of bytes in a long echo " " case "$crosscompile$multiarch" in @@ -12236,9 +12811,52 @@ EOM $rm -f core try.core core.try.* case "$fflushNULL" in x) $cat >&4 <tryp.c < +int +main(int argc, char **argv) +{ + char buf[1024]; + int i; + char *bp = buf; + while (1) { + while ((i = getc(stdin)) != -1 + && (*bp++ = i) != '\n' + && bp < &buf[1024]) + /* DO NOTHING */ ; + *bp = '\0'; + fprintf(stdout, "%s", buf); + fflush(NULL); + if (i == -1) + return 0; + bp = buf; + } +} +EOCP + fflushNULL="$define" + set tryp + if eval $compile; then + $rm -f tryp.out + $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out + if cmp tryp.c tryp.out >/dev/null 2>&1; then + $cat >&4 <&4 <&4 <&4 <tryp.c < +int +main(int argc, char **argv) +{ + char buf[1024]; + int i; + char *bp = buf; + while (1) { + while ((i = getc(stdin)) != -1 + && (*bp++ = i) != '\n' + && bp < &buf[1024]) + /* DO NOTHING */ ; + *bp = '\0'; + fprintf(stdout, "%s", buf); + fflush(stdin); + if (i == -1) + return 0; + bp = buf; + } +} +EOCP + set tryp + if eval $compile; then + $rm -f tryp.out + $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out + if cmp tryp.c tryp.out >/dev/null 2>&1; then + $cat >&4 </dev/null - if $test -s try.out -a "X$?" = X42; then - fflushall="`$cat try.out`" - fi - fi - $rm -f core try.core core.try.* + : now check for fflushall behaviour case "$fflushall" in - x) $cat >&4 <&4 </dev/null + if $test -s try.out -a "X$?" = X42; then + fflushall="`$cat try.out`" + fi + fi + $rm -f core try.core core.try.* + case "$fflushall" in + x) $cat >&4 <&4 <&4 <&4 <&4 <&4 <&4 ;; *) gidsize=$yyy - echo "Your $zzz size is $gidsize bytes." + echo "Your $zzz is $gidsize bytes long." ;; esac else @@ -12582,18 +13243,21 @@ if $test X"$ivsize" = X8; then uvuformat="$sPRIu64" uvoformat="$sPRIo64" uvxformat="$sPRIx64" + uvXformat="$sPRIX64" else if $test X"$ivsize" = X"$longsize"; then ivdformat='"ld"' uvuformat='"lu"' uvoformat='"lo"' uvxformat='"lx"' + uvXformat='"lX"' else if $test X"$ivsize" = X"$intsize"; then ivdformat='"d"' uvuformat='"u"' uvoformat='"o"' uvxformat='"x"' + uvXformat='"X"' else : far out if $test X"$ivsize" = X"$shortsize"; then @@ -12601,11 +13265,28 @@ else uvuformat='"hu"' uvoformat='"ho"' uvxformat='"hx"' + uvXformat='"hX"' fi fi fi fi +if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then + nveformat="$sPRIeldbl" + nvfformat="$sPRIfldbl" + nvgformat="$sPRIgldbl" + nvEformat="$sPRIEldbl" + nvFformat="$sPRIFldbl" + nvGformat="$sPRIGldbl" +else + nveformat='"e"' + nvfformat='"f"' + nvgformat='"g"' + nvEformat='"E"' + nvFformat='"F"' + nvGformat='"G"' +fi + case "$ivdformat" in '') echo "$0: Fatal: failed to find format strings, cannot continue." >& 4 exit 1 @@ -12746,6 +13427,11 @@ EOSH chmod +x protochk $eunicefix protochk +: 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_ask + : check for type of arguments to gethostbyaddr. if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then case "$d_gethbyaddr" in @@ -12916,7 +13602,7 @@ pm_apiversion='5.005' echo " " case "$ptrsize" in '') - $echo $n "Checking to see how big your pointers are...$c" >&4 + echo "Checking to see how big your pointers are..." >&4 if test "$voidflags" -gt 7; then echo '#define VOID_PTR char *' > try.c else @@ -12933,7 +13619,7 @@ EOCP set try if eval $compile_ok; then ptrsize=`./try` - $echo " $ptrsize bytes." >&4 + echo "Your pointers are $ptrsize bytes long." else dflt='4' echo "(I can't seem to compile the test program. Guessing...)" >&4 @@ -13397,6 +14083,100 @@ echo $sig_name | $awk \ }' $rm -f signal signal.c signal.awk signal.lst signal_cmd +echo " " +case "$sizetype" in +*_t) zzz="$sizetype" ;; +*) zzz="filesize" ;; +esac +echo "Checking the size of $zzz..." >&4 +cat > try.c < +#include +int main() { + printf("%d\n", (int)sizeof($sizetype)); + exit(0); +} +EOCP +set try +if eval $compile_ok; then + yyy=`./try` + case "$yyy" in + '') sizesize=4 + echo "(I can't execute the test program--guessing $sizesize.)" >&4 + ;; + *) sizesize=$yyy + echo "Your $zzz size is $sizesize bytes." + ;; + esac +else + sizesize=4 + echo "(I can't compile the test program--guessing $sizesize.)" >&4 +fi + + +: check for socklen_t +echo " " +echo "Checking to see if you have socklen_t..." >&4 +$cat >try.c < +#$d_socket HAS_SOCKET +#ifdef HAS_SOCKET +#include +#endif +int main() { socklen_t x = 16; } +EOCP +set try +if eval $compile; then + val="$define" + echo "You have socklen_t." +else + val="$undef" + echo "You do not have socklen_t." + case "$sizetype" in + size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;; + esac +fi +$rm -f try try.* +set d_socklen_t +eval $setvar + +: check for type of the size argument to socket calls +case "$d_socket" in +"$define") + $cat <&4 ;; *) uidsize=$yyy - echo "Your $zzz size is $uidsize bytes." + echo "Your $zzz is $uidsize bytes long." ;; esac else @@ -13683,6 +14463,14 @@ eval $setvar set iconv.h i_iconv eval $inhdr +: see if this is a ieeefp.h system +set ieeefp.h i_ieeefp +eval $inhdr + +: see if this is a libutil.h system +set libutil.h i_libutil +eval $inhdr + : see if locale.h is available set locale.h i_locale eval $inhdr @@ -13762,6 +14550,10 @@ eval $inhdr set poll.h i_poll eval $inhdr +: see if this is a prot.h system +set prot.h i_prot +eval $inhdr + echo " " $echo "Guessing which symbols your C compiler and preprocessor define..." >&4 $cat <<'EOSH' > Cppsym.know @@ -13830,8 +14622,9 @@ $osname EOSH ./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a ./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b -$cat Cppsym.a Cppsym.b | $tr ' ' $trnl | sort | uniq > Cppsym.know -$rm -f Cppsym.a Cppsym.b +$cat Cppsym.know > Cppsym.c +$cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | sort | uniq > Cppsym.know +$rm -f Cppsym.a Cppsym.b Cppsym.c cat < Cppsym $startsh if $test \$# -gt 0; then @@ -13867,13 +14660,12 @@ cat <<'EOSH' >> Cppsym.try echo '}' >> try.c EOSH cat <> Cppsym.try -cc="$cc" -optimize="$optimize" ccflags="$ccflags" -ldflags="$ldflags" -libs="$libs" -exe_ext="$exe_ext" -$cc $optimize $ccflags $ldflags -o try try.c $libs && ./try$exe_ext +case "$osname-$gccversion" in +irix-) ccflags="\$ccflags -woff 1178" ;; +os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;; +esac +$cc $optimize \$ccflags $ldflags -o try try.c $libs && ./try$exe_ext EOSH chmod +x Cppsym.try $eunicefix Cppsym.try @@ -13927,7 +14719,7 @@ if $test -z ccsym.raw; then else if $test -s ccsym.com; then echo "Your C compiler and pre-processor define these symbols:" - $sed -e 's/\(.*\)=.*/\1/' ccsym.com + $sed -e 's/\(..*\)=.*/\1/' ccsym.com also='also ' symbols='ones' cppccsymbols=`$cat ccsym.com` @@ -13937,7 +14729,7 @@ else if $test -s ccsym.cpp; then $test "$also" && echo " " echo "Your C pre-processor ${also}defines the following symbols:" - $sed -e 's/\(.*\)=.*/\1/' ccsym.cpp + $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp also='further ' cppsymbols=`$cat ccsym.cpp` cppsymbols=`echo $cppsymbols` @@ -13946,14 +14738,14 @@ else if $test -s ccsym.own; then $test "$also" && echo " " echo "Your C compiler ${also}defines the following cpp symbols:" - $sed -e 's/\(.*\)=1/\1/' ccsym.own - $sed -e 's/\(.*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true + $sed -e 's/\(..*\)=1/\1/' ccsym.own + $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true ccsymbols=`$cat ccsym.own` ccsymbols=`echo $ccsymbols` $test "$silent" || sleep 1 fi fi -$rm -f ccsym* +$rm -f ccsym* Cppsym.* : see if this is a termio system val="$undef" @@ -14120,6 +14912,10 @@ $rm -f varargs* set stddef.h i_stddef eval $inhdr +: see if this is a sunmath.h system +set sunmath.h i_sunmath +eval $inhdr + : see if sys/access.h is available set sys/access.h i_sysaccess eval $inhdr @@ -14291,7 +15087,7 @@ for xxx in $known_extensions ; do NDBM_File|ndbm_fil) case "$i_ndbm" in $define) - case "$osname-$use64bits" in + case "$osname-$use64bitint" in hpux-define) case "$libs" in *-lndbm*) avail_ext="$avail_ext $xxx" ;; @@ -14305,7 +15101,7 @@ for xxx in $known_extensions ; do ODBM_File|odbm_fil) case "${i_dbm}${i_rpcsvcdbm}" in *"${define}"*) - case "$osname-$use64bits" in + case "$osname-$use64bitint" in hpux-define) case "$libs" in *-ldbm*) avail_ext="$avail_ext $xxx" ;; @@ -14331,6 +15127,12 @@ for xxx in $known_extensions ; do true|$define|y) avail_ext="$avail_ext $xxx" ;; esac ;; + Sys/Syslog|sys/syslog) + : XXX syslog requires socket + case "$d_socket" in + true|$define|y) avail_ext="$avail_ext $xxx" ;; + esac + ;; Thread|thread) case "$usethreads" in true|$define|y) avail_ext="$avail_ext $xxx" ;; @@ -14588,6 +15390,7 @@ cc='$cc' cccdlflags='$cccdlflags' ccdlflags='$ccdlflags' ccflags='$ccflags' +ccflags_uselargefiles='$ccflags_uselargefiles' ccsymbols='$ccsymbols' cf_by='$cf_by' cf_email='$cf_email' @@ -14668,7 +15471,6 @@ d_endnent='$d_endnent' d_endpent='$d_endpent' d_endpwent='$d_endpwent' d_endsent='$d_endsent' -d_endspent='$d_endspent' d_eofnblk='$d_eofnblk' d_eunice='$d_eunice' d_fchmod='$d_fchmod' @@ -14683,6 +15485,7 @@ d_flock='$d_flock' d_fork='$d_fork' d_fpathconf='$d_fpathconf' d_fpos64_t='$d_fpos64_t' +d_frexpl='$d_frexpl' d_fs_data_s='$d_fs_data_s' d_fseeko='$d_fseeko' d_fsetpos='$d_fsetpos' @@ -14691,6 +15494,8 @@ d_fstatvfs='$d_fstatvfs' d_ftello='$d_ftello' d_ftime='$d_ftime' d_getcwd='$d_getcwd' +d_getespwnam='$d_getespwnam' +d_getfsstat='$d_getfsstat' d_getgrent='$d_getgrent' d_getgrps='$d_getgrps' d_gethbyaddr='$d_gethbyaddr' @@ -14714,12 +15519,12 @@ d_getpgrp='$d_getpgrp' d_getppid='$d_getppid' d_getprior='$d_getprior' d_getprotoprotos='$d_getprotoprotos' +d_getprpwnam='$d_getprpwnam' d_getpwent='$d_getpwent' d_getsbyname='$d_getsbyname' d_getsbyport='$d_getsbyport' d_getsent='$d_getsent' d_getservprotos='$d_getservprotos' -d_getspent='$d_getspent' d_getspnam='$d_getspnam' d_gettimeod='$d_gettimeod' d_gnulibc='$d_gnulibc' @@ -14731,6 +15536,8 @@ d_index='$d_index' d_inetaton='$d_inetaton' d_int64_t='$d_int64_t' d_isascii='$d_isascii' +d_isnan='$d_isnan' +d_isnanl='$d_isnanl' d_killpg='$d_killpg' d_lchown='$d_lchown' d_ldbl_dig='$d_ldbl_dig' @@ -14739,7 +15546,9 @@ d_locconv='$d_locconv' d_lockf='$d_lockf' d_longdbl='$d_longdbl' d_longlong='$d_longlong' +d_lseekproto='$d_lseekproto' d_lstat='$d_lstat' +d_madvise='$d_madvise' d_mblen='$d_mblen' d_mbstowcs='$d_mbstowcs' d_mbtowc='$d_mbtowc' @@ -14755,6 +15564,7 @@ d_mkstemp='$d_mkstemp' d_mkstemps='$d_mkstemps' d_mktime='$d_mktime' d_mmap='$d_mmap' +d_modfl='$d_modfl' d_mprotect='$d_mprotect' d_msg='$d_msg' d_msg_ctrunc='$d_msg_ctrunc' @@ -14771,6 +15581,7 @@ d_munmap='$d_munmap' d_mymalloc='$d_mymalloc' d_nice='$d_nice' d_nv_preserves_uv='$d_nv_preserves_uv' +d_nv_preserves_uv_bits='$d_nv_preserves_uv_bits' d_off64_t='$d_off64_t' d_old_pthread_create_joinable='$d_old_pthread_create_joinable' d_oldpthreads='$d_oldpthreads' @@ -14778,6 +15589,7 @@ d_oldsock='$d_oldsock' d_open3='$d_open3' d_pathconf='$d_pathconf' d_pause='$d_pause' +d_perl_otherlibdirs='$d_perl_otherlibdirs' d_phostname='$d_phostname' d_pipe='$d_pipe' d_poll='$d_poll' @@ -14791,6 +15603,7 @@ d_pwexpire='$d_pwexpire' d_pwgecos='$d_pwgecos' d_pwpasswd='$d_pwpasswd' d_pwquota='$d_pwquota' +d_qgcvt='$d_qgcvt' d_quad='$d_quad' d_readdir='$d_readdir' d_readlink='$d_readlink' @@ -14823,6 +15636,7 @@ d_setpgid='$d_setpgid' d_setpgrp2='$d_setpgrp2' d_setpgrp='$d_setpgrp' d_setprior='$d_setprior' +d_setproctitle='$d_setproctitle' d_setpwent='$d_setpwent' d_setregid='$d_setregid' d_setresgid='$d_setresgid' @@ -14832,7 +15646,6 @@ d_setrgid='$d_setrgid' d_setruid='$d_setruid' d_setsent='$d_setsent' d_setsid='$d_setsid' -d_setspent='$d_setspent' d_setvbuf='$d_setvbuf' d_sfio='$d_sfio' d_shm='$d_shm' @@ -14846,6 +15659,7 @@ d_sigsetjmp='$d_sigsetjmp' d_socket='$d_socket' d_socklen_t='$d_socklen_t' d_sockpair='$d_sockpair' +d_socks5_init='$d_socks5_init' d_sqrtl='$d_sqrtl' d_statblks='$d_statblks' d_statfs_f_flags='$d_statfs_f_flags' @@ -14888,6 +15702,7 @@ d_umask='$d_umask' d_uname='$d_uname' d_union_semun='$d_union_semun' d_ustat='$d_ustat' +d_vendorarch='$d_vendorarch' d_vendorbin='$d_vendorbin' d_vendorlib='$d_vendorlib' d_vfork='$d_vfork' @@ -14931,6 +15746,7 @@ freetype='$freetype' full_ar='$full_ar' full_csh='$full_csh' full_sed='$full_sed' +gccosandvers='$gccosandvers' gccversion='$gccversion' gidformat='$gidformat' gidsign='$gidsign' @@ -14966,7 +15782,9 @@ i_float='$i_float' i_gdbm='$i_gdbm' i_grp='$i_grp' i_iconv='$i_iconv' +i_ieeefp='$i_ieeefp' i_inttypes='$i_inttypes' +i_libutil='$i_libutil' i_limits='$i_limits' i_locale='$i_locale' i_machcthr='$i_machcthr' @@ -14980,6 +15798,7 @@ i_neterrno='$i_neterrno' i_netinettcp='$i_netinettcp' i_niin='$i_niin' i_poll='$i_poll' +i_prot='$i_prot' i_pthread='$i_pthread' i_pwd='$i_pwd' i_rpcsvcdbm='$i_rpcsvcdbm' @@ -14991,6 +15810,7 @@ i_stdarg='$i_stdarg' i_stddef='$i_stddef' i_stdlib='$i_stdlib' i_string='$i_string' +i_sunmath='$i_sunmath' i_sysaccess='$i_sysaccess' i_sysdir='$i_sysdir' i_sysfile='$i_sysfile' @@ -15047,6 +15867,7 @@ installsitebin='$installsitebin' installsitelib='$installsitelib' installstyle='$installstyle' installusrbinperl='$installusrbinperl' +installvendorarch='$installvendorarch' installvendorbin='$installvendorbin' installvendorlib='$installvendorlib' intsize='$intsize' @@ -15059,6 +15880,7 @@ large='$large' ld='$ld' lddlflags='$lddlflags' ldflags='$ldflags' +ldflags_uselargefiles='$ldflags_uselargefiles' ldlibpthname='$ldlibpthname' less='$less' lib_ext='$lib_ext' @@ -15071,6 +15893,7 @@ libsfiles='$libsfiles' libsfound='$libsfound' libspath='$libspath' libswanted='$libswanted' +libswanted_uselargefiles='$libswanted_uselargefiles' line='$line' lint='$lint' lkflags='$lkflags' @@ -15122,6 +15945,12 @@ nm_opt='$nm_opt' nm_so_opt='$nm_so_opt' nonxs_ext='$nonxs_ext' nroff='$nroff' +nvEformat='$nvEformat' +nvFformat='$nvFformat' +nvGformat='$nvGformat' +nveformat='$nveformat' +nvfformat='$nvfformat' +nvgformat='$nvgformat' nvsize='$nvsize' nvtype='$nvtype' o_nonblock='$o_nonblock' @@ -15131,11 +15960,13 @@ optimize='$optimize' orderlib='$orderlib' osname='$osname' osvers='$osvers' +otherlibdirs='$otherlibdirs' package='$package' pager='$pager' passcat='$passcat' patchlevel='$patchlevel' path_sep='$path_sep' +perl5='$perl5' perl='$perl' perladmin='$perladmin' perlpath='$perlpath' @@ -15159,6 +15990,7 @@ randfunc='$randfunc' randseedtype='$randseedtype' ranlib='$ranlib' rd_nodata='$rd_nodata' +revision='$revision' rm='$rm' rmail='$rmail' runnm='$runnm' @@ -15200,9 +16032,11 @@ sitearchexp='$sitearchexp' sitebin='$sitebin' sitebinexp='$sitebinexp' sitelib='$sitelib' +sitelib_stem='$sitelib_stem' sitelibexp='$sitelibexp' siteprefix='$siteprefix' siteprefixexp='$siteprefixexp' +sizesize='$sizesize' sizetype='$sizetype' sleep='$sleep' smail='$smail' @@ -15210,6 +16044,7 @@ small='$small' so='$so' sockethdr='$sockethdr' socketlib='$socketlib' +socksizetype='$socksizetype' sort='$sort' spackage='$spackage' spitshell='$spitshell' @@ -15257,7 +16092,8 @@ uname='$uname' uniq='$uniq' uquadtype='$uquadtype' use5005threads='$use5005threads' -use64bits='$use64bits' +use64bitall='$use64bitall' +use64bitint='$use64bitint' usedl='$usedl' useithreads='$useithreads' uselargefiles='$uselargefiles' @@ -15277,14 +16113,18 @@ usevendorprefix='$usevendorprefix' usevfork='$usevfork' usrinc='$usrinc' uuname='$uuname' +uvXformat='$uvXformat' uvoformat='$uvoformat' uvsize='$uvsize' uvtype='$uvtype' uvuformat='$uvuformat' uvxformat='$uvxformat' +vendorarch='$vendorarch' +vendorarchexp='$vendorarchexp' vendorbin='$vendorbin' vendorbinexp='$vendorbinexp' vendorlib='$vendorlib' +vendorlib_stem='$vendorlib_stem' vendorlibexp='$vendorlibexp' vendorprefix='$vendorprefix' vendorprefixexp='$vendorprefixexp'