X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/caf85fe8439bfc0ff87181eff62bb3b5ad8c826d..f688e3acac1195ff1fc1037245fc7d642c63538d:/Configure diff --git a/Configure b/Configure index d510ca7..c9152d7 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 Tue Mar 13 05:21:04 EET 2001 [metaconfig 3.0 PL70] +# Generated on Fri Aug 17 15:57:38 EET DST 2001 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ </dev/null 2>&1`; then spitshell=cat xcat=/bin/cat test -f $xcat || xcat=/usr/bin/cat - echo "#!$xcat" >try - $eunicefix try - chmod +x try - ./try > today + echo "#!$xcat" >sharp + $eunicefix sharp + chmod +x sharp + ./sharp > today if test -s today; then sharpbang='#!' else - echo "#! $xcat" > try - $eunicefix try - chmod +x try - ./try > today + echo "#! $xcat" > sharp + $eunicefix sharp + chmod +x sharp + ./sharp > today if test -s today; then sharpbang='#! ' else @@ -1123,28 +1174,28 @@ else echo "I presume that if # doesn't work, #! won't work either!" sharpbang=': use ' fi -rm -f try today +rm -f sharp today : figure out how to guarantee sh startup case "$startsh" in '') startsh=${sharpbang}${sh} ;; *) esac -cat >try <sharp <>cmdline.opt < cmdl.opt +$arg +EOC + arg_exp=`cat cmdl.opt` + args_exp="$args_exp$args_sep'$arg_exp'" argn=`expr $argn + 1` + args_sep=' ' done +# args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@" +# used by ./hints/os2.sh +rm -f cmdl.opt : produce awk script to parse command line options cat >options.awk <<'EOF' @@ -1486,10 +1549,10 @@ esac : script used to extract .SH files with variable substitutions cat >extract <<'EOS' -CONFIGDOTSH=true +PERL_CONFIG_SH=true echo "Doing variable substitutions on .SH files..." -if test -f $src/MANIFEST; then - set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH$'` +if test -f MANIFEST; then + set x `awk '{print $1}' < MANIFEST | grep '\.SH$'` else echo "(Looking for .SH files under the source directory.)" set x `(cd $src; find . -name "*.SH" -print)` @@ -1572,7 +1635,7 @@ true) echo " " . UU/extract rm -rf UU - echo "Done." + echo "Extraction done." exit 0 ;; esac @@ -1963,6 +2026,7 @@ $eunicefix loc loclist=" awk cat +chmod comm cp echo @@ -2129,7 +2193,7 @@ int main(int argc, char *argv[]) { return 0; } EOM - if $cc -o try $ccflags try.c; then + if $cc -o try $ccflags $ldflags try.c; then : else echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4 @@ -2262,8 +2326,8 @@ $define|true|[yY]*) fi done # Sanity check 2. - if test ! -f t/base/commonsense.t; then - echo "Failed to create the symlinks. Aborting." >&4 + if test ! -f t/base/lex.t; then + echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4 exit 1 fi cd UU @@ -2276,6 +2340,250 @@ $define|true|[yY]*) ;; esac + +case "$usecrosscompile" in +$define|true|[yY]*) + $echo "Cross-compiling..." + croak='' + case "$cc" in + *-*-gcc) # A cross-compiling gcc, probably. + targetarch=`$echo $cc|$sed 's/-gcc$//'` + ar=$targetarch-ar + # leave out ld, choosing it is more complex + nm=$targetarch-nm + ranlib=$targetarch-ranlib + $echo 'extern int foo;' > try.c + set X `$cc -v -E try.c 2>&1 | $awk '/^#include &4 + for i in $*; do + j="`$echo $i|$sed 's,/include$,/lib,'`" + if $test -d $j; then + libpth="$libpth $j" + fi + done + libpth="`$echo $libpth|$sed 's/^ //'`" + echo "Guessing libpth '$libpth'." >&4 + fi + $rm -f try.c + ;; + esac + case "$targetarch" in + '') echo "Targetarch not defined." >&4; croak=y ;; + *) echo "Using targetarch $targetarch." >&4 ;; + esac + case "$incpth" in + '') echo "Incpth not defined." >&4; croak=y ;; + *) echo "Using incpth '$incpth'." >&4 ;; + esac + case "$libpth" in + '') echo "Libpth not defined." >&4; croak=y ;; + *) echo "Using libpth '$libpth'." >&4 ;; + esac + case "$usrinc" in + '') for i in $incpth; do + if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then + usrinc=$i + echo "Guessing usrinc $usrinc." >&4 + break + fi + done + case "$usrinc" in + '') echo "Usrinc not defined." >&4; croak=y ;; + esac + ;; + *) echo "Using usrinc $usrinc." >&4 ;; + esac + case "$targethost" in + '') echo "Targethost not defined." >&4; croak=y ;; + *) echo "Using targethost $targethost." >&4 + esac + locincpth=' ' + loclibpth=' ' + case "$croak" in + y) echo "Cannot continue, aborting." >&4; exit 1 ;; + esac + case "$src" in + /*) run=$src/Cross/run + targetmkdir=$src/Cross/mkdir + to=$src/Cross/to + from=$src/Cross/from + ;; + *) pwd=`$test -f ../Configure & cd ..; pwd` + run=$pwd/Cross/run + targetmkdir=$pwd/Cross/mkdir + to=$pwd/Cross/to + from=$pwd/Cross/from + ;; + esac + case "$targetrun" in + '') targetrun=ssh ;; + esac + case "$targetto" in + '') targetto=scp ;; + esac + case "$targetfrom" in + '') targetfrom=scp ;; + esac + run=$run-$targetrun + to=$to-$targetto + from=$from-$targetfrom + case "$targetdir" in + '') targetdir=/tmp + echo "Guessing targetdir $targetdir." >&4 + ;; + esac + case "$targetuser" in + '') targetuser=root + echo "Guessing targetuser $targetuser." >&4 + ;; + esac + case "$targetfrom" in + scp) q=-q ;; + *) q='' ;; + esac + case "$targetrun" in + ssh|rsh) + cat >$run <&4 + exit 1 + ;; + esac + case "$targetmkdir" in + */Cross/mkdir) + cat >$targetmkdir <&4 + exit 1 + ;; + esac + case "$targetto" in + scp|rcp) + cat >$to <$to <&4 + exit 1 + ;; + esac + case "$targetfrom" in + scp|rcp) + cat >$from <$from <&4 + exit 1 + ;; + esac + if $test ! -f $run; then + echo "Target 'run' script '$run' not found." >&4 + else + $chmod a+rx $run + fi + if $test ! -f $to; then + echo "Target 'to' script '$to' not found." >&4 + else + $chmod a+rx $to + fi + if $test ! -f $from; then + echo "Target 'from' script '$from' not found." >&4 + else + $chmod a+rx $from + fi + if $test ! -f $run -o ! -f $to -o ! -f $from; then + exit 1 + fi + cat >&4 </dev/null`" in @@ -2670,6 +2978,14 @@ EOM fi fi + case "$targetarch" in + '') ;; + *) hostarch=$osname + osname=`echo $targetarch|sed 's,^[^-]*-,,'` + osvers='' + ;; + esac + : Now look for a hint file osname_osvers, unless one has been : specified already. case "$hintfile" in @@ -2744,7 +3060,7 @@ EOM 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 + elif $test X"$tans" = X -o X"$tans" = Xnone ; then : nothing else : Give one chance to correct a possible typo. @@ -3021,6 +3337,17 @@ esac set usemultiplicity eval $setvar + +case "$usemorebits" in +"$define"|true|[yY]*) + use64bitint="$define" + uselongdouble="$define" + usemorebits="$define" + ;; +*) usemorebits="$undef" + ;; +esac + : make some quick guesses about what we are up against echo " " $echo $n "Hmm... $c" @@ -3133,7 +3460,7 @@ fi echo " " echo "Checking for GNU cc in disguise and/or its version number..." >&4 -$cat >gccvers.c <try.c < int main() { #ifdef __GNUC__ @@ -3146,8 +3473,8 @@ int main() { exit(0); } EOM -if $cc -o gccvers $ccflags $ldflags gccvers.c; then - gccversion=`./gccvers` +if $cc -o try $ccflags $ldflags try.c; then + gccversion=`$run ./try` case "$gccversion" in '') echo "You are not using GNU cc." ;; *) echo "You are using GNU cc $gccversion." @@ -3165,7 +3492,7 @@ else ;; esac fi -$rm -f gccvers* +$rm -f try try.* case "$gccversion" in 1*) cpp=`./loc gcc-cpp $cpp $pth` ;; esac @@ -3204,153 +3531,6 @@ case "$ccname" in '') ccname="$cc" ;; 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 @@ -3678,27 +3858,175 @@ y) fn=d/ ;; esac -: Set private lib path -case "$plibpth" in -'') if ./mips; then - plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib" - fi;; -esac -case "$libpth" in -' ') dlist='';; -'') dlist="$loclibpth $plibpth $glibpth";; -*) dlist="$libpth";; -esac - -: Now check and see which directories actually exist, avoiding duplicates -libpth='' -for xxx in $dlist -do - if $test -d $xxx; then - case " $libpth " in - *" $xxx "*) ;; - *) libpth="$libpth $xxx";; - esac +: 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 + +: Now check and see which directories actually exist, avoiding duplicates +libpth='' +for xxx in $dlist +do + if $test -d $xxx; then + case " $libpth " in + *" $xxx "*) ;; + *) libpth="$libpth $xxx";; + esac fi done $cat <<'EOM' @@ -4049,7 +4377,10 @@ none) ccflags='';; esac : the following weeds options from ccflags that are of no interest to cpp -cppflags="$ccflags" +case "$cppflags" in +'') cppflags="$ccflags" ;; +*) cppflags="$cppflags $ccflags" ;; +esac case "$gccversion" in 1*) cppflags="$cppflags -D__GNUC__" esac @@ -4172,15 +4503,15 @@ $cat >> try.msg <>try.msg 2>&1; then - if $sh -c './try' >>try.msg 2>&1; then - xxx=`./try` + if $sh -c "$run ./try" >>try.msg 2>&1; then + xxx=`$run ./try` case "$xxx" in "Ok") dflt=n ;; *) echo 'The program compiled OK, but produced no output.' >> try.msg @@ -4230,62 +4561,6 @@ n) echo "OK, that should do.";; esac $rm -f try try.* core -: define an is-a-typedef? function -typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@; -case "$inclist" in -"") inclist="sys/types.h";; -esac; -eval "varval=\$$var"; -case "$varval" in -"") - $rm -f temp.c; - for inc in $inclist; do - echo "#include <$inc>" >>temp.c; - done; - echo "#ifdef $type" >> temp.c; - echo "printf(\"We have $type\");" >> temp.c; - echo "#endif" >> temp.c; - $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null; - if $contains $type temp.E >/dev/null 2>&1; then - eval "$var=\$type"; - else - eval "$var=\$def"; - fi; - $rm -f temp.?;; -*) eval "$var=\$varval";; -esac' - -: define an is-a-typedef? function that prompts if the type is not available. -typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@; -case "$inclist" in -"") inclist="sys/types.h";; -esac; -eval "varval=\$$var"; -case "$varval" in -"") - $rm -f temp.c; - for inc in $inclist; do - echo "#include <$inc>" >>temp.c; - done; - echo "#ifdef $type" >> temp.c; - echo "printf(\"We have $type\");" >> temp.c; - echo "#endif" >> temp.c; - $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null; - echo " " ; - echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./"; - if $contains $type temp.E >/dev/null 2>&1; then - echo "$type found." >&4; - eval "$var=\$type"; - else - echo "$type NOT found." >&4; - dflt="$def"; - . ./myread ; - eval "$var=\$ans"; - fi; - $rm -f temp.?;; -*) eval "$var=\$varval";; -esac' - : define a shorthand compile call compile=' mc_file=$1; @@ -4302,7 +4577,7 @@ echo " " case "$intsize" in '') echo "Checking to see how big your integers are..." >&4 - $cat >intsize.c <<'EOCP' + $cat >try.c <<'EOCP' #include int main() { @@ -4312,9 +4587,9 @@ int main() exit(0); } EOCP - set intsize - if eval $compile_ok && ./intsize > /dev/null; then - eval `./intsize` + set try + if eval $compile_ok && $run ./try > /dev/null; then + eval `$run ./try` echo "Your integers are $intsize bytes long." echo "Your long integers are $longsize bytes long." echo "Your short integers are $shortsize bytes long." @@ -4341,194 +4616,383 @@ EOM fi ;; esac -$rm -f intsize intsize.* - -: see what type lseek is declared as in the kernel -rp="What is the type used for lseek's offset on this system?" -set off_t lseektype long stdio.h sys/types.h -eval $typedef_ask +$rm -f try try.* +: check for void type echo " " -echo "Checking to see how big your file offsets are..." >&4 -$cat >try.c < -#include -int main() -{ - printf("%d\n", (int)sizeof($lseektype)); - return(0); -} -EOCP -set try -if eval $compile_ok; then - lseeksize=`./try` - echo "Your file offsets are $lseeksize bytes long." -else - dflt=$longsize - echo " " - echo "(I can't seem to compile the test program. Guessing...)" - rp="What is the size of your file offsets (in bytes)?" - . ./myread - lseeksize="$ans" -fi -$rm -f try.c try +echo "Checking to see how well your C compiler groks the void type..." >&4 +case "$voidflags" in +'') + $cat >try.c <<'EOCP' +#if TRY & 1 +void sub() { +#else +sub() { +#endif + extern void moo(); /* function returning void */ + void (*goo)(); /* ptr to func returning void */ +#if TRY & 8 + void *hue; /* generic ptr */ +#endif +#if TRY & 2 + void (*foo[10])(); +#endif -: see what type file positions are declared as in the library -rp="What is the type for file position used by fsetpos()?" -set fpos_t fpostype long stdio.h sys/types.h -eval $typedef_ask +#if TRY & 4 + if(goo == moo) { + exit(0); + } +#endif + exit(0); +} +int main() { sub(); } +EOCP + if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then + voidflags=$defvoidused + echo "Good. It appears to support void to the level $package wants.">&4 + if $contains warning .out >/dev/null 2>&1; then + echo "However, you might get some warnings that look like this:" + $cat .out + fi + else +echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4 + if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then + echo "It supports 1..." + if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then + echo "It also supports 2..." + if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then + voidflags=7 + echo "And it supports 4 but not 8 definitely." + else + echo "It doesn't support 4..." + if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then + voidflags=11 + echo "But it supports 8." + else + voidflags=3 + echo "Neither does it support 8." + fi + fi + else + echo "It does not support 2..." + if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then + voidflags=13 + echo "But it supports 4 and 8." + else + if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then + voidflags=5 + echo "And it supports 4 but has not heard about 8." + else + echo "However it supports 8 but not 4." + fi + fi + fi + else + echo "There is no support at all for void." + voidflags=0 + fi + fi +esac +case "$voidflags" in +"$defvoidused") ;; +*) $cat >&4 <<'EOM' + Support flag bits are: + 1: basic void declarations. + 2: arrays of pointers to functions returning void. + 4: operations between pointers to and addresses of void functions. + 8: generic void pointers. +EOM + dflt="$voidflags"; + rp="Your void support flags add up to what?" + . ./myread + voidflags="$ans" + ;; +esac +$rm -f try.* .out +: check for length of pointer echo " " -case "$fpostype" in -*_t) zzz="$fpostype" ;; -*) zzz="fpos_t" ;; -esac -echo "Checking the size of $zzz..." >&4 -cat > try.c < +case "$ptrsize" in +'') + echo "Checking to see how big your pointers are..." >&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 -int main() { - printf("%d\n", (int)sizeof($fpostype)); +int main() +{ + printf("%d\n", (int)sizeof(VOID_PTR)); exit(0); } EOCP + set try + if eval $compile_ok; then + ptrsize=`$run ./try` + echo "Your pointers are $ptrsize bytes long." + 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 long long +echo " " +echo "Checking to see if you have long long..." >&4 +echo 'int main() { long long x = 7; return 0; }' > try.c set try -if eval $compile_ok; then - yyy=`./try` - case "$yyy" in - '') fpossize=4 - echo "(I can't execute the test program--guessing $fpossize.)" >&4 - ;; - *) fpossize=$yyy - echo "Your $zzz is $fpossize bytes long." - ;; - esac +if eval $compile; then + val="$define" + echo "You have long long." else - dflt="$longsize" - echo " " >&4 - echo "(I can't compile the test program. Guessing...)" >&4 - rp="What is the size of your file positions (in bytes)?" - . ./myread - fpossize="$ans" + val="$undef" + echo "You do not have long long." 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 - $cat >try.c < + +: check for length of long long +case "${d_longlong}${longlongsize}" in +$define) + echo " " + echo "Checking to see how big your long longs are..." >&4 + $cat >try.c <<'EOCP' #include int main() { - printf("%d\n", (int)sizeof($lseektype)); - return(0); + printf("%d\n", (int)sizeof(long long)); + return(0); } EOCP - set try - if eval $compile_ok; then - lseeksize=`./try` - $echo "Your file offsets are now $lseeksize bytes long." - else - dflt="$lseeksize" - echo " " - echo "(I can't seem to compile the test program. Guessing...)" - rp="What is the size of your file offsets (in bytes)?" - . ./myread - lseeksize="$ans" + set try + if eval $compile_ok; then + longlongsize=`$run ./try` + echo "Your long longs are $longlongsize bytes long." + 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 + if $test "X$longsize" = "X$longlongsize"; then + echo "(That isn't any different from an ordinary long.)" + fi + ;; +esac +$rm -f try.* try + +: determine filename position in cpp output +echo " " +echo "Computing filename position in cpp output for #include directives..." >&4 +echo '#include ' > foo.c +$cat >fieldn </dev/null | \ +$grep '^[ ]*#.*stdio\.h' | \ +while read cline; do + pos=1 + set \$cline + while $test \$# -gt 0; do + if $test -r \`echo \$1 | $tr -d '"'\`; then + echo "\$pos" + exit 0 fi - case "$fpostype" in - *_t) zzz="$fpostype" ;; - *) zzz="fpos_t" ;; - esac - $echo $n "Rechecking the size of $zzz...$c" >&4 - $cat > try.c < -#include + shift + pos=\`expr \$pos + 1\` + done +done +EOF +chmod +x fieldn +fieldn=`./fieldn` +$rm -f foo.c fieldn +case $fieldn in +'') pos='???';; +1) pos=first;; +2) pos=second;; +3) pos=third;; +*) pos="${fieldn}th";; +esac +echo "Your cpp writes the filename in the $pos field of the line." + +: locate header file +$cat >findhdr <" > foo\$\$.c +$cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \ +$grep "^[ ]*#.*\$wanted" | \ +while read cline; do + name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\` + case "\$name" in + *[/\\\\]\$wanted) echo "\$name"; exit 1;; + *[\\\\/]\$wanted) echo "\$name"; exit 1;; + *) exit 2;; + esac; +done; +# +# status = 0: grep returned 0 lines, case statement not executed +# status = 1: headerfile found +# status = 2: while loop executed, no headerfile found +# +status=\$? +$rm -f foo\$\$.c; +if test \$status -eq 1; then + exit 0; +fi +exit 1 +EOF +chmod +x findhdr + +: define an alternate in-header-list? function +inhdr='echo " "; td=$define; tu=$undef; yyy=$@; +cont=true; xxf="echo \"<\$1> found.\" >&4"; +case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";; +*) xxnf="echo \"<\$1> NOT found, ...\" >&4";; +esac; +case $# in 4) instead=instead;; *) instead="at last";; esac; +while $test "$cont"; do + xxx=`./findhdr $1` + var=$2; eval "was=\$$2"; + if $test "$xxx" && $test -r "$xxx"; + then eval $xxf; + eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td"; + cont=""; + else eval $xxnf; + eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi; + set $yyy; shift; shift; yyy=$@; + case $# in 0) cont="";; + 2) xxf="echo \"but I found <\$1> $instead.\" >&4"; + xxnf="echo \"and I did not find <\$1> either.\" >&4";; + *) xxf="echo \"but I found <\$1\> instead.\" >&4"; + xxnf="echo \"there is no <\$1>, ...\" >&4";; + esac; +done; +while $test "$yyy"; +do set $yyy; var=$2; eval "was=\$$2"; + eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; + set $yyy; shift; shift; yyy=$@; +done' + +: see if inttypes.h is available +: we want a real compile instead of Inhdr because some systems +: have an inttypes.h which includes non-existent headers +echo " " +$cat >try.c < int main() { - printf("%d\n", (int)sizeof($fpostype)); - exit(0); + static int32_t foo32 = 0x12345678; } EOCP - set try - if eval $compile_ok; then - yyy=`./try` - dflt="$lseeksize" - case "$yyy" in - '') echo " " - echo "(I can't execute the test program--guessing $fpossize.)" >&4 - ;; - *) fpossize=$yyy - echo " $fpossize bytes." >&4 - ;; - esac - else - dflt="$fpossize" - echo " " - echo "(I can't compile the test program. Guessing...)" >&4 - rp="What is the size of your file positions (in bytes)?" - . ./myread - fpossize="$ans" - fi - $rm -f try.c try - fi - ;; -esac +set try +if eval $compile; then + echo " found." >&4 + val="$define" +else + echo " NOT found." >&4 + val="$undef" +fi +$rm -f try.c try +set i_inttypes +eval $setvar + +: check for int64_t +echo " " +echo "Checking to see if you have int64_t..." >&4 +$cat >try.c < +#$i_inttypes I_INTTYPES +#ifdef I_INTTYPES +#include +#endif +int main() { int64_t x = 7; } +EOCP +set try +if eval $compile; then + val="$define" + echo "You have int64_t." +else + val="$undef" + echo "You do not have int64_t." +fi +$rm -f try try.* +set d_int64_t +eval $setvar -case "$usemorebits" in -"$define"|true|[yY]*) - use64bitint="$define" - uselongdouble="$define" - usemorebits="$define" +echo " " +echo "Checking which 64-bit integer type we could use..." >&4 + +case "$intsize" in +8) val=int + set quadtype + eval $setvar + val='"unsigned int"' + set uquadtype + eval $setvar + quadkind=1 + ;; +*) case "$longsize" in + 8) val=long + set quadtype + eval $setvar + val='"unsigned long"' + set uquadtype + eval $setvar + quadkind=2 + ;; + *) case "$d_longlong:$longlongsize" in + define:8) + val='"long long"' + set quadtype + eval $setvar + val='"unsigned long long"' + set uquadtype + eval $setvar + quadkind=3 + ;; + *) case "$d_int64_t" in + define) + val=int64_t + set quadtype + eval $setvar + val=uint64_t + set uquadtype + eval $setvar + quadkind=4 + ;; + esac + ;; + esac + ;; + esac + ;; +esac + +case "$quadtype" in +'') echo "Alas, no 64-bit integer types in sight." >&4 + d_quad="$undef" ;; -*) usemorebits="$undef" +*) echo "We could use '$quadtype' for 64-bit integers." >&4 + d_quad="$define" ;; esac @@ -4606,6 +5070,10 @@ EOM "$define"|true|[yY]*) dflt='y';; *) dflt='n';; esac + case "$d_quad" in + "$define") ;; + *) dflt='n' ;; + esac cat <&4 + +*** You have chosen a maximally 64-bit build, but your pointers +*** are only 4 bytes wide, disabling maximal 64-bitness. + +EOM + use64bitall="$undef" + case "$use64bitint" in + "$define"|true|[yY]*) ;; + *) cat <&4 + +*** Downgrading from maximal 64-bitness to using 64-bit integers. + +EOM + use64bitint="$define" + ;; + esac + ;; + esac + ;; +esac + case "$use64bitint" in "$define"|true|[yY]*) : Look for a hint-file generated 'call-back-unit'. If the @@ -4702,7 +5197,7 @@ esac echo " " echo "Checking for GNU C Library..." >&4 -cat >gnulibc.c <try.c < int main() { @@ -4713,15 +5208,15 @@ int main() #endif } EOM -set gnulibc -if eval $compile_ok && ./gnulibc; then +set try +if eval $compile_ok && $run ./try; then val="$define" echo "You are using the GNU C Library" else val="$undef" echo "You are not using the GNU C Library" fi -$rm -f gnulibc* +$rm -f try try.* set d_gnulibc eval $setvar @@ -4827,7 +5322,6 @@ case "$libc" in esac ;; esac -libnames=''; case "$libs" in '') ;; *) for thislib in $libs; do @@ -5089,7 +5583,7 @@ nm_extract="$com" if $test -f /lib/syscalls.exp; then echo " " echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4 - $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*$/\1/p' /lib/syscalls.exp >>libc.list + $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' /lib/syscalls.exp >>libc.list fi ;; esac @@ -5234,7 +5728,7 @@ int main() EOCP set try if eval $compile_ok; then - doublesize=`./try` + doublesize=`$run ./try` echo "Your double is $doublesize bytes long." else dflt='8' @@ -5278,7 +5772,7 @@ EOCP set try set try if eval $compile; then - longdblsize=`./try$exe_ext` + longdblsize=`$run ./try` echo "Your long doubles are $longdblsize bytes long." else dflt='8' @@ -5362,6 +5856,10 @@ case "$myarchname" in archname='' ;; esac +case "$targetarch" in +'') ;; +*) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;; +esac myarchname="$tarch" case "$archname" in '') dflt="$tarch";; @@ -5422,7 +5920,7 @@ $define) echo "Long doubles selected." >&4 case "$longdblsize" in $doublesize) - "...but long doubles are equal to doubles, not changing architecture name." >&4 + echo "...but long doubles are equal to doubles, not changing architecture name." >&4 ;; *) case "$archname" in @@ -5488,12 +5986,17 @@ esac prefix="$ans" prefixexp="$ansexp" +case "$afsroot" in +'') afsroot=/afs ;; +*) afsroot=$afsroot ;; +esac + : is AFS running? echo " " case "$afs" in $define|true) afs=true ;; $undef|false) afs=false ;; -*) if test -d /afs; then +*) if test -d $afsroot; then afs=true else afs=false @@ -5565,7 +6068,6 @@ prefixit='case "$3" in esac;; esac' - : get the patchlevel echo " " echo "Getting the current patchlevel..." >&4 @@ -5576,6 +6078,7 @@ if $test -r $rsrc/patchlevel.h;then 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` + perl_patchlevel=`grep ',"DEVEL[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'` else revision=0 patchlevel=0 @@ -5583,8 +6086,23 @@ else api_revision=0 api_version=0 api_subversion=0 + perl_patchlevel=0 + $echo "(You do not have patchlevel.h. Eek.)" +fi +if $test -r $rsrc/.patch ; then + if $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then + perl_patchlevel=`cat $rsrc/.patch` + fi fi -$echo "(You have $package version $patchlevel subversion $subversion.)" +: Define a handy string here to avoid duplication in myconfig.SH and configpm. +version_patchlevel_string="version $patchlevel subversion $subversion" +case "$perl_patchlevel" in +0|'') ;; +*) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;; +esac + +$echo "(You have $package $version_patchlevel_string.)" + case "$osname" in dos|vms) : XXX Should be a Configure test for double-dots in filenames. @@ -5844,107 +6362,6 @@ esac set d_dosuid eval $setvar -: determine filename position in cpp output -echo " " -echo "Computing filename position in cpp output for #include directives..." >&4 -echo '#include ' > foo.c -$cat >fieldn </dev/null | \ -$grep '^[ ]*#.*stdio\.h' | \ -while read cline; do - pos=1 - set \$cline - while $test \$# -gt 0; do - if $test -r \`echo \$1 | $tr -d '"'\`; then - echo "\$pos" - exit 0 - fi - shift - pos=\`expr \$pos + 1\` - done -done -EOF -chmod +x fieldn -fieldn=`./fieldn` -$rm -f foo.c fieldn -case $fieldn in -'') pos='???';; -1) pos=first;; -2) pos=second;; -3) pos=third;; -*) pos="${fieldn}th";; -esac -echo "Your cpp writes the filename in the $pos field of the line." - -: locate header file -$cat >findhdr <" > foo\$\$.c -$cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \ -$grep "^[ ]*#.*\$wanted" | \ -while read cline; do - name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\` - case "\$name" in - *[/\\\\]\$wanted) echo "\$name"; exit 1;; - *[\\\\/]\$wanted) echo "\$name"; exit 1;; - *) exit 2;; - esac; -done; -# -# status = 0: grep returned 0 lines, case statement not executed -# status = 1: headerfile found -# status = 2: while loop executed, no headerfile found -# -status=\$? -$rm -f foo\$\$.c; -if test \$status -eq 1; then - exit 0; -fi -exit 1 -EOF -chmod +x findhdr - -: define an alternate in-header-list? function -inhdr='echo " "; td=$define; tu=$undef; yyy=$@; -cont=true; xxf="echo \"<\$1> found.\" >&4"; -case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";; -*) xxnf="echo \"<\$1> NOT found, ...\" >&4";; -esac; -case $# in 4) instead=instead;; *) instead="at last";; esac; -while $test "$cont"; do - xxx=`./findhdr $1` - var=$2; eval "was=\$$2"; - if $test "$xxx" && $test -r "$xxx"; - then eval $xxf; - eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td"; - cont=""; - else eval $xxnf; - eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi; - set $yyy; shift; shift; yyy=$@; - case $# in 0) cont="";; - 2) xxf="echo \"but I found <\$1> $instead.\" >&4"; - xxnf="echo \"and I did not find <\$1> either.\" >&4";; - *) xxf="echo \"but I found <\$1\> instead.\" >&4"; - xxnf="echo \"there is no <\$1>, ...\" >&4";; - esac; -done; -while $test "$yyy"; -do set $yyy; var=$2; eval "was=\$$2"; - eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; - set $yyy; shift; shift; yyy=$@; -done' - : see if this is a malloc.h system set malloc.h i_malloc eval $inhdr @@ -5956,8 +6373,13 @@ eval $inhdr : determine which malloc to compile in echo " " case "$usemymalloc" in -''|[yY]*|true|$define) dflt='y' ;; -*) dflt='n' ;; +[yY]*|true|$define) dflt='y' ;; +[nN]*|false|$undef) dflt='n' ;; +*) case "$ptrsize" in + 4) dflt='y' ;; + *) dflt='n' ;; + esac + ;; esac rp="Do you wish to attempt to use the malloc that comes with $package?" . ./myread @@ -6347,16 +6769,68 @@ else installbin="$binexp" fi +echo " " +case "$extras" in +'') dflt='n';; +*) dflt='y';; +esac +cat < ../extras.lst + val="'$extras'" + ;; +esac +set extras +eval $setvar +echo " " + : Find perl5.005 or later. echo "Looking for a previously installed perl5.005 or later... " case "$perl5" in -'') for tdir in `echo "$binexp:$PATH" | $sed "s/$path_sep/ /g"`; do +'') for tdir in `echo "$binexp$path_sep$PATH" | $sed "s/$path_sep/ /g"`; do : Check if this perl is recent and can load a simple module - if $test -x $tdir/perl && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then + if $test -x $tdir/perl$exe_ext && $tdir/perl -Mless -e 'use 5.005;' >/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 + elif $test -x $tdir/perl5$exe_ext && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then + perl5=$tdir/perl5 break; fi done @@ -6421,14 +6895,14 @@ else { EOPL chmod +x getverlist case "$inc_version_list" in -'') if test -x "$perl5"; then +'') if test -x "$perl5$exe_ext"; then dflt=`$perl5 getverlist` else dflt='none' fi ;; $undef) dflt='none' ;; -*) dflt="$inc_version_list" ;; +*) eval dflt=\"$inc_version_list\" ;; esac case "$dflt" in ''|' ') dflt=none ;; @@ -6579,6 +7053,7 @@ EOM esac ;; *) case "$osname" in + darwin) dflt='none' ;; svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;; *) dflt='-fpic' ;; esac ;; @@ -6615,7 +7090,7 @@ int main() { exit(1); /* fail */ } EOM - if $cc $ccflags try.c >/dev/null 2>&1 && ./a.out; then + if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then cat <&4 +$cat >try.c < +#include +int main() +{ + printf("%d\n", (int)sizeof($lseektype)); + return(0); +} +EOCP +set try +if eval $compile_ok; then + lseeksize=`$run ./try` + echo "Your file offsets are $lseeksize bytes long." +else + dflt=$longsize + echo " " + echo "(I can't seem to compile the test program. Guessing...)" + rp="What is the size of your file offsets (in bytes)?" + . ./myread + lseeksize="$ans" +fi +$rm -f try.c try + +: see what type file positions are declared as in the library +rp="What is the type for file position used by fsetpos()?" +set fpos_t fpostype long stdio.h sys/types.h +eval $typedef_ask + +echo " " +case "$fpostype" in +*_t) zzz="$fpostype" ;; +*) zzz="fpos_t" ;; +esac +echo "Checking the size of $zzz..." >&4 +cat > try.c < +#include +int main() { + printf("%d\n", (int)sizeof($fpostype)); + exit(0); +} +EOCP +set try +if eval $compile_ok; then + yyy=`$run ./try` + case "$yyy" in + '') fpossize=4 + echo "(I can't execute the test program--guessing $fpossize.)" >&4 + ;; + *) fpossize=$yyy + echo "Your $zzz is $fpossize bytes long." + ;; + esac +else + dflt="$longsize" + echo " " >&4 + echo "(I can't compile the test program. Guessing...)" >&4 + rp="What is the size of your file positions (in bytes)?" + . ./myread + fpossize="$ans" +fi + + + +# Backward compatibility (uselfs is deprecated). +case "$uselfs" in +"$define"|true|[yY]*) + cat <&4 + +*** Configure -Duselfs is deprecated, using -Duselargefiles instead. +EOM + uselargefiles="$define" + ;; +esac + +case "$lseeksize:$fpossize" in +8:8) cat <&4 + $cat >try.c < +#include +int main() +{ + printf("%d\n", (int)sizeof($lseektype)); + return(0); +} +EOCP + set try + if eval $compile_ok; then + lseeksize=`$run ./try` + $echo "Your file offsets are now $lseeksize bytes long." + else + dflt="$lseeksize" + echo " " + echo "(I can't seem to compile the test program. Guessing...)" + rp="What is the size of your file offsets (in bytes)?" + . ./myread + lseeksize="$ans" + fi + case "$fpostype" in + *_t) zzz="$fpostype" ;; + *) zzz="fpos_t" ;; + esac + $echo $n "Rechecking the size of $zzz...$c" >&4 + $cat > try.c < +#include +int main() { + printf("%d\n", (int)sizeof($fpostype)); + exit(0); +} +EOCP + set try + if eval $compile_ok; then + yyy=`$run ./try` + dflt="$lseeksize" + case "$yyy" in + '') echo " " + echo "(I can't execute the test program--guessing $fpossize.)" >&4 + ;; + *) fpossize=$yyy + echo " $fpossize bytes." >&4 + ;; + esac + else + dflt="$fpossize" + echo " " + echo "(I can't compile the test program. Guessing...)" >&4 + rp="What is the size of your file positions (in bytes)?" + . ./myread + fpossize="$ans" + fi + $rm -f try.c try + fi + ;; +esac case "$vendorprefix" in '') d_vendorbin="$undef" @@ -7660,7 +8371,7 @@ int main() { EOCP set try if eval $compile; then - yyy=`./try$exe_ext` + yyy=`$run ./try` case "$yyy" in 123.456) sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"'; @@ -7677,17 +8388,17 @@ if $test X"$sPRIfldbl" = X; then #include int main() { long double d = 123.456; - printf("%.3llf\n", d); + printf("%.3Lf\n", d); } EOCP set try if eval $compile; then - yyy=`./try$exe_ext` + yyy=`$run ./try` case "$yyy" in 123.456) - sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"'; - sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"'; - echo "We will use %llf." + sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"'; + sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"'; + echo "We will use %Lf." ;; esac fi @@ -7699,17 +8410,17 @@ if $test X"$sPRIfldbl" = X; then #include int main() { long double d = 123.456; - printf("%.3Lf\n", d); + printf("%.3llf\n", d); } EOCP set try if eval $compile; then - yyy=`./try$exe_ext` + yyy=`$run ./try` case "$yyy" in 123.456) - sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"'; - sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"'; - echo "We will use %Lf." + sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"'; + sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"'; + echo "We will use %llf." ;; esac fi @@ -7726,7 +8437,7 @@ int main() { EOCP set try if eval $compile; then - yyy=`./try$exe_ext` + yyy=`$run ./try` case "$yyy" in 123.456) sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"'; @@ -7869,6 +8580,13 @@ int main() Gconvert((DOUBLETYPE)123.456, 8, 0, buf); checkit("123.456", buf); + /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */ + Gconvert((DOUBLETYPE)1e30, 8, 0, buf); + if (strlen(buf) > 5) + checkit("1e+030", buf); /* for Microsoft */ + else + checkit("1e+30", buf); + exit(0); } EOP @@ -7896,7 +8614,7 @@ for xxx_convert in $xxx_list; do set try -DTRY_$xxx_convert if eval $compile; then echo "$xxx_convert() found." >&4 - if ./try; then + if $run ./try; then echo "I'll use $xxx_convert to convert floats into a string." >&4 break; else @@ -8030,7 +8748,7 @@ case "$d_getpgrp" in "$define") echo " " echo "Checking to see which flavor of getpgrp is in use..." - $cat >set.c <try.c < #ifdef I_UNISTD @@ -8052,10 +8770,10 @@ int main() exit(1); } EOP - if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then + if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then echo "You have to use getpgrp(pid) instead of getpgrp()." >&4 val="$define" - elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then + elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then echo "You have to use getpgrp() instead of getpgrp(pid)." >&4 val="$undef" else @@ -8082,7 +8800,7 @@ EOP esac set d_bsdgetpgrp eval $setvar -$rm -f set set.c +$rm -f try try.* : see if setpgrp exists set setpgrp d_setpgrp @@ -8092,7 +8810,7 @@ case "$d_setpgrp" in "$define") echo " " echo "Checking to see which flavor of setpgrp is in use..." - $cat >set.c <try.c < #ifdef I_UNISTD @@ -8114,10 +8832,10 @@ int main() exit(1); } EOP - if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then + if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4 val="$define" - elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then + elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4 val="$undef" else @@ -8144,7 +8862,7 @@ EOP esac set d_bsdsetpgrp eval $setvar -$rm -f set set.c +$rm -f try try.* : see if bzero exists set bzero d_bzero eval $inlibc @@ -8234,7 +8952,7 @@ int main() EOCP set try if eval $compile_ok; then - ./try + $run ./try yyy=$? else echo "(I can't seem to compile the test program--assuming it can't)" @@ -8330,7 +9048,7 @@ int main() EOCP set try if eval $compile_ok; then - ./try + $run ./try castflags=$? else echo "(I can't seem to compile the test program--assuming it can't)" @@ -8353,7 +9071,7 @@ echo " " if set vprintf val -f d_vprintf; eval $csym; $val; then echo 'vprintf() found.' >&4 val="$define" - $cat >vprintf.c <<'EOF' + $cat >try.c <<'EOF' #include int main() { xxx("foo"); } @@ -8368,8 +9086,8 @@ va_dcl exit((unsigned long)vsprintf(buf,"%s",args) > 10L); } EOF - set vprintf - if eval $compile && ./vprintf; then + set try + if eval $compile && $run ./try; then echo "Your vsprintf() returns (int)." >&4 val2="$undef" else @@ -8381,6 +9099,7 @@ else val="$undef" val2="$undef" fi +$rm -f try try.* set d_vprintf eval $setvar val=$val2 @@ -8399,6 +9118,148 @@ eval $inlibc set chsize d_chsize eval $inlibc +: see if class exists +set class d_class +eval $inlibc + +hasstruct='varname=$1; struct=$2; shift; shift; +while $test $# -ge 2; do + case "$1" in + $define) echo "#include <$2>";; + esac ; + shift 2; +done > try.c; +echo "int main () { struct $struct foo; }" >> try.c; +set try; +if eval $compile; then + val="$define"; +else + val="$undef"; +fi; +set $varname; +eval $setvar; +$rm -f try.c try.o' + +: see if sys/types.h has to be included +set sys/types.h i_systypes +eval $inhdr + +hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift; +while $test $# -ge 2; do + case "$1" in + $define) echo "#include <$2>";; + esac ; + shift 2; +done > try.c; +echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c; +set try; +if eval $compile; then + val="$define"; +else + val="$undef"; +fi; +set $varname; +eval $setvar; +$rm -f try.c try.o' + +socketlib='' +sockethdr='' +: see whether socket exists +echo " " +$echo $n "Hmm... $c" >&4 +if set socket val -f d_socket; eval $csym; $val; then + echo "Looks like you have Berkeley networking support." >&4 + d_socket="$define" + if set setsockopt val -f; eval $csym; $val; then + d_oldsock="$undef" + else + echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4 + d_oldsock="$define" + fi +else + if $contains socklib libc.list >/dev/null 2>&1; then + echo "Looks like you have Berkeley networking support." >&4 + d_socket="$define" + : we will have to assume that it supports the 4.2 BSD interface + d_oldsock="$undef" + else + echo "You don't have Berkeley networking in libc$_a..." >&4 + if test "X$d_socket" = "X$define"; then + echo "...but you seem to believe that you have sockets." >&4 + else + for net in net socket + do + if test -f /usr/lib/lib$net$_a; then + ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \ + $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list + if $contains socket libc.list >/dev/null 2>&1; then + d_socket="$define" + socketlib="-l$net" + case "$net" in + net) + echo "...but the Wollongong group seems to have hacked it in." >&4 + sockethdr="-I/usr/netinclude" + ;; + esac + echo "Found Berkeley sockets interface in lib$net." >& 4 + if $contains setsockopt libc.list >/dev/null 2>&1; then + d_oldsock="$undef" + else + echo "...using the old BSD 4.1c interface, rather than 4.2." >&4 + d_oldsock="$define" + fi + break + fi + fi + done + if test "X$d_socket" != "X$define"; then + echo "or anywhere else I see." >&4 + d_socket="$undef" + d_oldsock="$undef" + fi + fi + fi +fi + +: see if socketpair exists +set socketpair d_sockpair +eval $inlibc + + +echo " " +echo "Checking the availability of certain socket constants..." >& 4 +for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do + enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'` + $cat >try.c < +#include +int main() { + int i = $ENUM; +} +EOF + val="$undef" + set try; if eval $compile; then + val="$define" + fi + set d_${enum}; eval $setvar + $rm -f try.c try +done + +: see if this is a sys/uio.h system +set sys/uio.h i_sysuio +eval $inhdr + + +echo " " +echo "Checking to see if your system supports struct cmsghdr..." >&4 +set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h +eval $hasstruct +case "$d_cmsghdr_s" in +"$define") echo "Yes, it does." ;; +*) echo "No, it doesn't." ;; +esac + + : check for const keyword echo " " echo 'Checking to see if your C compiler knows about "const"...' >&4 @@ -8465,44 +9326,98 @@ case "$full_csh" in '') full_csh=$csh ;; esac -: see if cuserid exists -set cuserid d_cuserid -eval $inlibc - -: see if this is a limits.h system -set limits.h i_limits -eval $inhdr - -: see if this is a float.h system -set float.h i_float -eval $inhdr - -: See if number of significant digits in a double precision number is known +: see if cuserid exists +set cuserid d_cuserid +eval $inlibc + +: see if this is a limits.h system +set limits.h i_limits +eval $inhdr + +: see if this is a float.h system +set float.h i_float +eval $inhdr + +: See if number of significant digits in a double precision number is known +echo " " +$cat >dbl_dig.c < +#endif +#ifdef I_FLOAT +#include +#endif +#ifdef DBL_DIG +printf("Contains DBL_DIG"); +#endif +EOM +$cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null +if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then + echo "DBL_DIG found." >&4 + val="$define" +else + echo "DBL_DIG NOT found." >&4 + val="$undef" +fi +$rm -f dbl_dig.? +set d_dbl_dig +eval $setvar + +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 dbm.h is available +: see if dbmclose exists +set dbmclose d_dbmclose +eval $inlibc + +case "$d_dbmclose" in +$define) + set dbm.h i_dbm + eval $inhdr + case "$i_dbm" in + $define) + val="$undef" + set i_rpcsvcdbm + eval $setvar + ;; + *) set rpcsvc/dbm.h i_rpcsvcdbm + eval $inhdr + ;; + esac + ;; +*) echo "We won't be including " + val="$undef" + set i_dbm + eval $setvar + val="$undef" + set i_rpcsvcdbm + eval $setvar + ;; +esac + +: see if prototype for dbminit is available echo " " -$cat >dbl_dig.c < -#endif -#ifdef I_FLOAT -#include -#endif -#ifdef DBL_DIG -printf("Contains DBL_DIG"); -#endif -EOM -$cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null -if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then - echo "DBL_DIG found." >&4 - val="$define" -else - echo "DBL_DIG NOT found." >&4 - val="$undef" -fi -$rm -f dbl_dig.? -set d_dbl_dig -eval $setvar +set d_dbminitproto dbminit $i_dbm dbm.h +eval $hasproto : see if difftime exists set difftime d_difftime @@ -8625,7 +9540,7 @@ $cat >fred.c< #$i_dlfcn I_DLFCN #ifdef I_DLFCN -#include /* the dynamic linker include file for Sunos/Solaris */ +#include /* the dynamic linker include file for SunOS/Solaris */ #else #include #include @@ -8669,9 +9584,9 @@ EOM : Call the object file tmp-dyna.o in case dlext=o. if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 && mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 && - $ld -o dyna.$dlext $lddlflags tmp-dyna${_o} > /dev/null 2>&1 && - $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1; then - xxx=`./fred` + $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 && + $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then + xxx=`$run ./fred` case $xxx in 1) echo "Test program failed using dlopen." >&4 echo "Perhaps you should not use dynamic loading." >&4;; @@ -8693,25 +9608,6 @@ $rm -f fred fred.? dyna.$dlext dyna.? tmp-dyna.? set d_dlsymun eval $setvar -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 prototype for drand48 is available echo " " set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h @@ -8751,7 +9647,7 @@ eval $inlibc : Locate the flags for 'open()' echo " " -$cat >open3.c <<'EOCP' +$cat >try.c <<'EOCP' #include #ifdef I_FCNTL #include @@ -8770,10 +9666,10 @@ int main() { EOCP : check sys/file.h first to get FREAD on Sun if $test `./findhdr sys/file.h` && \ - set open3 -DI_SYS_FILE && eval $compile; then + set try -DI_SYS_FILE && eval $compile; then h_sysfile=true; echo " defines the O_* constants..." >&4 - if ./open3; then + if $run ./try; then echo "and you have the 3 argument form of open()." >&4 val="$define" else @@ -8781,10 +9677,10 @@ if $test `./findhdr sys/file.h` && \ val="$undef" fi elif $test `./findhdr fcntl.h` && \ - set open3 -DI_FCNTL && eval $compile; then + set try -DI_FCNTL && eval $compile; then h_fcntl=true; echo " defines the O_* constants..." >&4 - if ./open3; then + if $run ./try; then echo "and you have the 3 argument form of open()." >&4 val="$define" else @@ -8797,7 +9693,7 @@ else fi set d_open3 eval $setvar -$rm -f open3* +$rm -f try try.* : see which of string.h or strings.h is needed echo " " @@ -8838,6 +9734,7 @@ case "$o_nonblock" in $cat head.c > try.c $cat >>try.c <<'EOCP' #include +#include int main() { #ifdef O_NONBLOCK printf("O_NONBLOCK\n"); @@ -8856,7 +9753,7 @@ int main() { EOCP set try if eval $compile_ok; then - o_nonblock=`./try` + o_nonblock=`$run ./try` case "$o_nonblock" in '') echo "I can't figure it out, assuming O_NONBLOCK will do.";; *) echo "Seems like we can use $o_nonblock.";; @@ -8879,6 +9776,7 @@ case "$eagain" in #include #include #include +#include #define MY_O_NONBLOCK $o_nonblock #ifndef errno /* XXX need better Configure test */ extern int errno; @@ -8953,7 +9851,7 @@ EOCP set try if eval $compile_ok; then echo "$startsh" >mtry - echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry + echo "$run ./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry chmod +x mtry ./mtry >/dev/null 2>&1 case $? in @@ -9015,6 +9913,10 @@ EOCP esac $rm -f try try.* .out core head.c mtry +: see if fchdir exists +set fchdir d_fchdir +eval $inlibc + : see if fchmod exists set fchmod d_fchmod eval $inlibc @@ -9029,10 +9931,12 @@ eval $inlibc echo " " : See if fcntl-based locking works. -$cat >try.c <<'EOCP' +$cat >try.c < #include #include +#include +$signal_t blech(x) int x; { exit(3); } int main() { #if defined(F_SETLK) && defined(F_SETLKW) struct flock flock; @@ -9041,6 +9945,8 @@ int main() { flock.l_type = F_RDLCK; flock.l_whence = SEEK_SET; flock.l_start = flock.l_len = 0; + signal(SIGALRM, blech); + alarm(10); retval = fcntl(fd, F_SETLK, &flock); close(fd); (retval < 0 ? exit(2) : exit(0)); @@ -9054,12 +9960,24 @@ case "$d_fcntl" in "$define") set try if eval $compile_ok; then - if ./try; then + if $run ./try; then echo "Yes, it seems to work." val="$define" else echo "Nope, it didn't work." val="$undef" + case "$?" in + 3) $cat >&4 <&4 -if set socket val -f d_socket; eval $csym; $val; then - echo "Looks like you have Berkeley networking support." >&4 - d_socket="$define" - if set setsockopt val -f; eval $csym; $val; then - d_oldsock="$undef" - else - echo "...but it uses the old BSD 4.1c interface, rather than 4.2." >&4 - d_oldsock="$define" - fi -else - if $contains socklib libc.list >/dev/null 2>&1; then - echo "Looks like you have Berkeley networking support." >&4 - d_socket="$define" - : we will have to assume that it supports the 4.2 BSD interface - d_oldsock="$undef" - else - echo "You don't have Berkeley networking in libc$_a..." >&4 - if test "X$d_socket" = "X$define"; then - echo "...but you seem to believe that you have sockets." >&4 - else - for net in net socket - do - if test -f /usr/lib/lib$net$_a; then - ( ($nm $nm_opt /usr/lib/lib$net$_a | eval $nm_extract) || \ - $ar t /usr/lib/lib$net$_a) 2>/dev/null >> libc.list - if $contains socket libc.list >/dev/null 2>&1; then - d_socket="$define" - socketlib="-l$net" - case "$net" in - net) - echo "...but the Wollongong group seems to have hacked it in." >&4 - sockethdr="-I/usr/netinclude" - ;; - esac - echo "Found Berkeley sockets interface in lib$net." >& 4 - if $contains setsockopt libc.list >/dev/null 2>&1; then - d_oldsock="$undef" - else - echo "...using the old BSD 4.1c interface, rather than 4.2." >&4 - d_oldsock="$define" - fi - break - fi - fi - done - if test "X$d_socket" != "X$define"; then - echo "or anywhere else I see." >&4 - d_socket="$undef" - d_oldsock="$undef" - fi - fi - fi -fi - -: see if socketpair exists -set socketpair d_sockpair -eval $inlibc - - -echo " " -echo "Checking the availability of certain socket constants..." >& 4 -for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do - enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'` - $cat >try.c < -#include -int main() { - int i = $ENUM; -} -EOF - val="$undef" - set try; if eval $compile; then - val="$define" - fi - set d_${enum}; eval $setvar - $rm -f try.c try -done - : see if sys/select.h has to be included set sys/select.h i_sysselct eval $inhdr @@ -9269,7 +10086,7 @@ $cat <fd_set.c <try.c <&4 - if ./fd_set; then + if $run ./try; then echo "and you have the normal fd_set macros (just as I'd expect)." >&4 d_fd_macros="$define" else @@ -9315,12 +10132,12 @@ else $cat <<'EOM' Hmm, your compiler has some difficulty with fd_set. Checking further... EOM - set fd_set + set try if eval $compile; then d_fds_bits="$undef" d_fd_set="$define" echo "Well, your system has some sort of fd_set available..." >&4 - if ./fd_set; then + if $run ./try; then echo "and you have the normal fd_set macros." >&4 d_fd_macros="$define" else @@ -9336,20 +10153,61 @@ EOM d_fd_macros="$undef" fi fi -$rm -f fd_set* +$rm -f try try.* : see if fgetpos exists set fgetpos d_fgetpos eval $inlibc +: see if finite exists +set finite d_finite +eval $inlibc + +: see if finitel exists +set finitel d_finitel +eval $inlibc + : see if flock exists set flock d_flock eval $inlibc +: see if this is a sys/file.h system +val='' +set sys/file.h val +eval $inhdr + +: do we need to include sys/file.h ? +case "$val" in +"$define") + echo " " + if $h_sysfile; then + val="$define" + echo "We'll be including ." >&4 + else + val="$undef" + echo "We won't be including ." >&4 + fi + ;; +*) + h_sysfile=false + ;; +esac +set i_sysfile +eval $setvar + +: see if prototype for flock is available +echo " " +set d_flockproto flock $i_sysfile sys/file.h +eval $hasproto + : see if fork exists set fork d_fork eval $inlibc +: see if fp_class exists +set fp_class d_fp_class +eval $inlibc + : see if pathconf exists set pathconf d_pathconf eval $inlibc @@ -9358,6 +10216,18 @@ eval $inlibc set fpathconf d_fpathconf eval $inlibc +: see if fpclass exists +set fpclass d_fpclass +eval $inlibc + +: see if fpclassify exists +set fpclassify d_fpclassify +eval $inlibc + +: see if fpclassl exists +set fpclassl d_fpclassl +eval $inlibc + : check for fpos64_t echo " " @@ -9371,37 +10241,19 @@ if eval $compile; then val="$define" echo "You have fpos64_t." else - val="$undef" - echo "You do not have fpos64_t." - case "$fpossize" in - 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;; - esac -fi -$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 - $define) echo "#include <$2>";; - esac ; - shift 2; -done > try.c; -echo "int main () { struct $struct foo; }" >> try.c; -set try; -if eval $compile; then - val="$define"; -else - val="$undef"; -fi; -set $varname; -eval $setvar; -$rm -f try.c try.o' + val="$undef" + echo "You do not have fpos64_t." + case "$fpossize" in + 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;; + esac +fi +$rm -f try.* try +set d_fpos64_t +eval $setvar + +: see if frexpl exists +set frexpl d_frexpl +eval $inlibc : see if this is a sys/param system set sys/param.h i_sysparam @@ -9411,10 +10263,6 @@ eval $inhdr set sys/mount.h i_sysmount eval $inhdr -: see if sys/types.h has to be included -set sys/types.h i_systypes -eval $inhdr - echo " " echo "Checking to see if your system supports struct fs_data..." >&4 @@ -9585,6 +10433,10 @@ echo " " set d_gethostprotos gethostent $i_netdb netdb.h eval $hasproto +: see if getitimer exists +set getitimer d_getitimer +eval $inlibc + : see if getlogin exists set getlogin d_getlogin eval $inlibc @@ -9817,51 +10669,6 @@ set d_index; eval $setvar set inet_aton d_inetaton eval $inlibc -: see if inttypes.h is available -: we want a real compile instead of Inhdr because some systems -: have an inttypes.h which includes non-existent headers -echo " " -$cat >try.c < -int main() { - static int32_t foo32 = 0x12345678; -} -EOCP -set try -if eval $compile; then - echo " found." >&4 - val="$define" -else - echo " NOT found." >&4 - val="$undef" -fi -$rm -f try.c try -set i_inttypes -eval $setvar - -: check for int64_t -echo " " -echo "Checking to see if you have int64_t..." >&4 -$cat >try.c < -#$i_inttypes I_INTTYPES -#ifdef I_INTTYPES -#include -#endif -int main() { int64_t x = 7; } -EOCP -set try -if eval $compile; then - val="$define" - echo "You have int64_t." -else - val="$undef" - echo "You do not have int64_t." -fi -$rm -f try try.* -set d_int64_t -eval $setvar - : Look for isascii echo " " $cat >isascii.c <<'EOCP' @@ -9887,6 +10694,14 @@ set d_isascii eval $setvar $rm -f isascii* +: see if isfinite exists +set isfinite d_isfinite +eval $inlibc + +: see if isinf exists +set isinf d_isinf +eval $inlibc + : see if isnan exists set isnan d_isnan eval $inlibc @@ -9970,54 +10785,6 @@ eval $inlibc set lockf d_lockf eval $inlibc -: check for long long -echo " " -echo "Checking to see if you have long long..." >&4 -echo 'int main() { long long x = 7; return 0; }' > try.c -set try -if eval $compile; then - val="$define" - echo "You have long long." -else - val="$undef" - echo "You do not have long long." -fi -$rm try.* -set d_longlong -eval $setvar - -: check for length of long long -case "${d_longlong}${longlongsize}" in -$define) - echo " " - echo "Checking to see how big your long longs are..." >&4 - $cat >try.c <<'EOCP' -#include -int main() -{ - printf("%d\n", (int)sizeof(long long)); - return(0); -} -EOCP - set try - if eval $compile_ok; then - longlongsize=`./try$exe_ext` - echo "Your long longs are $longlongsize bytes long." - 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 - if $test "X$longsize" = "X$longlongsize"; then - echo "(That isn't any different from an ordinary long.)" - fi - ;; -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 @@ -10118,6 +10885,61 @@ esac set modfl d_modfl eval $inlibc +d_modfl_pow32_bug="$undef" + +case "$d_longdbl$d_modfl" in +$define$define) + $cat <try.c < +#include +int main() { + long double nv = 4294967303.15; + long double v, w; + v = modfl(nv, &w); +#ifdef __GLIBC__ + printf("glibc"); +#endif + printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w); + return 0; +} +EOCP + case "$osname:$gccversion" in + aix:) saveccflags="$ccflags" + ccflags="$ccflags -qlongdouble" ;; # to avoid core dump + esac + set try + if eval $compile; then + foo=`$run ./try` + case "$foo" in + *" 4294967303.150000 1.150000 4294967302.000000") + echo >&4 "Your modfl() is broken for large values." + d_modfl_pow32_bug="$define" + case "$foo" in + glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()." + ;; + esac + ;; + *" 4294967303.150000 0.150000 4294967303.000000") + echo >&4 "Your modfl() seems okay for large values." + ;; + *) echo >&4 "I don't understand your modfl() at all." + d_modfl="$undef" + ;; + esac + $rm -f try.* try core core.try.* + else + echo "I cannot figure out whether your modfl() is okay, assuming it isn't." + d_modfl="$undef" + fi + case "$osname:$gccversion" in + aix:) ccflags="$saveccflags" ;; # restore + esac + ;; +esac + : see if mprotect exists set mprotect d_mprotect eval $inlibc @@ -10174,6 +10996,17 @@ fi set d_msg eval $setvar + +echo " " +echo "Checking to see if your system supports struct msghdr..." >&4 +set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h +eval $hasstruct +case "$d_msghdr_s" in +"$define") echo "Yes, it does." ;; +*) echo "No, it doesn't." ;; +esac + + : see if msync exists set msync d_msync eval $inlibc @@ -10186,69 +11019,13 @@ eval $inlibc set nice d_nice eval $inlibc +: see if this is a langinfo.h system +set langinfo.h i_langinfo +eval $inhdr -echo " " -echo "Checking which 64-bit integer type we could use..." >&4 - -case "$intsize" in -8) val=int - set quadtype - eval $setvar - val='"unsigned int"' - set uquadtype - eval $setvar - quadkind=1 - ;; -*) case "$longsize" in - 8) val=long - set quadtype - eval $setvar - val='"unsigned long"' - set uquadtype - eval $setvar - quadkind=2 - ;; - *) case "$d_longlong:$longlongsize" in - define:8) - val='"long long"' - set quadtype - eval $setvar - val='"unsigned long long"' - set uquadtype - eval $setvar - quadkind=3 - ;; - *) case "$d_int64_t" in - define) - val=int64_t - set quadtype - eval $setvar - val=uint64_t - set uquadtype - eval $setvar - quadkind=4 - ;; - esac - ;; - esac - ;; - esac - ;; -esac - -case "$quadtype" in -'') echo "Alas, no 64-bit integer types in sight." >&4 - d_quad="$undef" - ;; -*) if test X"$use64bitint" = Xdefine -o X"$longsize" = X8; then - verb="will" - else - verb="could" - fi - echo "We $verb use '$quadtype' for 64-bit integers." >&4 - d_quad="$define" - ;; -esac +: see if nl_langinfo exists +set nl_langinfo d_nl_langinfo +eval $inlibc : check for length of character echo " " @@ -10265,7 +11042,7 @@ int main() EOCP set try if eval $compile_ok; then - dflt=`./try` + dflt=`$run ./try` else dflt='1' echo "(I can't seem to compile the test program. Guessing...)" @@ -10381,7 +11158,7 @@ esac case "$i8type" in '') set try -DINT8 if eval $compile; then - case "`./try$exe_ext`" in + case "`$run ./try`" in int8_t) i8type=int8_t u8type=uint8_t i8size=1 @@ -10414,7 +11191,7 @@ esac case "$i16type" in '') set try -DINT16 if eval $compile; then - case "`./try$exe_ext`" in + case "`$run ./try`" in int16_t) i16type=int16_t u16type=uint16_t @@ -10456,7 +11233,7 @@ esac case "$i32type" in '') set try -DINT32 if eval $compile; then - case "`./try$exe_ext`" in + case "`$run ./try`" in int32_t) i32type=int32_t u32type=uint32_t @@ -10535,7 +11312,7 @@ set try d_nv_preserves_uv="$undef" if eval $compile; then - d_nv_preserves_uv_bits="`./try$exe_ext`" + d_nv_preserves_uv_bits="`$run ./try`" fi case "$d_nv_preserves_uv_bits" in \-[1-9]*) @@ -10650,6 +11427,10 @@ eval $inlibc set poll d_poll eval $inlibc +: see if pthread_atfork exists +set pthread_atfork d_pthread_atfork +eval $inlibc + : see whether the various POSIXish _yields exist $cat >try.c <&4 - $cat >try.c <&4 + $cat >try.c <= 0; align--) { @@ -10909,36 +11702,34 @@ for (align = 7; align >= 0; align--) { exit(0); } EOCP - set try - if eval $compile_ok; then - if ./try 2>/dev/null; then - echo "Yes, it can." - val="$define" + set try + if eval $compile_ok; then + if ./try 2>/dev/null; then + echo "Yes, it can." + val="$define" + else + echo "It can't, sorry." + fi else - echo "It can't, sorry." - case "$d_memmove" in - "$define") echo "But that's Ok since you have memmove()." ;; - esac + echo "(I can't compile the test program, so we'll assume not...)" fi - else - echo "(I can't compile the test program, so we'll assume not...)" - case "$d_memmove" in - "$define") echo "But that's Ok since you have memmove()." ;; - esac - fi + ;; + esac + $rm -f try.* try core ;; esac -$rm -f try.* try core set d_safebcpy eval $setvar : can memcpy handle overlapping blocks? +echo " " val="$undef" -case "$d_memcpy" in -"$define") - echo " " - echo "Checking to see if your memcpy() can do overlapping copies..." >&4 - $cat >try.c <&4 + $cat >try.c <= 0; align--) { exit(0); } EOCP - set try - if eval $compile_ok; then - if ./try 2>/dev/null; then - echo "Yes, it can." - val="$define" + set try + if eval $compile_ok; then + if ./try 2>/dev/null; then + echo "Yes, it can." + val="$define" + else + echo "It can't, sorry." + fi else - echo "It can't, sorry." - case "$d_memmove" in - "$define") echo "But that's Ok since you have memmove()." ;; - esac + echo "(I can't compile the test program, so we'll assume not...)" fi - else - echo "(I can't compile the test program, so we'll assume not...)" - case "$d_memmove" in - "$define") echo "But that's Ok since you have memmove()." ;; - esac - fi + ;; + esac + $rm -f try.* try core ;; esac -$rm -f try.* try core set d_safemcpy eval $setvar @@ -11049,7 +11836,7 @@ exit(0); EOCP set try if eval $compile_ok; then - if ./try 2>/dev/null; then + if $run ./try 2>/dev/null; then echo "Yes, it can." val="$define" else @@ -11218,7 +12005,7 @@ END val="$undef" set try if eval $compile; then - xxx=`./try` + xxx=`$run ./try` case "$xxx" in semun) val="$define" ;; esac @@ -11276,7 +12063,7 @@ END val="$undef" set try if eval $compile; then - xxx=`./try` + xxx=`$run ./try` case "$xxx" in semid_ds) val="$define" ;; esac @@ -11306,6 +12093,10 @@ END ;; esac +: see if sendmsg exists +set sendmsg d_sendmsg +eval $inlibc + : see if setegid exists set setegid d_setegid eval $inlibc @@ -11322,6 +12113,10 @@ eval $inlibc set sethostent d_sethent eval $inlibc +: see if setitimer exists +set setitimer d_setitimer +eval $inlibc + : see if setlinebuf exists set setlinebuf d_setlinebuf eval $inlibc @@ -11450,10 +12245,15 @@ esac case "$d_sfio" in $define) ;; *) : Remove sfio from list of libraries to use - set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'` - shift - libs="$*" - echo "libs = $libs" >&4 + case "$libs" in + *-lsfio*) + echo "Removing unneeded -lsfio from library list" >&4 + set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'` + shift + libs="$*" + echo "libs = $libs" >&4 + ;; + esac ;; esac @@ -11593,7 +12393,7 @@ int main() EOP set try if eval $compile; then - if ./try >/dev/null 2>&1; then + if $run ./try >/dev/null 2>&1; then echo "POSIX sigsetjmp found." >&4 val="$define" else @@ -11619,10 +12419,29 @@ set d_sigsetjmp eval $setvar $rm -f try.c try +: see if sockatmark exists +set sockatmark d_sockatmark +eval $inlibc + +: see if prototype for sockatmark is available +echo " " +set d_sockatmarkproto sockatmark $d_socket sys/socket.h +eval $hasproto + : see if socks5_init exists set socks5_init d_socks5_init eval $inlibc +: see if prototype for setresgid is available +echo " " +set d_sresgproto setresgid $i_unistd unistd.h +eval $hasproto + +: see if prototype for setresuid is available +echo " " +set d_sresuproto setresuid $i_unistd unistd.h +eval $hasproto + : see if sys/stat.h is available set sys/stat.h i_sysstat eval $inhdr @@ -11757,8 +12576,8 @@ int main() { EOP val="$undef" set try -if eval $compile; then - if ./try; then +if eval $compile && $to try.c; then + if $run ./try; then echo "Your stdio acts pretty std." val="$define" else @@ -11854,8 +12673,8 @@ int main() { } EOP set try - if eval $compile; then - case `./try$exe_ext` in + if eval $compile && $to try.c; then + case `$run ./try` in Pass_changed) echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4 d_stdio_ptr_lval_sets_cnt="$define" ;; @@ -11894,8 +12713,8 @@ int main() { } EOP set try - if eval $compile; then - if ./try; then + if eval $compile && $to try.c; then + if $run ./try; then echo "And its _base field acts std." val="$define" else @@ -11925,7 +12744,7 @@ EOCP do set try -DSTDIO_STREAM_ARRAY=$s if eval $compile; then - case "`./try$exe_ext`" in + case "`$run ./try`" in yes) stdio_stream_array=$s; break ;; esac fi @@ -12012,6 +12831,10 @@ if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then fi fi +: see if strftime exists +set strftime d_strftime +eval $inlibc + : see if strtod exists set strtod d_strtod eval $inlibc @@ -12067,7 +12890,7 @@ int main() { EOCP set try if eval $compile; then - yyy=`./try` + yyy=`$run ./try` case "$yyy" in ok) echo "Your strtoll() seems to be working okay." ;; *) cat <&4 @@ -12152,7 +12975,7 @@ EOCP EOCP set try if eval $compile; then - case "`./try`" in + case "`$run ./try`" in ok) echo "Your strtoul() seems to be working okay." ;; *) cat <&4 Your strtoul() doesn't seem to be working okay. @@ -12206,7 +13029,7 @@ int main() { EOCP set try if eval $compile; then - case "`./try`" in + case "`$run ./try`" in ok) echo "Your strtoull() seems to be working okay." ;; *) cat <&4 Your strtoull() doesn't seem to be working okay. @@ -12258,7 +13081,7 @@ int main() { EOCP set try if eval $compile; then - case "`./try`" in + case "`$run ./try`" in ok) echo "Your strtouq() seems to be working okay." ;; *) cat <&4 Your strtouq() doesn't seem to be working okay. @@ -12282,6 +13105,11 @@ eval $inlibc set syscall d_syscall eval $inlibc +: see if prototype for syscall is available +echo " " +set d_syscallproto syscall $i_unistd unistd.h +eval $hasproto + : see if sysconf exists set sysconf d_sysconf eval $inlibc @@ -12341,10 +13169,190 @@ fi set d_tzname eval $setvar +case "$osname" in +next|rhapsody|darwin) multiarch="$define" ;; +esac +case "$multiarch" in +''|[nN]*) multiarch="$undef" ;; +esac + +: check for ordering of bytes in a long +echo " " +case "$usecrosscompile$multiarch" in +*$define*) + $cat <try.c <<'EOCP' +#include +int main() +{ + int i; + union { + unsigned long l; + char c[sizeof(long)]; + } u; + + if (sizeof(long) > 4) + u.l = (0x08070605L << 32) | 0x04030201L; + else + u.l = 0x04030201L; + for (i = 0; i < sizeof(long); i++) + printf("%c", u.c[i]+'0'); + printf("\n"); + exit(0); +} +EOCP + xxx_prompt=y + set try + if eval $compile && ./try > /dev/null; then + dflt=`$run ./try` + case "$dflt" in + [1-4][1-4][1-4][1-4]|12345678|87654321) + echo "(The test program ran ok.)" + echo "byteorder=$dflt" + xxx_prompt=n + ;; + ????|????????) echo "(The test program ran ok.)" ;; + *) echo "(The test program didn't run right for some reason.)" ;; + esac + else + dflt='4321' + cat <<'EOM' +(I can't seem to compile the test program. Guessing big-endian...) +EOM + fi + case "$xxx_prompt" in + y) + rp="What is the order of bytes in a long?" + . ./myread + byteorder="$ans" + ;; + *) byteorder=$dflt + ;; + esac + ;; + esac + $rm -f try.c try + ;; +esac + + +$cat <try.c < +#define U32 $u32type +#define BYTEORDER $byteorder +int main() { +#if BYTEORDER == 0x1234 || BYTEORDER == 0x4321 + U8 buf[] = "\0\0\0\1\0\0\0\0"; + U32 *up; + int i; + + if (sizeof(U32) != 4) { + printf("sizeof(U32) is not 4, but %d\n", sizeof(U32)); + exit(1); + } + + fflush(stdout); + + for (i = 0; i < 4; i++) { + up = (U32*)(buf + i); + if (! ((*up == 1 << (8*i)) || /* big-endian */ + (*up == 1 << (8*(3-i))) /* little-endian */ + ) + ) + { + printf("read failed (%x)\n", *up); + exit(2); + } + } + + /* write test */ + for (i = 0; i < 4; i++) { + up = (U32*)(buf + i); + *up = 0xBeef; + if (*up != 0xBeef) { + printf("write failed (%x)\n", *up); + exit(3); + } + } + + exit(0); +#else + printf("1\n"); + exit(1); +#endif + return 0; +} +EOCP +set try +if eval $compile_ok; then + echo "(Testing for character data alignment may dump core.)" >&4 + $run ./try 2>&1 >/dev/null + case "$?" in + 0) cat >&4 <&4 <&4 - cat > closedir.c < try.c < /dev/null 2>&1 ; then + if $run ./try > /dev/null 2>&1 ; then echo "Yes, it does." val="$undef" else @@ -12460,7 +13468,7 @@ EOM esac set d_void_closedir eval $setvar -$rm -f closedir* +$rm -f try try.* : see if there is a wait4 set wait4 d_wait4 eval $inlibc @@ -12477,6 +13485,10 @@ eval $inlibc set wctomb d_wctomb eval $inlibc +: see if writev exists +set writev d_writev +eval $inlibc + : preserve RCS keywords in files with variable substitution, grrr Date='$Date' Id='$Id' @@ -12484,20 +13496,9 @@ Log='$Log' RCSfile='$RCSfile' Revision='$Revision' -case "$crosscompile" in -''|[nN]*) crosscompile="$undef" ;; -esac - -case "$osname" in -next|rhapsody|darwin) multiarch="$define" ;; -esac -case "$multiarch" in -''|[nN]*) multiarch="$undef" ;; -esac - : check for alignment requirements echo " " -case "$crosscompile$multiarch" in +case "$usecrosscompile$multiarch" in *$define*) $cat <try.c <<'EOCP' -#include -int main() -{ - int i; - union { - unsigned long l; - char c[sizeof(long)]; - } u; - - if (sizeof(long) > 4) - u.l = (0x08070605L << 32) | 0x04030201L; - else - u.l = 0x04030201L; - for (i = 0; i < sizeof(long); i++) - printf("%c", u.c[i]+'0'); - printf("\n"); - exit(0); -} -EOCP - xxx_prompt=y - set try - if eval $compile && ./try > /dev/null; then - dflt=`./try` - case "$dflt" in - [1-4][1-4][1-4][1-4]|12345678|87654321) - echo "(The test program ran ok.)" - echo "byteorder=$dflt" - xxx_prompt=n - ;; - ????|????????) echo "(The test program ran ok.)" ;; - *) echo "(The test program didn't run right for some reason.)" ;; - esac - else - dflt='4321' - cat <<'EOM' -(I can't seem to compile the test program. Guessing big-endian...) -EOM + echo "(I can't seem to compile the test program...)" fi - case "$xxx_prompt" in - y) - rp="What is the order of bytes in a long?" - . ./myread - byteorder="$ans" - ;; - *) byteorder=$dflt - ;; - esac + ;; + *) dflt="$alignbytes" ;; esac + rp="Doubles must be aligned on a how-many-byte boundary?" + . ./myread + alignbytes="$ans" $rm -f try.c try ;; esac +: set the base revision +baserev=5.0 + : how do we catenate cpp tokens here? echo " " echo "Checking to see how your cpp does stuff like catenate tokens..." >&4 @@ -12677,13 +13600,19 @@ $define) #include #include #include -int main() +int main(int argc, char *argv[]) { #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"); + if (argc == 2) { + printf("%d %d %d %d %d %d\n", + DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH, + Major, Minor, Patch); + exit(0); + } + printf("You have Berkeley DB Version 2 or greater.\n"); printf("db.h is from Berkeley DB Version %d.%d.%d\n", DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH); @@ -12692,11 +13621,11 @@ int main() /* check that db.h & libdb are compatible */ if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) { - printf("db.h and libdb are incompatible\n") ; + printf("db.h and libdb are incompatible.\n") ; exit(3); } - printf("db.h and libdb are compatible\n") ; + printf("db.h and libdb are compatible.\n") ; Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000 + DB_VERSION_PATCH ; @@ -12704,14 +13633,18 @@ int main() /* 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") ; + printf("Perl needs Berkeley DB 2.3.4 or greater.\n") ; exit(2); } exit(0); #else #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC) - printf("You have Berkeley DB Version 1\n"); + if (argc == 2) { + printf("1 0 0\n"); + exit(0); + } + printf("You have Berkeley DB Version 1.\n"); exit(0); /* DB version < 2: the coast is clear. */ #else exit(1); /* not Berkeley DB? */ @@ -12720,8 +13653,12 @@ int main() } EOCP set try - if eval $compile_ok && ./try; then + if eval $compile_ok && $run ./try; then echo 'Looks OK.' >&4 + set `$run ./try 1` + db_version_major=$1 + db_version_minor=$2 + db_version_patch=$3 else echo "I can't use Berkeley DB with your . I'll disable Berkeley DB." >&4 i_db=$undef @@ -12831,98 +13768,6 @@ EOCP ;; esac -: check for void type -echo " " -echo "Checking to see how well your C compiler groks the void type..." >&4 -case "$voidflags" in -'') - $cat >try.c <<'EOCP' -#if TRY & 1 -void sub() { -#else -sub() { -#endif - extern void moo(); /* function returning void */ - void (*goo)(); /* ptr to func returning void */ -#if TRY & 8 - void *hue; /* generic ptr */ -#endif -#if TRY & 2 - void (*foo[10])(); -#endif - -#if TRY & 4 - if(goo == moo) { - exit(0); - } -#endif - exit(0); -} -int main() { sub(); } -EOCP - if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then - voidflags=$defvoidused - echo "Good. It appears to support void to the level $package wants.">&4 - if $contains warning .out >/dev/null 2>&1; then - echo "However, you might get some warnings that look like this:" - $cat .out - fi - else -echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4 - if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then - echo "It supports 1..." - if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then - echo "It also supports 2..." - if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then - voidflags=7 - echo "And it supports 4 but not 8 definitely." - else - echo "It doesn't support 4..." - if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then - voidflags=11 - echo "But it supports 8." - else - voidflags=3 - echo "Neither does it support 8." - fi - fi - else - echo "It does not support 2..." - if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then - voidflags=13 - echo "But it supports 4 and 8." - else - if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then - voidflags=5 - echo "And it supports 4 but has not heard about 8." - else - echo "However it supports 8 but not 4." - fi - fi - fi - else - echo "There is no support at all for void." - voidflags=0 - fi - fi -esac -case "$voidflags" in -"$defvoidused") ;; -*) $cat >&4 <<'EOM' - Support flag bits are: - 1: basic void declarations. - 2: arrays of pointers to functions returning void. - 4: operations between pointers to and addresses of void functions. - 8: generic void pointers. -EOM - dflt="$voidflags"; - rp="Your void support flags add up to what?" - . ./myread - voidflags="$ans" - ;; -esac -$rm -f try.* .out - : How can we generate normalized random numbers ? echo " " @@ -13056,7 +13901,7 @@ done echo " " echo "Determining whether or not we are on an EBCDIC system..." >&4 -$cat >tebcdic.c <<'EOM' +$cat >try.c <<'EOM' int main() { if ('M'==0xd4) return 0; @@ -13065,19 +13910,19 @@ int main() EOM val=$undef -set tebcdic +set try if eval $compile_ok; then - if ./tebcdic; then + if $run ./try; then echo "You seem to speak EBCDIC." >&4 val="$define" else - echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF8." >&4 + echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4 fi else echo "I'm unable to compile the test program." >&4 echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4 fi -$rm -f tebcdic.c tebcdic +$rm -f try try.* set ebcdic eval $setvar @@ -13102,7 +13947,9 @@ $cat >>try.c </dev/null - if $test ! -s try.out -a "X$?" = X42; then + $run ./try 2>/dev/null + code="$?" + $from try.out + if $test ! -s try.out -a "X$code" = X42; then output=-DTRY_FPUTC fi fi case "$output" in '') set try -DTRY_FPRINTF - $rm -f try.out if eval $compile; then - $rm -f try.out - ./try$exe_ext 2>/dev/null - if $test ! -s try.out -a "X$?" = X42; then + $run ./try 2>/dev/null + code="$?" + $from try.out + if $test ! -s try.out -a "X$code" = X42; then output=-DTRY_FPRINTF fi fi @@ -13179,9 +14028,9 @@ fi case "$fflushNULL" in '') set try -DTRY_FFLUSH_NULL $output if eval $compile; then - $rm -f try.out - ./try$exe_ext 2>/dev/null + $run ./try 2>/dev/null code="$?" + $from try.out if $test -s try.out -a "X$code" = X42; then fflushNULL="`$cat try.out`" else @@ -13227,7 +14076,7 @@ EOCP set tryp if eval $compile; then $rm -f tryp.out - $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out + $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out if cmp tryp.c tryp.out >/dev/null 2>&1; then $cat >&4 </dev/null > tryp.out + $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out if cmp tryp.c tryp.out >/dev/null 2>&1; then $cat >&4 <&4 </dev/null - if $test -s try.out -a "X$?" = X42; then + $run ./try 2>/dev/null + code=$? + $from try.out + if $test -s try.out -a "X$code" = X42; then fflushall="`$cat try.out`" fi fi @@ -13410,7 +14260,7 @@ int main() { EOCP set try if eval $compile_ok; then - yyy=`./try` + yyy=`$run ./try` case "$yyy" in '') gidsize=4 echo "(I can't execute the test program--guessing $gidsize.)" >&4 @@ -13444,7 +14294,7 @@ int main() { EOCP set try if eval $compile; then - yyy=`./try` + yyy=`$run ./try` case "$yyy" in '') gidsign=1 echo "(I can't execute the test program--guessing unsigned.)" >&4 @@ -13479,7 +14329,7 @@ int main() { EOCP set try if eval $compile; then - yyy=`./try$exe_ext` + yyy=`$run ./try` case "$yyy" in 12345678901) sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"'; @@ -13501,7 +14351,7 @@ int main() { EOCP set try if eval $compile; then - yyy=`./try$exe_ext` + yyy=`$run ./try` case "$yyy" in 12345678901) sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"'; @@ -13524,7 +14374,7 @@ int main() { EOCP set try if eval $compile; then - yyy=`./try$exe_ext` + yyy=`$run ./try` case "$yyy" in 12345678901) sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64; @@ -13535,45 +14385,45 @@ EOCP fi fi -if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then - $cat >try.c <<'EOCP' +if $test X"$sPRId64" = X -a X"$quadtype" != X; then + $cat >try.c < #include int main() { - long long q = 12345678901LL; /* AIX cc requires the LL suffix. */ - printf("%lld\n", q); + $quadtype q = 12345678901; + printf("%Ld\n", q); } EOCP set try if eval $compile; then - yyy=`./try$exe_ext` + yyy=`$run ./try` case "$yyy" in 12345678901) - sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"'; - sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"'; - echo "We will use the %lld style." + sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"'; + sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"'; + echo "We will use %Ld." ;; esac fi fi -if $test X"$sPRId64" = X -a X"$quadtype" != X; then - $cat >try.c <try.c <<'EOCP' #include #include int main() { - $quadtype q = 12345678901; - printf("%Ld\n", q); + long long q = 12345678901LL; /* AIX cc requires the LL suffix. */ + printf("%lld\n", q); } EOCP set try if eval $compile; then - yyy=`./try$exe_ext` + yyy=`$run ./try` case "$yyy" in 12345678901) - sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"'; - sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"'; - echo "We will use %Ld." + sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"'; + sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"'; + echo "We will use the %lld style." ;; esac fi @@ -13590,7 +14440,7 @@ int main() { EOCP set try if eval $compile; then - yyy=`./try$exe_ext` + yyy=`$run ./try` case "$yyy" in 12345678901) sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"'; @@ -13911,8 +14761,8 @@ main(int ac, char **av) } EOCP set try - if eval $compile && ./try 2>&1 >/dev/null; then - case "`./try`" in + if eval $compile && $run ./try 2>&1 >/dev/null; then + case "`$run ./try`" in "that's all right, then") okay=yes ;; @@ -14147,39 +14997,6 @@ esac : The versioned directories started at 5.005. pm_apiversion='5.005' -: check for length of pointer -echo " " -case "$ptrsize" in -'') - echo "Checking to see how big your pointers are..." >&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 -int main() -{ - printf("%d\n", (int)sizeof(VOID_PTR)); - exit(0); -} -EOCP - set try - if eval $compile_ok; then - ptrsize=`./try` - echo "Your pointers are $ptrsize bytes long." - 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 - : see if ar generates random libraries by itself echo " " echo "Checking how to generate random libraries on your machine..." >&4 @@ -14193,13 +15010,13 @@ $cc $ccflags -c bar2.c >/dev/null 2>&1 $cc $ccflags -c foo.c >/dev/null 2>&1 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1 if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 && - ./foobar >/dev/null 2>&1; then + $run ./foobar >/dev/null 2>&1; then echo "$ar appears to generate random libraries itself." orderlib=false ranlib=":" elif $ar ts bar$_a >/dev/null 2>&1 && $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 && - ./foobar >/dev/null 2>&1; then + $run ./foobar >/dev/null 2>&1; then echo "a table of contents needs to be added with '$ar ts'." orderlib=false ranlib="$ar ts" @@ -14339,7 +15156,7 @@ int main() { EOCP set try if eval $compile_ok; then - selectminbits=`./try` + selectminbits=`$run ./try` case "$selectminbits" in '') cat >&4 <' | $cppstdin $cppminus $cppflags 2>/dev/null | $grep '^[ ]*#.*include' | - $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sort | $uniq` + $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq` fi : Check this list of files to be sure we have parsed the cpp output ok. : This will also avoid potentially non-existent files, such @@ -14531,13 +15348,13 @@ $cat >>signal_cmd <<'EOS' set signal if eval $compile_ok; then - ./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst + $run ./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst else 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 + $run ./signal$_exe > signal.nsg $cat signal.nsg else echo "I can't seem to figure out how many signals you have." >&4 @@ -14558,7 +15375,7 @@ EOCP set signal if eval $compile; then echo "SIG${xx} found." - ./signal$_exe >> signal.ls1 + $run ./signal$_exe >> signal.ls1 else echo "SIG${xx} NOT found." fi @@ -14649,7 +15466,7 @@ int main() { EOCP set try if eval $compile_ok; then - yyy=`./try` + yyy=`$run ./try` case "$yyy" in '') sizesize=4 echo "(I can't execute the test program--guessing $sizesize.)" >&4 @@ -14743,7 +15560,7 @@ esac set ssize_t ssizetype int stdio.h sys/types.h eval $typedef dflt="$ssizetype" -$cat > ssize.c < try.c < #include #define Size_t $sizetype @@ -14760,9 +15577,9 @@ int main() } EOM echo " " -set ssize -if eval $compile_ok && ./ssize > /dev/null; then - ssizetype=`./ssize` +set try +if eval $compile_ok && $run ./try > /dev/null; then + ssizetype=`$run ./try` echo "I'll be using $ssizetype for functions returning a byte count." >&4 else $cat >&4 <&4 @@ -14885,7 +15702,7 @@ int main() { EOCP set try if eval $compile; then - yyy=`./try` + yyy=`$run ./try` case "$yyy" in '') uidsign=1 echo "(I can't execute the test program--guessing unsigned.)" >&4 @@ -14973,60 +15790,6 @@ case "$yacc" in ;; esac -: see if dbm.h is available -: see if dbmclose exists -set dbmclose d_dbmclose -eval $inlibc - -case "$d_dbmclose" in -$define) - set dbm.h i_dbm - eval $inhdr - case "$i_dbm" in - $define) - val="$undef" - set i_rpcsvcdbm - eval $setvar - ;; - *) set rpcsvc/dbm.h i_rpcsvcdbm - eval $inhdr - ;; - esac - ;; -*) echo "We won't be including " - val="$undef" - set i_dbm - eval $setvar - val="$undef" - set i_rpcsvcdbm - eval $setvar - ;; -esac - -: see if this is a sys/file.h system -val='' -set sys/file.h val -eval $inhdr - -: do we need to include sys/file.h ? -case "$val" in -"$define") - echo " " - if $h_sysfile; then - val="$define" - echo "We'll be including ." >&4 - else - val="$undef" - echo "We won't be including ." >&4 - fi - ;; -*) - h_sysfile=false - ;; -esac -set i_sysfile -eval $setvar - : see if fcntl.h is there val='' set fcntl.h val @@ -15056,6 +15819,14 @@ esac set i_fcntl eval $setvar +: see if this is a fp.h system +set fp.h i_fp +eval $inhdr + +: see if this is a fp_class.h system +set fp_class.h i_fp_class +eval $inhdr + : see if this is a iconv.h system set iconv.h i_iconv eval $inhdr @@ -15250,12 +16021,12 @@ $awk \\ EOSH cat <<'EOSH' >> Cppsym.try 'length($1) > 0 { - printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", %s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 - printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", _%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 - printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", __%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 - printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", __%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 + printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", (long)%s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 + printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", (long)_%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 + printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", (long)__%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 + printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", (long)__%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1 }' >> try.c -echo '}' >> try.c +echo 'return 0;}' >> try.c EOSH cat <> Cppsym.try ccflags="$ccflags" @@ -15263,7 +16034,7 @@ case "$osname-$gccversion" in irix-) ccflags="\$ccflags -woff 1178" ;; os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;; esac -$cc -o try $optimize \$ccflags $ldflags try.c $libs && ./try$exe_ext +$cc -o try $optimize \$ccflags $ldflags try.c $libs && $run ./try EOSH chmod +x Cppsym.try $eunicefix Cppsym.try @@ -15343,7 +16114,6 @@ else $test "$silent" || sleep 1 fi fi -$rm -f ccsym* Cppsym.* : see if this is a termio system val="$undef" @@ -15437,6 +16207,26 @@ fi set i_sysioctl eval $setvar +: see if socket ioctl defs are in sys/sockio.h +echo " " +xxx=`./findhdr sys/sockio.h` +if $test "$xxx"; then + if $contains SIOCATMARK $xxx >/dev/null 2>&1; then + val="$define" + echo "You have socket ioctls defined in ." >&4 + else + val="$undef" + echo "No socket ioctls found in ." >&4 + fi +else + val="$undef" + $cat < not found, assuming socket ioctls are in . +EOM +fi +set i_syssockio +eval $setvar + : see if this is a syslog.h system set syslog.h i_syslog @@ -15459,10 +16249,6 @@ eval $inhdr set sys/statvfs.h i_sysstatvfs eval $inhdr -: see if this is a sys/uio.h system -set sys/uio.h i_sysuio -eval $inhdr - : see if this is a sys/un.h system set sys/un.h i_sysun eval $inhdr @@ -15580,11 +16366,16 @@ for xxx in $known_extensions ; do $define) avail_ext="$avail_ext $xxx" ;; esac ;; + I18N/Langinfo|i18n_lan) + case "$i_langinfo$d_nl_langinfo" in + $define$define) avail_ext="$avail_ext $xxx" ;; + esac + ;; NDBM_File|ndbm_fil) case "$i_ndbm" in $define) case "$osname-$use64bitint" in - hpux-define) + cygwin-*|hpux-define) case "$libs" in *-lndbm*) avail_ext="$avail_ext $xxx" ;; esac @@ -15598,7 +16389,7 @@ for xxx in $known_extensions ; do case "${i_dbm}${i_rpcsvcdbm}" in *"${define}"*) case "$osname-$use64bitint" in - hpux-define) + cygwin-*|hpux-define) case "$libs" in *-ldbm*) avail_ext="$avail_ext $xxx" ;; esac @@ -15630,8 +16421,19 @@ for xxx in $known_extensions ; do esac ;; Thread|thread) - case "$usethreads" in - true|$define|y) avail_ext="$avail_ext $xxx" ;; + case "$usethreads" in + true|$define|y) + case "$useithreads" in + $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;; + esac + esac + ;; + threads) + case "$usethreads" in + true|$define|y) + case "$useithreads" in + $define|true|[yY]*) avail_ext="$avail_ext $xxx" ;; + esac esac ;; IPC/SysV|ipc/sysv) @@ -15876,6 +16678,7 @@ _a='$_a' _exe='$_exe' _o='$_o' afs='$afs' +afsroot='$afsroot' alignbytes='$alignbytes' ansi2knr='$ansi2knr' aphostname='$aphostname' @@ -15931,7 +16734,6 @@ cppminus='$cppminus' cpprun='$cpprun' cppstdin='$cppstdin' cppsymbols='$cppsymbols' -crosscompile='$crosscompile' cryptlib='$cryptlib' csh='$csh' d_Gconvert='$d_Gconvert' @@ -15969,12 +16771,15 @@ d_charvspr='$d_charvspr' d_chown='$d_chown' d_chroot='$d_chroot' d_chsize='$d_chsize' +d_class='$d_class' d_closedir='$d_closedir' +d_cmsghdr_s='$d_cmsghdr_s' d_const='$d_const' d_crypt='$d_crypt' d_csh='$d_csh' d_cuserid='$d_cuserid' d_dbl_dig='$d_dbl_dig' +d_dbminitproto='$d_dbminitproto' d_difftime='$d_difftime' d_dirnamlen='$d_dirnamlen' d_dlerror='$d_dlerror' @@ -15992,6 +16797,7 @@ d_endpwent='$d_endpwent' d_endsent='$d_endsent' d_eofnblk='$d_eofnblk' d_eunice='$d_eunice' +d_fchdir='$d_fchdir' d_fchmod='$d_fchmod' d_fchown='$d_fchown' d_fcntl='$d_fcntl' @@ -16000,10 +16806,17 @@ d_fd_macros='$d_fd_macros' d_fd_set='$d_fd_set' d_fds_bits='$d_fds_bits' d_fgetpos='$d_fgetpos' +d_finite='$d_finite' +d_finitel='$d_finitel' d_flexfnam='$d_flexfnam' d_flock='$d_flock' +d_flockproto='$d_flockproto' d_fork='$d_fork' +d_fp_class='$d_fp_class' d_fpathconf='$d_fpathconf' +d_fpclass='$d_fpclass' +d_fpclassify='$d_fpclassify' +d_fpclassl='$d_fpclassl' d_fpos64_t='$d_fpos64_t' d_frexpl='$d_frexpl' d_fs_data_s='$d_fs_data_s' @@ -16024,6 +16837,7 @@ d_gethbyname='$d_gethbyname' d_gethent='$d_gethent' d_gethname='$d_gethname' d_gethostprotos='$d_gethostprotos' +d_getitimer='$d_getitimer' d_getlogin='$d_getlogin' d_getmnt='$d_getmnt' d_getmntent='$d_getmntent' @@ -16058,6 +16872,8 @@ d_index='$d_index' d_inetaton='$d_inetaton' d_int64_t='$d_int64_t' d_isascii='$d_isascii' +d_isfinite='$d_isfinite' +d_isinf='$d_isinf' d_isnan='$d_isnan' d_isnanl='$d_isnanl' d_killpg='$d_killpg' @@ -16087,6 +16903,7 @@ d_mkstemps='$d_mkstemps' d_mktime='$d_mktime' d_mmap='$d_mmap' d_modfl='$d_modfl' +d_modfl_pow32_bug='$d_modfl_pow32_bug' d_mprotect='$d_mprotect' d_msg='$d_msg' d_msg_ctrunc='$d_msg_ctrunc' @@ -16096,12 +16913,14 @@ d_msg_peek='$d_msg_peek' d_msg_proxy='$d_msg_proxy' d_msgctl='$d_msgctl' d_msgget='$d_msgget' +d_msghdr_s='$d_msghdr_s' d_msgrcv='$d_msgrcv' d_msgsnd='$d_msgsnd' d_msync='$d_msync' d_munmap='$d_munmap' d_mymalloc='$d_mymalloc' d_nice='$d_nice' +d_nl_langinfo='$d_nl_langinfo' d_nv_preserves_uv='$d_nv_preserves_uv' d_nv_preserves_uv_bits='$d_nv_preserves_uv_bits' d_off64_t='$d_off64_t' @@ -16116,6 +16935,7 @@ d_phostname='$d_phostname' d_pipe='$d_pipe' d_poll='$d_poll' d_portable='$d_portable' +d_pthread_atfork='$d_pthread_atfork' d_pthread_yield='$d_pthread_yield' d_pwage='$d_pwage' d_pwchange='$d_pwchange' @@ -16129,6 +16949,8 @@ d_qgcvt='$d_qgcvt' d_quad='$d_quad' d_readdir='$d_readdir' d_readlink='$d_readlink' +d_readv='$d_readv' +d_recvmsg='$d_recvmsg' d_rename='$d_rename' d_rewinddir='$d_rewinddir' d_rmdir='$d_rmdir' @@ -16146,11 +16968,13 @@ d_semctl_semid_ds='$d_semctl_semid_ds' d_semctl_semun='$d_semctl_semun' d_semget='$d_semget' d_semop='$d_semop' +d_sendmsg='$d_sendmsg' d_setegid='$d_setegid' d_seteuid='$d_seteuid' d_setgrent='$d_setgrent' d_setgrps='$d_setgrps' d_sethent='$d_sethent' +d_setitimer='$d_setitimer' d_setlinebuf='$d_setlinebuf' d_setlocale='$d_setlocale' d_setnent='$d_setnent' @@ -16180,11 +17004,15 @@ d_shmget='$d_shmget' d_sigaction='$d_sigaction' d_sigprocmask='$d_sigprocmask' d_sigsetjmp='$d_sigsetjmp' +d_sockatmark='$d_sockatmark' +d_sockatmarkproto='$d_sockatmarkproto' 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_sresgproto='$d_sresgproto' +d_sresuproto='$d_sresuproto' d_statblks='$d_statblks' d_statfs_f_flags='$d_statfs_f_flags' d_statfs_s='$d_statfs_s' @@ -16201,6 +17029,7 @@ d_strcoll='$d_strcoll' d_strctcpy='$d_strctcpy' d_strerrm='$d_strerrm' d_strerror='$d_strerror' +d_strftime='$d_strftime' d_strtod='$d_strtod' d_strtol='$d_strtol' d_strtold='$d_strtold' @@ -16213,6 +17042,7 @@ d_strxfrm='$d_strxfrm' d_suidsafe='$d_suidsafe' d_symlink='$d_symlink' d_syscall='$d_syscall' +d_syscallproto='$d_syscallproto' d_sysconf='$d_sysconf' d_sysernlst='$d_sysernlst' d_syserrlst='$d_syserrlst' @@ -16225,9 +17055,14 @@ d_time='$d_time' d_times='$d_times' d_truncate='$d_truncate' d_tzname='$d_tzname' +d_u32align='$d_u32align' +d_ualarm='$d_ualarm' d_umask='$d_umask' d_uname='$d_uname' d_union_semun='$d_union_semun' +d_unordered='$d_unordered' +d_usleep='$d_usleep' +d_usleepproto='$d_usleepproto' d_ustat='$d_ustat' d_vendorarch='$d_vendorarch' d_vendorbin='$d_vendorbin' @@ -16242,10 +17077,14 @@ d_wait4='$d_wait4' d_waitpid='$d_waitpid' d_wcstombs='$d_wcstombs' d_wctomb='$d_wctomb' +d_writev='$d_writev' d_xenix='$d_xenix' date='$date' db_hashtype='$db_hashtype' db_prefixtype='$db_prefixtype' +db_version_major='$db_version_major' +db_version_minor='$db_version_minor' +db_version_patch='$db_version_patch' defvoidused='$defvoidused' direntrytype='$direntrytype' dlext='$dlext' @@ -16262,6 +17101,7 @@ eunicefix='$eunicefix' exe_ext='$exe_ext' expr='$expr' extensions='$extensions' +extras='$extras' fflushNULL='$fflushNULL' fflushall='$fflushall' find='$find' @@ -16270,6 +17110,7 @@ flex='$flex' fpossize='$fpossize' fpostype='$fpostype' freetype='$freetype' +from='$from' full_ar='$full_ar' full_csh='$full_csh' full_sed='$full_sed' @@ -16305,11 +17146,14 @@ i_dld='$i_dld' i_dlfcn='$i_dlfcn' i_fcntl='$i_fcntl' i_float='$i_float' +i_fp='$i_fp' +i_fp_class='$i_fp_class' i_gdbm='$i_gdbm' i_grp='$i_grp' i_iconv='$i_iconv' i_ieeefp='$i_ieeefp' i_inttypes='$i_inttypes' +i_langinfo='$i_langinfo' i_libutil='$i_libutil' i_limits='$i_limits' i_locale='$i_locale' @@ -16493,6 +17337,7 @@ patchlevel='$patchlevel' path_sep='$path_sep' perl5='$perl5' perl='$perl' +perl_patchlevel='$perl_patchlevel' perladmin='$perladmin' perllibs='$perllibs' perlpath='$perlpath' @@ -16519,6 +17364,7 @@ rd_nodata='$rd_nodata' revision='$revision' rm='$rm' rmail='$rmail' +run='$run' runnm='$runnm' sPRIEUldbl='$sPRIEUldbl' sPRIFUldbl='$sPRIFUldbl' @@ -16593,11 +17439,13 @@ subversion='$subversion' sysman='$sysman' tail='$tail' tar='$tar' +targetarch='$targetarch' tbl='$tbl' tee='$tee' test='$test' timeincl='$timeincl' timetype='$timetype' +to='$to' touch='$touch' tr='$tr' trnl='$trnl' @@ -16620,6 +17468,7 @@ uquadtype='$uquadtype' use5005threads='$use5005threads' use64bitall='$use64bitall' use64bitint='$use64bitint' +usecrosscompile='$usecrosscompile' usedl='$usedl' useithreads='$useithreads' uselargefiles='$uselargefiles' @@ -16631,6 +17480,7 @@ usenm='$usenm' useopcode='$useopcode' useperlio='$useperlio' useposix='$useposix' +usereentrant='$usereentrant' usesfio='$usesfio' useshrplib='$useshrplib' usesocks='$usesocks' @@ -16655,6 +17505,7 @@ vendorlibexp='$vendorlibexp' vendorprefix='$vendorprefix' vendorprefixexp='$vendorprefixexp' version='$version' +version_patchlevel_string='$version_patchlevel_string' versiononly='$versiononly' vi='$vi' voidflags='$voidflags' @@ -16672,7 +17523,8 @@ $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh : add special variables $test -f $src/patchlevel.h && \ awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh -echo "CONFIGDOTSH=true" >>config.sh +echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh +echo "PERL_CONFIG_SH=true" >>config.sh : propagate old symbols if $test -f UU/config.sh; then @@ -16702,7 +17554,7 @@ fi case "$alldone" in exit) $rm -rf UU - echo "Done." + echo "Extraction done." exit 0 ;; cont) @@ -16732,7 +17584,9 @@ esac echo " " exec 1>&4 +pwd=`pwd` . ./UU/extract +cd $pwd if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then dflt=y @@ -16762,7 +17616,7 @@ elif test -f [Mm]akefile; then echo " " echo "Now you must run a $make." else - echo "Done." + echo "Configure done." fi if $test -f Policy.sh; then