X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=0d497fd05b5c8a780fcdee7aa0f3cb1d6a4d72fa;hb=d566c4d64388fa0dfe772b965e119f17669e4f51;hp=2030c35dde63c4a5ea5e1dc99505ff136a64340b;hpb=44dbcf5f99b2db3275396e962be04b7cabf0f4be;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index 2030c35..0d497fd 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 Fri Jul 30 00:08:11 EET DST 1999 [metaconfig 3.0 PL70] +# Generated on Fri Sep 17 12:06:13 EET DST 1999 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <options.awk <<'EOF' BEGIN { - optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification + optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification len = length(optstr); for (i = 1; i <= len; i++) { @@ -1163,7 +1161,7 @@ silent='' extractsh='' override='' knowitall='' -rm -f optdef.sh +rm -f optdef.sh posthint.sh cat >optdef.sh <> posthint.sh + ;; + clear) + echo "$yyy=''" >> posthint.sh + ;; + define) + case "$zzz" in + '') zzz=define ;; + esac + echo "$yyy='$zzz'" >> posthint.sh + ;; + eval) + echo "eval \"$yyy=$zzz\"" >> posthint.sh + ;; + prepend) + echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh + ;; + undef) + case "$zzz" in + '') zzz="$uuu" ;; + esac + echo "$yyy=$zzz" >> posthint.sh + ;; + *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 + ;; + esac + ;; -V) echo "$me generated by metaconfig 3.0 PL70." >&2 exit 0;; --) break;; @@ -1229,7 +1278,7 @@ case "$error" in true) cat >&2 <&1` cf_by=`(logname) 2>/dev/null` @@ -2572,24 +2637,16 @@ case "$usethreads" in : user has specified that a threading perl is to be built, : we may need to set or change some other defaults. if $test -f usethreads.cbu; then + echo "Your platform has some specific hints for threaded builds, using them..." . ./usethreads.cbu - fi - case "$osname" in - aix|dec_osf|dos_djgpp|freebsd|hpux|irix|linux|next|openbsd|os2|solaris|vmesa) - # Known thread-capable platforms. - ;; - *) - cat >&4 <&4 +else + echo "Could not find manual pages in source form." >&4 +fi -case "$archname64" in -'') archname64='' ;; # not a typo +: see what memory models we can support +case "$models" in +'') + $cat >pdp11.c <<'EOP' +int main() { +#ifdef pdp11 + exit(0); +#else + exit(1); +#endif +} +EOP + ( cc -o pdp11 pdp11.c ) >/dev/null 2>&1 + if $test -f pdp11 && ./pdp11 2>/dev/null; then + dflt='unsplit split' + else + tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge` + case "$tans" in + X) dflt='none';; + *) if $test -d /lib/small || $test -d /usr/lib/small; then + dflt='small' + else + dflt='' + fi + if $test -d /lib/medium || $test -d /usr/lib/medium; then + dflt="$dflt medium" + fi + if $test -d /lib/large || $test -d /usr/lib/large; then + dflt="$dflt large" + fi + if $test -d /lib/huge || $test -d /usr/lib/huge; then + dflt="$dflt huge" + fi + esac + fi;; +*) dflt="$models";; esac +$cat <&4 </dev/null 2>&1 || \ + $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then + dflt='-i' + else + dflt='none' + fi;; + *) dflt="$split";; + esac + rp="What flag indicates separate I and D space?" + . ./myread + tans="$ans" + case "$tans" in + none) tans='';; + esac + split="$tans" + unsplit='';; +*large*|*small*|*medium*|*huge*) + case "$models" in + *large*) + case "$large" in + '') dflt='-Ml';; + *) dflt="$large";; + esac + rp="What flag indicates large model?" + . ./myread + tans="$ans" + case "$tans" in + none) tans=''; + esac + large="$tans";; + *) large='';; + esac + case "$models" in + *huge*) case "$huge" in + '') dflt='-Mh';; + *) dflt="$huge";; + esac + rp="What flag indicates huge model?" + . ./myread + tans="$ans" + case "$tans" in + none) tans=''; + esac + huge="$tans";; + *) huge="$large";; + esac + case "$models" in + *medium*) case "$medium" in + '') dflt='-Mm';; + *) dflt="$medium";; + esac + rp="What flag indicates medium model?" + . ./myread + tans="$ans" + case "$tans" in + none) tans=''; + esac + medium="$tans";; + *) medium="$large";; + esac + case "$models" in + *small*) case "$small" in + '') dflt='none';; + *) dflt="$small";; + esac + rp="What flag indicates small model?" + . ./myread + tans="$ans" + case "$tans" in + none) tans=''; + esac + small="$tans";; + *) small='';; esac ;; +*) + echo "Unrecognized memory models--you may have to edit Makefile.SH" >&4 + ;; esac +$rm -f pdp11.* pdp11 -: determine the architecture name +: make some quick guesses about what we are up against echo " " -if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then - tarch=`arch`"-$osname" -elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then - if uname -m > tmparch 2>&1 ; then - tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \ - -e 's/$/'"-$osname/" tmparch` +$echo $n "Hmm... $c" +echo exit 1 >bsd +echo exit 1 >usg +echo exit 1 >v7 +echo exit 1 >osf1 +echo exit 1 >eunice +echo exit 1 >xenix +echo exit 1 >venix +echo exit 1 >os2 +d_bsd="$undef" +$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null +if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1 +then + echo "Looks kind of like an OSF/1 system, but we'll see..." + echo exit 0 >osf1 +elif test `echo abc | tr a-z A-Z` = Abc ; then + xxx=`./loc addbib blurfl $pth` + if $test -f $xxx; then + echo "Looks kind of like a USG system with BSD features, but we'll see..." + echo exit 0 >bsd + echo exit 0 >usg else - tarch="$osname" + if $contains SIGTSTP foo >/dev/null 2>&1 ; then + echo "Looks kind of like an extended USG system, but we'll see..." + else + echo "Looks kind of like a USG system, but we'll see..." + fi + echo exit 0 >usg fi - $rm -f tmparch +elif $contains SIGTSTP foo >/dev/null 2>&1 ; then + echo "Looks kind of like a BSD system, but we'll see..." + d_bsd="$define" + echo exit 0 >bsd else - tarch="$osname" + echo "Looks kind of like a Version 7 system, but we'll see..." + echo exit 0 >v7 fi -case "$myarchname" in -''|"$tarch") ;; -*) +case "$eunicefix" in +*unixtovms*) + $cat <<'EOI' +There is, however, a strange, musty smell in the air that reminds me of +something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. +EOI + echo exit 0 >eunice + d_eunice="$define" +: it so happens the Eunice I know will not run shell scripts in Unix format + ;; +*) + echo " " + echo "Congratulations. You aren't running Eunice." + d_eunice="$undef" + ;; +esac +: Detect OS2. The p_ variable is set above in the Head.U unit. +case "$p_" in +:) ;; +*) + $cat <<'EOI' +I have the feeling something is not exactly right, however...don't tell me... +lemme think...does HAL ring a bell?...no, of course, you're only running OS/2! +EOI + echo exit 0 >os2 + ;; +esac +if test -f /xenix; then + echo "Actually, this looks more like a XENIX system..." + echo exit 0 >xenix + d_xenix="$define" +else + echo " " + echo "It's not Xenix..." + d_xenix="$undef" +fi +chmod +x xenix +$eunicefix xenix +if test -f /venix; then + echo "Actually, this looks more like a VENIX system..." + echo exit 0 >venix +else + echo " " + if ./xenix; then + : null + else + echo "Nor is it Venix..." + fi +fi +chmod +x bsd usg v7 osf1 eunice xenix venix os2 +$eunicefix bsd usg v7 osf1 eunice xenix venix os2 +$rm -f foo + +: see if we need a special compiler +echo " " +if ./usg; then + case "$cc" in + '') case "$Mcc" in + /*) dflt='Mcc';; + *) case "$large" in + -M*) dflt='cc';; + *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then + if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then + dflt='cc' + else + dflt='cc -M' + fi + else + dflt='cc' + fi;; + esac;; + esac;; + *) dflt="$cc";; + esac + case "$dflt" in + *M*) $cat <<'EOM' +On some older systems the default C compiler will not resolve multiple global +references that happen to have the same name. On some such systems the "Mcc" +command may be used to force these to be resolved. On other systems a "cc -M" +command is required. (Note that the -M flag on other systems indicates a +memory model to use!) If you have the Gnu C compiler, you might wish to use +that instead. + +EOM + ;; + esac + rp="Use which C compiler?" + . ./myread + cc="$ans" +else + case "$cc" in + '') dflt=cc;; + *) dflt="$cc";; + esac + rp="Use which C compiler?" + . ./myread + cc="$ans" +fi +: Look for a hint-file generated 'call-back-unit'. Now that the +: user has specified the compiler, we may need to set or change some +: other defaults. +if $test -f cc.cbu; then + . ./cc.cbu +fi +echo " " +echo "Checking for GNU cc in disguise and/or its version number..." >&4 +$cat >gccvers.c < +int main() { +#ifdef __GNUC__ +#ifdef __VERSION__ + printf("%s\n", __VERSION__); +#else + printf("%s\n", "1"); +#endif +#endif + exit(0); +} +EOM +if $cc -o gccvers gccvers.c; then + gccversion=`./gccvers` + case "$gccversion" in + '') echo "You are not using GNU cc." ;; + *) echo "You are using GNU cc $gccversion." ;; + esac +else + echo " " + echo "*** WHOA THERE!!! ***" >&4 + echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4 + case "$knowitall" in + '') + echo " You'd better start hunting for one and let me know about it." >&4 + exit 1 + ;; + esac +fi +$rm -f gccvers* +case "$gccversion" in +1*) cpp=`./loc gcc-cpp $cpp $pth` ;; +esac + +cat < tmparch 2>&1 ; then + tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \ + -e 's/$/'"-$osname/" tmparch` + else + tarch="$osname" + fi + $rm -f tmparch +else + tarch="$osname" +fi +case "$myarchname" in +''|"$tarch") ;; +*) echo "(Your architecture name used to be $myarchname.)" archname='' ;; @@ -3208,7 +3610,7 @@ privlib="$ans" privlibexp="$ansexp" : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installprivlib=`echo $privlibexp | sed 's#^$prefix#$installprefix#'` + installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"` else installprivlib="$privlibexp" fi @@ -3253,7 +3655,7 @@ else fi : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installarchlib=`echo $archlibexp | sed 's#^$prefix#$installprefix#'` + installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"` else installarchlib="$archlibexp" fi @@ -3262,7 +3664,10 @@ fi : Binary compatibility with 5.005 is not possible for builds : with advanced features case "$usethreads$usemultiplicity" in -*define*) bincompat5005="$undef" ;; +*define*) + bincompat5005="$undef" + d_bincompat5005="$undef" + ;; *) $cat <bsd -echo exit 1 >usg -echo exit 1 >v7 -echo exit 1 >osf1 -echo exit 1 >eunice -echo exit 1 >xenix -echo exit 1 >venix -echo exit 1 >os2 -d_bsd="$undef" -$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null -if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1 -then - echo "Looks kind of like an OSF/1 system, but we'll see..." - echo exit 0 >osf1 -elif test `echo abc | tr a-z A-Z` = Abc ; then - xxx=`./loc addbib blurfl $pth` - if $test -f $xxx; then - echo "Looks kind of like a USG system with BSD features, but we'll see..." - echo exit 0 >bsd - echo exit 0 >usg - else - if $contains SIGTSTP foo >/dev/null 2>&1 ; then - echo "Looks kind of like an extended USG system, but we'll see..." - else - echo "Looks kind of like a USG system, but we'll see..." - fi - echo exit 0 >usg - fi -elif $contains SIGTSTP foo >/dev/null 2>&1 ; then - echo "Looks kind of like a BSD system, but we'll see..." - d_bsd="$define" - echo exit 0 >bsd -else - echo "Looks kind of like a Version 7 system, but we'll see..." - echo exit 0 >v7 -fi -case "$eunicefix" in -*unixtovms*) - $cat <<'EOI' -There is, however, a strange, musty smell in the air that reminds me of -something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. -EOI - echo exit 0 >eunice - d_eunice="$define" -: it so happens the Eunice I know will not run shell scripts in Unix format - ;; -*) - echo " " - echo "Congratulations. You aren't running Eunice." - d_eunice="$undef" - ;; -esac -: Detect OS2. The p_ variable is set above in the Head.U unit. -case "$p_" in -:) ;; -*) - $cat <<'EOI' -I have the feeling something is not exactly right, however...don't tell me... -lemme think...does HAL ring a bell?...no, of course, you're only running OS/2! -EOI - echo exit 0 >os2 - ;; -esac -if test -f /xenix; then - echo "Actually, this looks more like a XENIX system..." - echo exit 0 >xenix - d_xenix="$define" -else - echo " " - echo "It's not Xenix..." - d_xenix="$undef" -fi -chmod +x xenix -$eunicefix xenix -if test -f /venix; then - echo "Actually, this looks more like a VENIX system..." - echo exit 0 >venix -else - echo " " - if ./xenix; then - : null - else - echo "Nor is it Venix..." - fi -fi -chmod +x bsd usg v7 osf1 eunice xenix venix os2 -$eunicefix bsd usg v7 osf1 eunice xenix venix os2 -$rm -f foo - -: see if setuid scripts can be secure -$cat <reflect - chmod +x,u+s reflect - ./reflect >flect 2>&1 - if $contains "/dev/fd" flect >/dev/null; then - echo "Congratulations, your kernel has secure setuid scripts!" >&4 - val="$define" +: see if setuid scripts can be secure +$cat <reflect + chmod +x,u+s reflect + ./reflect >flect 2>&1 + if $contains "/dev/fd" flect >/dev/null; then + echo "Congratulations, your kernel has secure setuid scripts!" >&4 + val="$define" else $cat <&4 -else - echo "Could not find manual pages in source form." >&4 -fi - -: see what memory models we can support -case "$models" in -'') - $cat >pdp11.c <<'EOP' -int main() { -#ifdef pdp11 - exit(0); -#else - exit(1); +$echo $n "Hmm... $c" +dflt='/usr/include' +incpath='' +mips_type='' +if $test -f /bin/mips && /bin/mips; then + echo "Looks like a MIPS system..." + $cat >usr.c <<'EOCP' +#ifdef SYSTYPE_BSD43 +/bsd43 #endif -} -EOP - ( cc -o pdp11 pdp11.c ) >/dev/null 2>&1 - if $test -f pdp11 && ./pdp11 2>/dev/null; then - dflt='unsplit split' +EOCP + if $cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then + dflt='/bsd43/usr/include' + incpath='/bsd43' + mips_type='BSD 4.3' else - tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge` - case "$tans" in - X) dflt='none';; - *) if $test -d /lib/small || $test -d /usr/lib/small; then - dflt='small' - else - dflt='' - fi - if $test -d /lib/medium || $test -d /usr/lib/medium; then - dflt="$dflt medium" - fi - if $test -d /lib/large || $test -d /usr/lib/large; then - dflt="$dflt large" - fi - if $test -d /lib/huge || $test -d /usr/lib/huge; then - dflt="$dflt huge" - fi - esac - fi;; -*) dflt="$models";; + mips_type='System V' + fi + $rm -f usr.c usr.out + echo "and you're compiling with the $mips_type compiler and libraries." + xxx_prompt=y + echo "exit 0" >mips +else + echo "Doesn't look like a MIPS system." + xxx_prompt=n + echo "exit 1" >mips +fi +chmod +x mips +$eunicefix mips +case "$usrinc" in +'') ;; +*) dflt="$usrinc";; +esac +case "$xxx_prompt" in +y) fn=d/ + echo " " + rp='Where are the include files you want to use?' + . ./getfile + usrinc="$ans" + ;; +*) usrinc="$dflt" + ;; esac -$cat <&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 -case "$models" in -none) - small='' - medium='' - large='' - huge='' - unsplit='' - split='' - ;; -*split) - case "$split" in - '') if $contains '\-i' $sysman/ld.1 >/dev/null 2>&1 || \ - $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then - dflt='-i' +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 - dflt='none' - fi;; - *) dflt="$split";; + echo "(However, $cpprun $cpplast does not work, let's see...)" + fi + ;; esac - rp="What flag indicates separate I and D space?" - . ./myread - tans="$ans" - case "$tans" in - none) tans='';; - esac - split="$tans" - unsplit='';; -*large*|*small*|*medium*|*huge*) - case "$models" in - *large*) - case "$large" in - '') dflt='-Ml';; - *) dflt="$large";; - esac - rp="What flag indicates large model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - large="$tans";; - *) large='';; - esac - case "$models" in - *huge*) case "$huge" in - '') dflt='-Mh';; - *) dflt="$huge";; - esac - rp="What flag indicates huge model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - huge="$tans";; - *) huge="$large";; - esac - case "$models" in - *medium*) case "$medium" in - '') dflt='-Mm';; - *) dflt="$medium";; - esac - rp="What flag indicates medium model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - medium="$tans";; - *) medium="$large";; - esac - case "$models" in - *small*) case "$small" in - '') dflt='none';; - *) dflt="$small";; - esac - rp="What flag indicates small model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - small="$tans";; - *) small='';; - esac - ;; -*) - echo "Unrecognized memory models--you may have to edit Makefile.SH" >&4 - ;; -esac -$rm -f pdp11.* pdp11 - -: see if we need a special compiler -echo " " -if ./usg; then - case "$cc" in - '') case "$Mcc" in - /*) dflt='Mcc';; - *) case "$large" in - -M*) dflt='cc';; - *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then - if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then - dflt='cc' - else - dflt='cc -M' - fi - else - dflt='cc' - fi;; - esac;; - esac;; - *) dflt="$cc";; - esac - case "$dflt" in - *M*) $cat <<'EOM' -On some older systems the default C compiler will not resolve multiple global -references that happen to have the same name. On some such systems the "Mcc" -command may be used to force these to be resolved. On other systems a "cc -M" -command is required. (Note that the -M flag on other systems indicates a -memory model to use!) If you have the Gnu C compiler, you might wish to use -that instead. - -EOM - ;; - esac - rp="Use which C compiler?" - . ./myread - cc="$ans" -else - case "$cc" in - '') dflt=cc;; - *) dflt="$cc";; - esac - rp="Use which C compiler?" - . ./myread - cc="$ans" -fi -: Look for a hint-file generated 'call-back-unit'. Now that the -: user has specified the compiler, we may need to set or change some -: other defaults. -if $test -f cc.cbu; then - . ./cc.cbu -fi -echo " " -echo "Checking for GNU cc in disguise and/or its version number..." >&4 -$cat >gccvers.c < -int main() { -#ifdef __GNUC__ -#ifdef __VERSION__ - printf("%s\n", __VERSION__); -#else - printf("%s\n", "1"); -#endif -#endif - exit(0); -} -EOM -if $cc -o gccvers gccvers.c; then - gccversion=`./gccvers` - case "$gccversion" in - '') echo "You are not using GNU cc." ;; - *) echo "You are using GNU cc $gccversion." ;; - esac -else - echo " " - echo "*** WHOA THERE!!! ***" >&4 - echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4 - case "$knowitall" in - '') - echo " You'd better start hunting for one and let me know about it." >&4 - exit 1 - ;; - esac -fi -$rm -f gccvers* -case "$gccversion" in -1*) cpp=`./loc gcc-cpp $cpp $pth` ;; -esac - -: What should the include directory be ? -echo " " -$echo $n "Hmm... $c" -dflt='/usr/include' -incpath='' -mips_type='' -if $test -f /bin/mips && /bin/mips; then - echo "Looks like a MIPS system..." - $cat >usr.c <<'EOCP' -#ifdef SYSTYPE_BSD43 -/bsd43 -#endif -EOCP - if $cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then - dflt='/bsd43/usr/include' - incpath='/bsd43' - mips_type='BSD 4.3' - else - mips_type='System V' - fi - $rm -f usr.c usr.out - echo "and you're compiling with the $mips_type compiler and libraries." - xxx_prompt=y - echo "exit 0" >mips -else - echo "Doesn't look like a MIPS system." - xxx_prompt=n - echo "exit 1" >mips -fi -chmod +x mips -$eunicefix mips -case "$usrinc" in -'') ;; -*) dflt="$usrinc";; -esac -case "$xxx_prompt" in -y) fn=d/ - echo " " - rp='Where are the include files you want to use?' - . ./getfile - usrinc="$ans" - ;; -*) usrinc="$dflt" - ;; -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 - echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin -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..." - ;; +else + case "$cppstdin" in + '') ;; + *) + echo "Good old $cppstdin $cppminus does not seem to be of any help..." + ;; esac fi @@ -4147,7 +4218,7 @@ none) libs=' ';; *) libs="$ans";; esac -: determine optimize, if desired, or use for debug flag also +: determine optimization, if desired, or use for debug flag also case "$optimize" in ' '|$undef) dflt='none';; '') dflt='-O';; @@ -4155,11 +4226,10 @@ case "$optimize" in esac $cat <&1 + echo 'int main(void) { return 0; }' > gcctest.c + if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then + echo "Yes, it does." 2>&1 + case "$ccflags" in + *strict-aliasing*) + echo "Leaving current flags $ccflags alone." 2>&1 + ;; + *) dflt="$dflt -fno-strict-aliasing" ;; + esac + else + echo "Nope, it doesn't, but that's ok." 2>&1 + fi + ;; + esac ;; esac @@ -4229,7 +4318,7 @@ $define) esac case "$hint" in -none|recommended) dflt="$ccflags $dflt" ;; +default|recommended) dflt="$ccflags $dflt" ;; *) dflt="$ccflags";; esac @@ -4694,7 +4783,7 @@ case "$vendorprefix" in vendorlibexp="$ansexp" : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installvendorlib=`echo $vendorlibexp | $sed 's#^$prefix#$installprefix#'` + installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"` else installvendorlib="$vendorlibexp" fi @@ -4757,7 +4846,7 @@ binexp="$ansexp" : Change installation prefix, if necessary. : XXX Bug? -- ignores Configure -Dinstallprefix setting. if $test X"$prefix" != X"$installprefix"; then - installbin=`echo $binexp | sed 's#^$prefix#$installprefix#'` + installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"` else installbin="$binexp" fi @@ -5739,7 +5828,7 @@ esac : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installman1dir=`echo $man1direxp | $sed 's#^$prefix#$installprefix#'` + installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"` else installman1dir="$man1direxp" fi @@ -5882,7 +5971,7 @@ esac : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installman3dir=`echo $man3direxp | $sed 's#^$prefix#$installprefix#'` + installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"` else installman3dir="$man3direxp" fi @@ -6314,7 +6403,7 @@ scriptdir="$ans" scriptdirexp="$ansexp" : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installscript=`echo $scriptdirexp | sed 's#^$prefix#$installprefix#'` + installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"` else installscript="$scriptdirexp" fi @@ -6379,7 +6468,7 @@ sitelib="$ans" sitelibexp="$ansexp" : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installsitelib=`echo $sitelibexp | sed 's#^$prefix#$installprefix#'` + installsitelib=`echo $sitelibexp | sed "s#^$prefix#$installprefix#"` else installsitelib="$sitelibexp" fi @@ -6409,19 +6498,56 @@ sitearch="$ans" sitearchexp="$ansexp" : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installsitearch=`echo $sitearchexp | sed 's#^$prefix#$installprefix#'` + installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"` else installsitearch="$sitearchexp" fi cat <. Versions 5.003_02 and later of perl allow alternate IO -mechanisms via a "PerlIO" abstraction, but the stdio mechanism is still -the default. This abstraction layer can use AT&T's sfio (if you already -have sfio installed) or regular stdio. Using PerlIO with sfio may cause -problems with some extension modules. Using PerlIO with stdio is safe, +Perl can be built to take advantage of long doubles which +(if available) may give more accuracy and range for floating point +numbers. To do so, Configure must be run with -Duselongdouble. + +If this doesn't make any sense to you, just accept the default 'n'. +EOM +case "$uselongdouble" in +$define|true|[yY]*) dflt='y';; +*) dflt='n';; +esac +rp='Try to use long doubles if available?' +. ./myread +case "$ans" in +y|Y) val="$define" ;; +*) val="$undef" ;; +esac +set uselongdouble +eval $setvar + +case "$uselongdouble" in +"$define"|true|[yY]*) +: Look for a hint-file generated 'call-back-unit'. If the +: user has specified that long doubles should be used, +: we may need to set or change some other defaults. + if $test -f uselongdouble.cbu; then + echo "Your platform has some specific hints for long doubles, using them..." + . ./uselongdouble.cbu + else + $cat <. Versions 5.003_02 and later of perl allow alternate IO +mechanisms via a "PerlIO" abstraction, but the stdio mechanism is still +the default. This abstraction layer can use AT&T's sfio (if you already +have sfio installed) or regular stdio. Using PerlIO with sfio may cause +problems with some extension modules. Using PerlIO with stdio is safe, but it is slower than plain stdio and therefore is not the default. If this doesn't make any sense to you, just accept the default 'n'. @@ -6513,30 +6639,517 @@ EOP *) xxx_list='gconvert gcvt sprintf' ;; esac - for xxx_convert in $xxx_list; do - echo "Trying $xxx_convert" - $rm -f try try$_o - set try -DTRY_$xxx_convert - if eval $compile; then - echo "$xxx_convert" found. >&4 - if ./try; then - echo "I'll use $xxx_convert to convert floats into a string." >&4 - break; - else - echo "...But $xxx_convert didn't work as I expected." - fi - else - echo "$xxx_convert NOT found." >&4 - fi - done - - case "$xxx_convert" in - gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;; - gcvt) d_Gconvert='gcvt((x),(n),(b))' ;; - *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;; - esac + for xxx_convert in $xxx_list; do + echo "Trying $xxx_convert" + $rm -f try try$_o + set try -DTRY_$xxx_convert + if eval $compile; then + echo "$xxx_convert" found. >&4 + if ./try; then + echo "I'll use $xxx_convert to convert floats into a string." >&4 + break; + else + echo "...But $xxx_convert didn't work as I expected." + fi + else + echo "$xxx_convert NOT found." >&4 + fi + done + + case "$xxx_convert" in + gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;; + gcvt) d_Gconvert='gcvt((x),(n),(b))' ;; + *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;; + esac +fi + +: 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 +case "$use64bits" in +"$define" ) + echo " " + echo $n "Checking to see if your system supports int64_t...$c" >&4 + $cat >try.c < +#$i_inttypes I_INTTYPES +#ifdef I_INTTYPES +#include +#endif +int64_t foo() { int64_t x; x = 7; return x; } +EOCP + if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then + val="$define" + echo " Yup, it does." >&4 + else + val="$undef" + echo " Nope, it doesn't." >&4 + fi + $rm -f try.* + ;; +*) val="$undef" + ;; +esac +set d_int64t +eval $setvar + + +: check for lengths of integral types +echo " " +case "$intsize" in +'') + echo "Checking to see how big your integers are..." >&4 + $cat >intsize.c <<'EOCP' +#include +int main() +{ + printf("intsize=%d;\n", sizeof(int)); + printf("longsize=%d;\n", sizeof(long)); + printf("shortsize=%d;\n", sizeof(short)); + exit(0); +} +EOCP + set intsize + if eval $compile_ok && ./intsize > /dev/null; then + eval `./intsize` + echo "Your integers are $intsize bytes long." + echo "Your long integers are $longsize bytes long." + echo "Your short integers are $shortsize bytes long." + else + $cat >&4 <&4 +echo 'long long foo() { long long x; x = 7; return x; }' > try.c +if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then + val="$define" + echo " Yup, it does." >&4 +else + val="$undef" + echo " Nope, it doesn't." >&4 +fi +$rm try.* +set d_longlong +eval $setvar + +: check for length of long long +case "${d_longlong}${longlongsize}" in +$define) + echo " " + $echo $n "Checking to see how big your long longs are...$c" >&4 + $cat >try.c <<'EOCP' +#include +int main() +{ + printf("%d\n", sizeof(long long)); +} +EOCP + set try + if eval $compile_ok; then + longlongsize=`./try` + $echo " $longlongsize bytes." >&4 + else + dflt='8' + echo " " + echo "(I can't seem to compile the test program. Guessing...)" + rp="What is the size of a long long (in bytes)?" + . ./myread + longlongsize="$ans" + fi + if $test "X$longsize" = "X$longlongsize"; then + echo "(That isn't any different from an ordinary long.)" + fi + ;; +esac +$rm -f try.c try + +echo " " + +if $test X"$intsize" = X8 -o X"$longsize" = X8 -o X"$d_int64t" = X"$define" -o X"$d_longlong" = X"$define"; then + +echo "Checking how to print 64-bit integers..." >&4 + +if $test X"$sPRId64" = X -a X"$intsize" = X8; then + quad=int + $cat >try.c <<'EOCP' +#include +#include +int main() { + int q = 12345678901; + printf("%ld\n", q); +} +EOCP + set try + if eval $compile; then + yyy=`./try$exe_ext` + case "$yyy" in + 12345678901) + sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"'; + sPRIo64='"o"'; sPRIx64='"x"'; sPRIX64='"X"'; + echo "We will use %d." + ;; + esac + fi +fi + +if $test X"$sPRId64" = X -a X"$longsize" = X8; then + quad=long + $cat >try.c <<'EOCP' +#include +#include +int main() { + long q = 12345678901; + printf("%ld\n", q); +} +EOCP + set try + if eval $compile; then + yyy=`./try$exe_ext` + case "$yyy" in + 12345678901) + sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"'; + sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIX64='"lX"'; + echo "We will use %ld." + ;; + esac + fi +fi + +if $test X"$sPRId64" = X -a X"$i_inttypes.h" = X"$define" -a X"$d_int64t" = X"$define"; then + quad=int64_t + $cat >try.c <<'EOCP' +#include +#include +#include +int main() { + int64_t q = 12345678901; + printf("%" PRId64 "\n", q); +} +EOCP + set try + if eval $compile; then + yyy=`./try$exe_ext` + case "$yyy" in + 12345678901) + sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64; + sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIX64=PRIX64; + echo "We will use the C9X style." + ;; + esac + fi +fi + +if $test X"$sPRId64" = X -a X"$d_longlong" = X"$define" -a X"$longlongsize" = X8; then + quad="long long" + $cat >try.c <<'EOCP' +#include +#include +int main() { + long long q = 12345678901LL; /* AIX cc requires the LL prefix. */ + printf("%lld\n", q); +} +EOCP + set try + if eval $compile; then + yyy=`./try$exe_ext` + case "$yyy" in + 12345678901) + sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"'; + sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIX64='"llX"'; + echo "We will use the %lld style." + ;; + esac + fi +fi + +if $test X"$sPRId64" = X -a X"$quad" != X; then + $cat >try.c < +#include +int main() { + $quad q = 12345678901; + printf("%Ld\n", q); +} +EOCP + set try + if eval $compile; then + yyy=`./try$exe_ext` + case "$yyy" in + 12345678901) + sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"'; + sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIX64='"LX"'; + echo "We will use %lld." + ;; + esac + fi +fi + +if $test X"$sPRId64" = X -a X"$quad" != X; then + $cat >try.c < +#include +int main() { + $quad q = 12345678901; + printf("%qd\n", q); +} +EOCP + set try + if eval $compile; then + yyy=`./try$exe_ext` + case "$yyy" in + 12345678901) + sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"'; + sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIX64='"qX"'; + echo "We will use %qd." + ;; + esac + fi +fi + +if $test X"$sPRId64" = X; then + echo "Cannot figure out how to print 64-bit integers." >&4 +fi + +$rm -f try try.* + +fi # intsize -o longsize -o d_int64t -o d_longlong + +case "$sPRId64" in +'') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef"; + d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIX64="$undef"; + ;; +*) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define"; + d_PRIo64="$define"; d_PRIx64="$define"; d_PRIX64="$define"; + ;; +esac + +: check for length of double +echo " " +case "$doublesize" in +'') + $echo $n "Checking to see how big your double precision numbers are...$c" >&4 + $cat >try.c <<'EOCP' +#include +int main() +{ + printf("%d\n", sizeof(double)); +} +EOCP + set try + if eval $compile_ok; then + doublesize=`./try` + $echo " $doublesize bytes." >&4 + else + dflt='8' + echo "(I can't seem to compile the test program. Guessing...)" + rp="What is the size of a double precision number (in bytes)?" + . ./myread + doublesize="$ans" + fi + ;; +esac +$rm -f try.c try + +: check for long doubles +echo " " +echo $n "Checking to see if your system supports long double...$c" >&4 +echo 'long double foo() { long double x; x = 7.0; return x; }' > try.c +if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then + val="$define" + echo " Yup, it does." >&4 +else + val="$undef" + echo " Nope, it doesn't." >&4 +fi +$rm try.* +set d_longdbl +eval $setvar + +: check for length of long double +case "${d_longdbl}${longdblsize}" in +$define) + echo " " + $echo $n "Checking to see how big your long doubles are...$c" >&4 + $cat >try.c <<'EOCP' +#include +int main() +{ + printf("%d\n", sizeof(long double)); +} +EOCP + set try + if eval $compile; then + longdblsize=`./try` + $echo " $longdblsize bytes." >&4 + else + dflt='8' + echo " " + echo "(I can't seem to compile the test program. Guessing...)" >&4 + rp="What is the size of a long double (in bytes)?" + . ./myread + longdblsize="$ans" + fi + if $test "X$doublesize" = "X$longdblsize"; then + echo "(That isn't any different from an ordinary double.)" + fi + ;; +esac +$rm -f try.c try + +echo " " + +if $test X"$d_longdbl" = X"$define"; then + +echo "Checking how to print long doubles..." >&4 + +if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then + $cat >try.c <<'EOCP' +#include +#include +int main() { + double d = 123.456; + printf("%.3f\n", d); +} +EOCP + set try + if eval $compile; then + yyy=`./try$exe_ext` + case "$yyy" in + 123.456) + sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"'; + sPRIFldbl='"F"'; sPRIGldbl='"G"'; sPRIEldbl='"E"'; + echo "We will use %f." + ;; + esac + fi +fi + +if $test X"$sPRIfldbl" = X; then + $cat >try.c <<'EOCP' +#include +#include +int main() { + long double d = 123.456; + printf("%.3llf\n", d); +} +EOCP + set try + if eval $compile; then + yyy=`./try$exe_ext` + case "$yyy" in + 123.456) + sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"'; + sPRIFldbl='"llF"'; sPRIGldbl='"llG"'; sPRIEldbl='"llE"'; + echo "We will use %llf." + ;; + esac + fi +fi + +if $test X"$sPRIfldbl" = X; then + $cat >try.c <<'EOCP' +#include +#include +int main() { + long double d = 123.456; + printf("%.3Lf\n", d); +} +EOCP + set try + if eval $compile; then + yyy=`./try$exe_ext` + case "$yyy" in + 123.456) + sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"'; + sPRIFldbl='"LF"'; sPRIGldbl='"LG"'; sPRIEldbl='"LE"'; + echo "We will use %Lf." + ;; + esac + fi +fi + +if $test X"$sPRIfldbl" = X; then + $cat >try.c <<'EOCP' +#include +#include +int main() { + long double d = 123.456; + printf("%.3lf\n", d); +} +EOCP + set try + if eval $compile; then + yyy=`./try$exe_ext` + case "$yyy" in + 123.456) + sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"'; + sPRIFldbl='"lF"'; sPRIGldbl='"lG"'; sPRIEldbl='"lE"'; + echo "We will use %lf." + ;; + esac + fi +fi + +if $test X"$sPRIfldbl" = X; then + echo "Cannot figure out how to print long doubles." >&4 fi +$rm -f try try.* + +fi # d_longdbl + +case "$sPRIfldbl" in +'') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef"; + d_PRIFldbl="$undef"; d_PRIGldbl="$undef"; d_PRIEldbl="$undef"; + ;; +*) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define"; + d_PRIFldbl="$define"; d_PRIGldbl="$define"; d_PRIEldbl="$define"; + ;; +esac + : Initialize h_fcntl h_fcntl=false @@ -6593,6 +7206,14 @@ eval $inlibc set alarm d_alarm eval $inlibc +: see if atolf exists +set atolf d_atolf +eval $inlibc + +: see if atoll exists +set atoll d_atoll +eval $inlibc + : Look for GNU-cc style attribute checking echo " " echo "Checking whether your compiler can handle __attribute__ ..." >&4 @@ -6755,52 +7376,6 @@ $rm -f set set.c set bzero d_bzero eval $inlibc -: check for lengths of integral types -echo " " -case "$intsize" in -'') - echo "Checking to see how big your integers are..." >&4 - $cat >intsize.c <<'EOCP' -#include -int main() -{ - printf("intsize=%d;\n", sizeof(int)); - printf("longsize=%d;\n", sizeof(long)); - printf("shortsize=%d;\n", sizeof(short)); - exit(0); -} -EOCP - set intsize - if eval $compile_ok && ./intsize > /dev/null; then - eval `./intsize` - echo "Your integers are $intsize bytes long." - echo "Your long integers are $longsize bytes long." - echo "Your short integers are $shortsize bytes long." - else - $cat >&4 <&4 - $cat >try.c < -#include -off64_t foo() { off64_t x; x = 7; return x; }' -EOCP - if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then - val="$define" - echo " Yup, it does." >&4 - else - val="$undef" - echo " Nope, it doesn't." >&4 - fi - $rm -f try.* - set d_off64_t - eval $setvar - - : check for offset_t - echo " " - echo $n "Checking to see if your system supports offset_t...$c" >&4 - $cat >try.c < -#include -offset_t foo() { offset_t x; x = 7; return x; }' -EOCP - if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then - val="$define" - echo " Yup, it does." >&4 - else - val="$undef" - echo " Nope, it doesn't." >&4 - fi - $rm -f try.* - set d_offset_t - eval $setvar - - : check for ino64_t - echo " " - echo $n "Checking to see if your system supports ino64_t...$c" >&4 - val="$undef" - case "$i_sysstat" in - "$define" ) - $cat >try.c < -#include -ino64_t foo() { ino64_t x; x = 7; return x; }' -EOCP - if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then - val="$define" - fi - $rm -f try.* - ;; - esac - if $test "X$val" = X"$define"; then - echo " Yup, it does." >&4 - else - echo " Nope, it doesn't." >&4 - fi - set d_ino64_t - eval $setvar - - : check for struct flock64 - echo " " - echo "Checking to see if your system supports struct flock64..." >&4 - if $h_fcntl; then - set d_flock64_s flock64 l_len define fcntl.h - eval $hasfield - else - val="$undef" - set d_flock64_s - eval $setvar - fi - case "$d_flock64_s" in - "$define") echo "Yup, it does." >&4 - ;; - *) echo "Nope, it doesn't." >&4 - ;; - esac - - : check for struct dirent64 - echo " " - echo "Checking to see if your system supports struct dirent64..." >&4 - set d_dirent64_s dirent64 d_off $i_dirent dirent.h - eval $hasfield - case "$d_dirent64_s" in - "$define") echo "Yup, it does." >&4 - ;; - *) echo "Nope, it doesn't." >&4 - ;; - esac - -else - val="$undef" - for xxx in d_fstat64 d_ftruncate64 d_lockf64 d_lseek64 d_lstat64 d_open64 d_opendir64 d_readdir64 d_seekdir64 d_stat64 d_telldir64 d_truncate64 d_off64_t d_offset_t d_ino64_t d_flock64_s d_dirent64_s - do - set $xxx - eval $setvar - done -fi - : see if dlerror exists xxx_runnm="$runnm" runnm=false @@ -7674,6 +8051,7 @@ EOM esac else echo "I can't compile and run the test program." >&4 + echo "I'm guessing that dlsym doesn't need a leading underscore." >&4 fi ;; esac @@ -8122,77 +8500,31 @@ else Hmm, your compiler has some difficulty with fd_set. Checking further... EOM set fd_set - 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 - echo "and you have the normal fd_set macros." >&4 - d_fd_macros="$define" - else - $cat <<'EOM' -but not the normal fd_set macros! Gross! More work for me... -EOM - d_fd_macros="$undef" - fi - else - echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4 - d_fd_set="$undef" - d_fds_bits="$undef" - d_fd_macros="$undef" - fi -fi -$rm -f fd_set* - -: see if fgetpos exists -set fgetpos d_fgetpos -eval $inlibc - - -if $test X"$use64bits" = X"$define"; then - : see if fgetpos64 exists - set fgetpos64 d_fgetpos64 - eval $inlibc - - : see if fopen64 exists - set freopen64 d_fopen64 - eval $inlibc - - : see if freopen64 exists - set freopen64 d_freopen64 - eval $inlibc - - : see if fseek64 exists - set fseek64 d_fseek64 - eval $inlibc - - : see if fseeko64 exists - set fseeko64 d_fseeko64 - eval $inlibc - - : see if fsetpos64 exists - set fsetpos64 d_fsetpos64 - eval $inlibc - - : see if ftell64 exists - set ftell64 d_ftell64 - eval $inlibc - - : see if ftello64 exists - set ftello64 d_ftello64 - eval $inlibc - - : see if tmpfile64 exists - set tmpfile64 d_tmpfile64 - eval $inlibc -else - val="$undef" - for xxx in d_fgetpos64 d_fopen64 d_freopen64 d_fseek64 d_fseeko64 d_fsetpos64 d_ftell64 d_ftello64 d_tmpfile64 - do - set $xxx - eval $setvar - done + 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 + echo "and you have the normal fd_set macros." >&4 + d_fd_macros="$define" + else + $cat <<'EOM' +but not the normal fd_set macros! Gross! More work for me... +EOM + d_fd_macros="$undef" + fi + else + echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4 + d_fd_set="$undef" + d_fds_bits="$undef" + d_fd_macros="$undef" + fi fi +$rm -f fd_set* + +: see if fgetpos exists +set fgetpos d_fgetpos +eval $inlibc : see if flock exists set flock d_flock @@ -8210,6 +8542,48 @@ eval $inlibc set fpathconf d_fpathconf eval $inlibc + +: see if llseek exists +set llseek d_llseek +eval $inlibc + +: check for off64_t +echo " " +echo $n "Checking to see if your system supports off64_t...$c" >&4 +$cat >try.c < +#include +off64_t foo() { off64_t x; x = 7; return x; }' +EOCP +if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then + val="$define" + echo " Yup, it does." >&4 +else + val="$undef" + echo " Nope, it doesn't." >&4 +fi +$rm -f try.* +set d_off64_t +eval $setvar + +: check for fpos64_t +echo " " +echo $n "Checking to see if your system supports fpos64_t...$c" >&4 +$cat >try.c < +fpos64_t foo() { fpos64_t x; x = 7; return x; }' +EOCP +if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then + val="$define" + echo " Yup, it does." >&4 +else + val="$undef" + echo " Nope, it doesn't." >&4 +fi +$rm -f try.* +set d_fpos64_t +eval $setvar + : see if fseeko exists set fseeko d_fseeko eval $inlibc @@ -8605,57 +8979,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 -case "$use64bits" in -"$define" ) - echo " " - echo $n "Checking to see if your system supports int64_t...$c" >&4 - $cat >try.c < -#$i_inttypes I_INTTYPES -#ifdef I_INTTYPES -#include -#endif -int64_t foo() { int64_t x; x = 7; return x; } -EOCP - if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then - val="$define" - echo " Yup, it does." >&4 - else - val="$undef" - echo " Nope, it doesn't." >&4 - fi - $rm -f try.* - ;; -*) val="$undef" - ;; -esac -set d_int64t -eval $setvar - - : Look for isascii echo " " $cat >isascii.c <<'EOCP' @@ -8717,6 +9040,33 @@ fi set d_lchown eval $setvar +: See if number of significant digits in a double precision number is known +echo " " +$cat >ldbl_dig.c < +#endif +#ifdef I_FLOAT +#include +#endif +#ifdef LDBL_DIG +printf("Contains LDBL_DIG"); +#endif +EOM +$cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null +if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then + echo "LDBL_DIG found." >&4 + val="$define" +else + echo "LDBL_DIG NOT found." >&4 + val="$undef" +fi +$rm -f ldbl_dig.? +set d_ldbl_dig +eval $setvar + : see if link exists set link d_link eval $inlibc @@ -8729,125 +9079,6 @@ eval $inlibc set lockf d_lockf eval $inlibc -: check for length of double -echo " " -case "$doublesize" in -'') - $echo $n "Checking to see how big your double precision numbers are...$c" >&4 - $cat >try.c <<'EOCP' -#include -int main() -{ - printf("%d\n", sizeof(double)); -} -EOCP - set try - if eval $compile_ok; then - doublesize=`./try` - $echo " $doublesize bytes." >&4 - else - dflt='8' - echo "(I can't seem to compile the test program. Guessing...)" - rp="What is the size of a double precision number (in bytes)?" - . ./myread - doublesize="$ans" - fi - ;; -esac -$rm -f try.c try - -: check for long doubles -echo " " -echo $n "Checking to see if your system supports long doubles...$c" >&4 -echo 'long double foo() { long double x; x = 7.0; return x; }' > try.c -if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then - val="$define" - echo " Yup, it does." >&4 -else - val="$undef" - echo " Nope, it doesn't." >&4 -fi -$rm try.* -set d_longdbl -eval $setvar - -: check for length of long double -case "${d_longdbl}${longdblsize}" in -$define) - echo " " - $echo $n "Checking to see how big your long doubles are...$c" >&4 - $cat >try.c <<'EOCP' -#include -int main() -{ - printf("%d\n", sizeof(long double)); -} -EOCP - set try - if eval $compile; then - longdblsize=`./try` - $echo " $longdblsize bytes." >&4 - else - dflt='8' - echo " " - echo "(I can't seem to compile the test program. Guessing...)" >&4 - rp="What is the size of a long double (in bytes)?" - . ./myread - longdblsize="$ans" - fi - if $test "X$doublesize" = "X$longdblsize"; then - echo "(That isn't any different from an ordinary double.)" - fi - ;; -esac -$rm -f try.c try - -: check for long long -echo " " -echo $n "Checking to see if your system supports long long...$c" >&4 -echo 'long long foo() { long long x; x = 7; return x; }' > try.c -if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then - val="$define" - echo " Yup, it does." >&4 -else - val="$undef" - echo " Nope, it doesn't." >&4 -fi -$rm try.* -set d_longlong -eval $setvar - -: check for length of long long -case "${d_longlong}${longlongsize}" in -$define) - echo " " - $echo $n "Checking to see how big your long longs are...$c" >&4 - $cat >try.c <<'EOCP' -#include -int main() -{ - printf("%d\n", sizeof(long long)); -} -EOCP - set try - if eval $compile_ok; then - longlongsize=`./try` - $echo " $longlongsize bytes." >&4 - else - dflt='8' - echo " " - echo "(I can't seem to compile the test program. Guessing...)" - rp="What is the size of a long long (in bytes)?" - . ./myread - longlongsize="$ans" - fi - if $test "X$longsize" = "X$longlongsize"; then - echo "(That isn't any different from an ordinary long.)" - fi - ;; -esac -$rm -f try.c try - : see if lstat exists set lstat d_lstat eval $inlibc @@ -8996,12 +9227,9 @@ set nice d_nice eval $inlibc : see if POSIX threads are available -if test "X$usethreads" = "X$define"; then - set pthread.h i_pthread - eval $inhdr -else - i_pthread="$undef" -fi +set pthread.h i_pthread +eval $inhdr + @@ -9957,6 +10185,8 @@ if set sigaction val -f d_sigaction; eval $csym; $val; then int main() { struct sigaction act, oact; + act.sa_flags = 0; + oact.sa_handler = 0; } EOP set try @@ -10018,6 +10248,10 @@ set d_sigsetjmp eval $setvar $rm -f try.c try +: see if sys/stat.h is available +set sys/stat.h i_sysstat +eval $inhdr + : see if stat knows about block sizes echo " " set d_statblks stat st_blocks $i_sysstat sys/stat.h @@ -10264,6 +10498,10 @@ eval $inlibc set strtoul d_strtoul eval $inlibc +: see if strtoull exists +set strtoull d_strtoull +eval $inlibc + : see if strxfrm exists set strxfrm d_strxfrm eval $inlibc @@ -10634,7 +10872,7 @@ You seem to be either cross-compiling or doing a multiarchitecture build, skipping the byteorder check. EOM - byteorder='' + byteorder='0xffff' ;; *) case "$byteorder" in @@ -10643,8 +10881,9 @@ EOM In the following, larger digits indicate more significance. A big-endian machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other -machines may have weird orders like 3412. A Cray will report 87654321. If -the test program works the default is probably right. +machines may have weird orders like 3412. A Cray will report 87654321, +an Alpha will report 12345678. If the test program works the default is +probably right. I'm now running the test program... EOM $cat >try.c <<'EOCP' @@ -13051,9 +13290,8 @@ case "$d_portable" in echo " " echo "Stripping down executable paths..." >&4 for file in $loclist $trylist; do - if test X$file != Xln -a X$file != Xar -o X$osname != Xos2; then - eval $file="\$file" - fi + eval temp=\$$file + eval $file=`basename $temp` done ;; esac @@ -13143,10 +13381,24 @@ crosscompile='$crosscompile' cryptlib='$cryptlib' csh='$csh' d_Gconvert='$d_Gconvert' +d_PRIEldbl='$d_PRIEldbl' +d_PRIFldbl='$d_PRIFldbl' +d_PRIGldbl='$d_PRIGldbl' +d_PRIX64='$d_PRIX64' +d_PRId64='$d_PRId64' +d_PRIeldbl='$d_PRIeldbl' +d_PRIfldbl='$d_PRIfldbl' +d_PRIgldbl='$d_PRIgldbl' +d_PRIi64='$d_PRIi64' +d_PRIo64='$d_PRIo64' +d_PRIu64='$d_PRIu64' +d_PRIx64='$d_PRIx64' d_access='$d_access' d_accessx='$d_accessx' d_alarm='$d_alarm' d_archlib='$d_archlib' +d_atolf='$d_atolf' +d_atoll='$d_atoll' d_attribut='$d_attribut' d_bcmp='$d_bcmp' d_bcopy='$d_bcopy' @@ -13168,11 +13420,7 @@ d_crypt='$d_crypt' d_csh='$d_csh' d_cuserid='$d_cuserid' d_dbl_dig='$d_dbl_dig' -d_dbmclose64='$d_dbmclose64' -d_dbminit64='$d_dbminit64' -d_delete64='$d_delete64' d_difftime='$d_difftime' -d_dirent64_s='$d_dirent64_s' d_dirnamlen='$d_dirnamlen' d_dlerror='$d_dlerror' d_dlopen='$d_dlopen' @@ -13196,30 +13444,18 @@ d_fcntl='$d_fcntl' d_fd_macros='$d_fd_macros' d_fd_set='$d_fd_set' d_fds_bits='$d_fds_bits' -d_fetch64='$d_fetch64' -d_fgetpos64='$d_fgetpos64' d_fgetpos='$d_fgetpos' -d_firstkey64='$d_firstkey64' d_flexfnam='$d_flexfnam' -d_flock64_s='$d_flock64_s' d_flock='$d_flock' -d_fopen64='$d_fopen64' d_fork='$d_fork' d_fpathconf='$d_fpathconf' -d_freopen64='$d_freopen64' -d_fseek64='$d_fseek64' -d_fseeko64='$d_fseeko64' +d_fpos64_t='$d_fpos64_t' d_fseeko='$d_fseeko' -d_fsetpos64='$d_fsetpos64' d_fsetpos='$d_fsetpos' -d_fstat64='$d_fstat64' d_fstatfs='$d_fstatfs' d_fstatvfs='$d_fstatvfs' -d_ftell64='$d_ftell64' -d_ftello64='$d_ftello64' d_ftello='$d_ftello' d_ftime='$d_ftime' -d_ftruncate64='$d_ftruncate64' d_getgrent='$d_getgrent' d_getgrps='$d_getgrps' d_gethbyaddr='$d_gethbyaddr' @@ -13256,21 +13492,18 @@ d_hasmntopt='$d_hasmntopt' d_htonl='$d_htonl' d_index='$d_index' d_inetaton='$d_inetaton' -d_ino64_t='$d_ino64_t' d_int64t='$d_int64t' d_iovec_s='$d_iovec_s' d_isascii='$d_isascii' d_killpg='$d_killpg' d_lchown='$d_lchown' +d_ldbl_dig='$d_ldbl_dig' d_link='$d_link' d_llseek='$d_llseek' d_locconv='$d_locconv' -d_lockf64='$d_lockf64' d_lockf='$d_lockf' d_longdbl='$d_longdbl' d_longlong='$d_longlong' -d_lseek64='$d_lseek64' -d_lstat64='$d_lstat64' d_lstat='$d_lstat' d_madvise='$d_madvise' d_mblen='$d_mblen' @@ -13300,16 +13533,12 @@ d_msgsnd='$d_msgsnd' d_msync='$d_msync' d_munmap='$d_munmap' d_mymalloc='$d_mymalloc' -d_nextkey64='$d_nextkey64' d_nice='$d_nice' d_off64_t='$d_off64_t' -d_offset_t='$d_offset_t' d_old_pthread_create_joinable='$d_old_pthread_create_joinable' d_oldpthreads='$d_oldpthreads' d_oldsock='$d_oldsock' d_open3='$d_open3' -d_open64='$d_open64' -d_opendir64='$d_opendir64' d_pathconf='$d_pathconf' d_pause='$d_pause' d_phostname='$d_phostname' @@ -13325,7 +13554,6 @@ d_pwexpire='$d_pwexpire' d_pwgecos='$d_pwgecos' d_pwpasswd='$d_pwpasswd' d_pwquota='$d_pwquota' -d_readdir64='$d_readdir64' d_readdir='$d_readdir' d_readlink='$d_readlink' d_readv='$d_readv' @@ -13338,7 +13566,6 @@ d_safemcpy='$d_safemcpy' d_sanemcmp='$d_sanemcmp' d_sched_yield='$d_sched_yield' d_scm_rights='$d_scm_rights' -d_seekdir64='$d_seekdir64' d_seekdir='$d_seekdir' d_select='$d_select' d_sem='$d_sem' @@ -13383,7 +13610,6 @@ d_sigaction='$d_sigaction' d_sigsetjmp='$d_sigsetjmp' d_socket='$d_socket' d_sockpair='$d_sockpair' -d_stat64='$d_stat64' d_statblks='$d_statblks' d_statfs='$d_statfs' d_statfsflags='$d_statfsflags' @@ -13393,7 +13619,6 @@ d_stdio_ptr_lval='$d_stdio_ptr_lval' d_stdio_stream_array='$d_stdio_stream_array' d_stdiobase='$d_stdiobase' d_stdstdio='$d_stdstdio' -d_store64='$d_store64' d_strchr='$d_strchr' d_strcoll='$d_strcoll' d_strctcpy='$d_strctcpy' @@ -13402,6 +13627,7 @@ d_strerror='$d_strerror' d_strtod='$d_strtod' d_strtol='$d_strtol' d_strtoul='$d_strtoul' +d_strtoull='$d_strtoull' d_strxfrm='$d_strxfrm' d_suidsafe='$d_suidsafe' d_symlink='$d_symlink' @@ -13412,13 +13638,10 @@ d_syserrlst='$d_syserrlst' d_system='$d_system' d_tcgetpgrp='$d_tcgetpgrp' d_tcsetpgrp='$d_tcsetpgrp' -d_telldir64='$d_telldir64' d_telldir='$d_telldir' d_telldirproto='$d_telldirproto' d_time='$d_time' d_times='$d_times' -d_tmpfile64='$d_tmpfile64' -d_truncate64='$d_truncate64' d_truncate='$d_truncate' d_tzname='$d_tzname' d_umask='$d_umask' @@ -13664,6 +13887,18 @@ rd_nodata='$rd_nodata' rm='$rm' rmail='$rmail' runnm='$runnm' +sPRIEldbl='$sPRIEldbl' +sPRIFldbl='$sPRIFldbl' +sPRIGldbl='$sPRIGldbl' +sPRIX64='$sPRIX64' +sPRId64='$sPRId64' +sPRIeldbl='$sPRIeldbl' +sPRIfldbl='$sPRIfldbl' +sPRIgldbl='$sPRIgldbl' +sPRIi64='$sPRIi64' +sPRIo64='$sPRIo64' +sPRIu64='$sPRIu64' +sPRIx64='$sPRIx64' sched_yield='$sched_yield' scriptdir='$scriptdir' scriptdirexp='$scriptdirexp' @@ -13734,6 +13969,7 @@ uname='$uname' uniq='$uniq' use64bits='$use64bits' usedl='$usedl' +uselongdouble='$uselongdouble' usemultiplicity='$usemultiplicity' usemymalloc='$usemymalloc' usenm='$usenm'