X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/dcb594bcd7c2ac9f0d01eff34aab9c6bb8e972c1..efd26800e76b6f876fd6abe3a3f7e3e4128150a9:/Configure diff --git a/Configure b/Configure index c1c6027..c9efdf4 100755 --- a/Configure +++ b/Configure @@ -26,7 +26,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Wed Nov 15 22:26:01 CET 2006 [metaconfig 3.0 PL70] +# Generated on Tue Jan 1 21:34:35 CET 2008 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <trygcc $startsh EOS @@ -2488,15 +2518,36 @@ EOM case "$cc" in *gcc*) trygcc=no ;; esac - case "`$cc -v -c try.c 2>&1`" in - *gcc*) trygcc=no ;; - esac + # Skip this test because it gives a false match on output like: + # ./trygcc: line 23: cc: command not found + # case "`$cc -v -c try.c 2>&1`" in + # *gcc*) trygcc=no ;; + # esac if $test X"$trygcc" = Xyes; then if gcc -o try -c try.c; then echo " " echo "You seem to have a working gcc, though." >&4 - rp="Would you like to use it?" - dflt=y + # Switching compilers may undo the work of hints files. + # The most common problem is -D_REENTRANT for threads. + # This heuristic catches that case, but gets false positives + # if -Dusethreads was not actually specified. Better to + # bail out here with a useful message than fail + # mysteriously later. Should we perhaps just try to + # re-invoke Configure -Dcc=gcc config_args ? + if $test -f usethreads.cbu; then + $cat >&4 <&4 </dev/null` $test -z "$myuname" && myuname=`hostname 2>/dev/null` # tr '[A-Z]' '[a-z]' would not work in EBCDIC # because the A-Z/a-z are not consecutive. -myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ +myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s,['/],,g" | \ ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '` newmyuname="$myuname" dflt=n @@ -4049,6 +4091,62 @@ EOM esac +: get the patchlevel +echo " " +echo "Getting the current patchlevel..." >&4 +if $test -r $rsrc/patchlevel.h;then + revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h` + patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` + subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` + api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h` + api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h` + api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` + perl_patchlevel=`egrep ',"(MAINT|SMOKE)[0-9][0-9]*"' $rsrc/patchlevel.h|tail -1|sed 's/[^0-9]//g'` +else + revision=0 + patchlevel=0 + subversion=0 + 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 "X$perl_patchlevel" = "X" || $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then + perl_patchlevel=`cat $rsrc/.patch` + fi +fi +: Define a handy string here to avoid duplication in myconfig.SH and configpm. +version_patchlevel_string="version $patchlevel subversion $subversion" +case "$perl_patchlevel" in +0|'') ;; +*) 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. + version=`echo $revision $patchlevel $subversion | \ + $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` + api_versionstring=`echo $api_revision $api_version $api_subversion | \ + $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` + ;; +*) + version=`echo $revision $patchlevel $subversion | \ + $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` + api_versionstring=`echo $api_revision $api_version $api_subversion | \ + $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` + ;; +esac +: Special case the 5.005_xx maintenance series, which used 5.005 +: without any subversion label as a subdirectory in $sitelib +if test "${api_revision}${api_version}${api_subversion}" = "550"; then + api_versionstring='5.005' +fi + case "$usethreads" in $define|true|[yY]*) dflt='y';; *) # Catch case where user specified ithreads or 5005threads but @@ -4085,8 +4183,9 @@ esac set usethreads eval $setvar -case "$usethreads" in -$define) +if $test $patchlevel -lt 9; then + case "$usethreads" in + $define) $cat <&4 <&4 <&4 </dev/null 2>&1 then # Interactive Systems (ISC) POSIX mode. @@ -4948,40 +5094,28 @@ default|recommended) case "$gccversion" in 1*) ;; 2.[0-8]*) ;; - ?*) echo " " - echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&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 + ?*) set strict-aliasing -fno-strict-aliasing + eval $checkccflag ;; esac # For gcc, adding -pipe speeds up compilations for some, but apparently # some assemblers can't read from stdin. (It also slows down compilations # in other cases, but those are apparently rarer these days.) AD 5/2004. case "$gccversion" in - ?*) echo " " - echo "Checking if your compiler accepts -pipe" 2>&1 - echo 'int main(void) { return 0; }' > gcctest.c - if $cc -pipe -o gcctest gcctest.c; then - echo "Yes, it does." 2>&1 - case "$ccflags" in - *-pipe*) - echo "Leaving current flags $ccflags alone." 2>&1 - ;; - *) dflt="$dflt -pipe" ;; - esac - else - echo "Nope, it doesn't, but that's ok." 2>&1 - fi + ?*) set pipe -pipe + eval $checkccflag + ;; + esac + + # on x86_64 (at least) we require an extra library (libssp) in the + # link command line. This library is not named, so I infer that it is + # an implementation detail that may change. Hence the safest approach + # is to add the flag to the flags passed to the compiler at link time, + # as that way the compiler can do the right implementation dependant + # thing. (NWC) + case "$gccversion" in + ?*) set stack-protector -fstack-protector 'ldflags="$ldflags -fstack-protector"' + eval $checkccflag ;; esac ;; @@ -5237,7 +5371,7 @@ y) ;; n) echo "OK, that should do.";; esac -$rm -f try try.* core +$rm_try gcctest.out : define a shorthand compile call compile=' @@ -5412,7 +5546,7 @@ EOM fi ;; esac -$rm -f try try.* +$rm_try : check for long long echo " " @@ -5426,7 +5560,7 @@ else val="$undef" echo "You do not have long long." fi -$rm try.* +$rm_try set d_longlong eval $setvar @@ -5457,10 +5591,10 @@ EOCP fi if $test "X$longsize" = "X$longlongsize"; then echo "(That isn't any different from an ordinary long.)" - fi + fi ;; esac -$rm -f try.* try +$rm_try : see if inttypes.h is available : we want a real compile instead of Inhdr because some systems @@ -5480,7 +5614,7 @@ else echo " NOT found." >&4 val="$undef" fi -$rm -f try.c try +$rm_try set i_inttypes eval $setvar @@ -5503,7 +5637,7 @@ else val="$undef" echo "You do not have int64_t." fi -$rm -f try try.* +$rm_try set d_int64_t eval $setvar @@ -5784,7 +5918,7 @@ EOCP fi ;; esac -$rm -f try.c try +$rm_try : check for long doubles echo " " @@ -5798,7 +5932,7 @@ else val="$undef" echo "You do not have long double." fi -$rm try.* +$rm_try set d_longdbl eval $setvar @@ -5831,10 +5965,10 @@ EOCP echo "That isn't any different from an ordinary double." echo "I'll keep your setting anyway, but you may see some" echo "harmless compilation warnings." - fi + fi ;; esac -$rm -f try.* try +$rm_try : determine the architecture name echo " " @@ -5982,62 +6116,6 @@ prefixit='case "$3" in esac;; esac' -: get the patchlevel -echo " " -echo "Getting the current patchlevel..." >&4 -if $test -r $rsrc/patchlevel.h;then - revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h` - patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` - subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` - api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h` - api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h` - api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` - perl_patchlevel=`egrep 'define PERL_PATCHNUM [0-9][0-9]|,"MAINT[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'` -else - revision=0 - patchlevel=0 - subversion=0 - 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 "X$perl_patchlevel" = "X" || $test "`cat $rsrc/.patch`" -gt "$perl_patchlevel" ; then - perl_patchlevel=`cat $rsrc/.patch` - fi -fi -: Define a handy string here to avoid duplication in myconfig.SH and configpm. -version_patchlevel_string="version $patchlevel subversion $subversion" -case "$perl_patchlevel" in -0|'') ;; -*) 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. - version=`echo $revision $patchlevel $subversion | \ - $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` - api_versionstring=`echo $api_revision $api_version $api_subversion | \ - $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` - ;; -*) - version=`echo $revision $patchlevel $subversion | \ - $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` - api_versionstring=`echo $api_revision $api_version $api_subversion | \ - $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` - ;; -esac -: Special case the 5.005_xx maintenance series, which used 5.005 -: without any subversion label as a subdirectory in $sitelib -if test "${api_revision}${api_version}${api_subversion}" = "550"; then - api_versionstring='5.005' -fi - : determine installation style : For now, try to deduce it from prefix unless it is already set. : Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7. @@ -6484,7 +6562,7 @@ else echo " NOT found." >&4 val="$undef" fi -$rm -f try.c try +$rm_try set i_malloc eval $setvar @@ -6582,7 +6660,7 @@ EOM voidflags="$ans" ;; esac -$rm -f try.* .out +$rm_try : check for length of pointer echo " " @@ -6619,7 +6697,7 @@ EOCP fi ;; esac -$rm -f try.c try +$rm_try case "$use64bitall" in "$define"|true|[yY]*) case "$ptrsize" in @@ -7151,7 +7229,7 @@ else gnulibc_version='' echo "You are not using the GNU C Library" fi -$rm -f try try.* glibc.ver +$rm_try glibc.ver set d_gnulibc eval $setvar @@ -7536,6 +7614,32 @@ $rm -f libnames libpath set dld.h i_dld eval $inhdr + +echo " " +echo "Checking for C++..." >&4 +$cat >try.c <<'EOCP' +#include +int main(void) +{ +#ifdef __cplusplus + return 0; +#else + return 1; +#endif +} +EOCP +set try +if eval $compile_ok && $run ./try; then + val="$define" + echo "You are using a C++ compiler." +else + val="$undef" + echo "You are not using a C++ compiler." +fi +$rm_try cplusplus$$ +set d_cplusplus +eval $setvar + : is a C symbol defined? csym='tlook=$1; case "$3" in @@ -7551,19 +7655,22 @@ esac; case "$tx" in yes) tval=false; + case "$d_cplusplus" in + $define) extern_C=\"C\";; + esac; if $test "$runnm" = true; then if $contains $tlook $tf >/dev/null 2>&1; then tval=true; elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then - echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c; + echo "extern $extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c; $cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true; $test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; }; - $rm -f try$_exe try.c core core.* try.core; + $rm_try; fi; else - echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c; + echo "extern $extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c; $cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true; - $rm -f try$_exe try.c; + $rm_try; fi; ;; *) @@ -7602,33 +7709,6 @@ yes) esac;; esac' - -echo " " -echo "Checking for C++..." >&4 -cat >try.c <<'EOCP' -#include -int main(void) -{ -#ifdef __cplusplus - printf("define\n"); -#else - printf("undef\n"); -#endif - return 0; -} -EOCP -set try -if eval $compile_ok && $run ./try >cplusplus$$; then - val=`$cat cplusplus$$` - echo "You are using a C++ compiler." -else - val="$undef" - echo "You are not using a C++ compiler." -fi -$rm -f try try.* cplusplus$$ -set d_cplusplus -eval $setvar - : see if dlopen exists xxx_runnm="$runnm" xxx_ccflags="$ccflags" @@ -7662,7 +7742,7 @@ $undef|n|false) dflt='n' usedl="$undef" ;; -*) +*) dflt='n' case "$d_dlopen" in $define) dflt='y' ;; @@ -7725,7 +7805,7 @@ EOM ;; *) case "$osname" in darwin) dflt='none' ;; - svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;; + linux*|svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;; *) dflt='-fpic' ;; esac ;; esac ;; @@ -7760,7 +7840,7 @@ EOM int main() { char b[4]; int i = open("a.out",O_RDONLY); - if(i == -1) + if(i == -1) exit(1); /* fail */ if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F') exit(0); /* succeed (yes, it's ELF) */ @@ -7777,7 +7857,7 @@ EOM echo "I'll use ld to build dynamic libraries." dflt='ld' fi - rm -f try.c a.out + $rm_try ;; *) dflt="$ld" ;; @@ -7803,8 +7883,8 @@ EOM case "$gccversion" in '') dflt="$dflt +vnocompatwarnings" ;; esac - ;; - linux|irix*|gnu*) dflt='-shared' ;; + ;; + linux|irix*|gnu*) dflt="-shared $optimize" ;; next) dflt='none' ;; solaris) dflt='-G' ;; sunos) dflt='-assert nodefinitions' ;; @@ -8932,7 +9012,7 @@ $cat >try.c <&4 + $echo $n "Rechecking the size of $zzz...$c" >&4 $cat > try.c < #include @@ -9100,7 +9180,7 @@ EOCP . ./myread fpossize="$ans" fi - $rm -f try.c try + $rm_try fi ;; esac @@ -9360,17 +9440,17 @@ else sSCNfldbl=$sPRIfldbl # expect consistency fi -$rm -f try try.* +$rm_try fi # d_longdbl case "$sPRIfldbl" in -'') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef"; - d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef"; +'') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef"; + d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef"; d_SCNfldbl="$undef"; ;; -*) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define"; - d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define"; +*) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define"; + d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define"; d_SCNfldbl="$define"; ;; esac @@ -9446,8 +9526,8 @@ char *got; } int main() -{ - char buf[64]; +{ + char buf[64]; buf[63] = '\0'; /* This must be 1st test on (which?) platform */ @@ -9455,13 +9535,13 @@ int main() Gconvert((DOUBLETYPE)0.1, 8, 0, buf); checkit("0.1", buf); - Gconvert((DOUBLETYPE)0.01, 8, 0, buf); + Gconvert((DOUBLETYPE)0.01, 8, 0, buf); checkit("0.01", buf); - Gconvert((DOUBLETYPE)0.001, 8, 0, buf); + Gconvert((DOUBLETYPE)0.001, 8, 0, buf); checkit("0.001", buf); - Gconvert((DOUBLETYPE)0.0001, 8, 0, buf); + Gconvert((DOUBLETYPE)0.0001, 8, 0, buf); checkit("0.0001", buf); Gconvert((DOUBLETYPE)0.00009, 8, 0, buf); @@ -9470,42 +9550,42 @@ int main() else checkit("9e-05", buf); - Gconvert((DOUBLETYPE)1.0, 8, 0, buf); + Gconvert((DOUBLETYPE)1.0, 8, 0, buf); checkit("1", buf); - Gconvert((DOUBLETYPE)1.1, 8, 0, buf); + Gconvert((DOUBLETYPE)1.1, 8, 0, buf); checkit("1.1", buf); - Gconvert((DOUBLETYPE)1.01, 8, 0, buf); + Gconvert((DOUBLETYPE)1.01, 8, 0, buf); checkit("1.01", buf); - Gconvert((DOUBLETYPE)1.001, 8, 0, buf); + Gconvert((DOUBLETYPE)1.001, 8, 0, buf); checkit("1.001", buf); - Gconvert((DOUBLETYPE)1.0001, 8, 0, buf); + Gconvert((DOUBLETYPE)1.0001, 8, 0, buf); checkit("1.0001", buf); - Gconvert((DOUBLETYPE)1.00001, 8, 0, buf); + Gconvert((DOUBLETYPE)1.00001, 8, 0, buf); checkit("1.00001", buf); - Gconvert((DOUBLETYPE)1.000001, 8, 0, buf); + Gconvert((DOUBLETYPE)1.000001, 8, 0, buf); checkit("1.000001", buf); - Gconvert((DOUBLETYPE)0.0, 8, 0, buf); + Gconvert((DOUBLETYPE)0.0, 8, 0, buf); checkit("0", buf); - Gconvert((DOUBLETYPE)-1.0, 8, 0, buf); + Gconvert((DOUBLETYPE)-1.0, 8, 0, buf); checkit("-1", buf); /* Some Linux gcvt's give 1.e+5 here. */ - Gconvert((DOUBLETYPE)100000.0, 8, 0, buf); + Gconvert((DOUBLETYPE)100000.0, 8, 0, buf); checkit("100000", buf); - + /* Some Linux gcvt's give -1.e+5 here. */ - Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf); + Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf); checkit("-100000", buf); - Gconvert((DOUBLETYPE)123.456, 8, 0, buf); + Gconvert((DOUBLETYPE)123.456, 8, 0, buf); checkit("123.456", buf); /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */ @@ -9530,14 +9610,14 @@ for xxx_convert in $gconvert_preference; do case $xxx_convert in gcvt|gconvert|sprintf) xxx_list="$xxx_list $xxx_convert" ;; *) echo "Discarding unrecognized gconvert_preference $xxx_convert" >&4 ;; - esac + esac done : then add any others for xxx_convert in gconvert gcvt sprintf; do case "$xxx_list" in *$xxx_convert*) ;; *) xxx_list="$xxx_list $xxx_convert" ;; - esac + esac done case "$d_longdbl$uselongdouble" in @@ -9572,7 +9652,7 @@ esac for xxx_convert in $xxx_list; do echo "Trying $xxx_convert..." - $rm -f try try$_o + $rm -f try try$_o core set try -DTRY_$xxx_convert if eval $compile; then echo "$xxx_convert() found." >&4 @@ -9605,10 +9685,11 @@ qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;; d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;; *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;; esac - ;; + ;; esac fi +$rm_try : see if _fwalk exists set fwalk d__fwalk @@ -9690,7 +9771,7 @@ optimize="$optimize" ccflags="$ccflags" prototype="$prototype" define="$define" -rm=$rm +rm_try="$rm_try" usethreads=$usethreads i_pthread=$i_pthread pthread_h_first=$pthread_h_first @@ -9698,7 +9779,7 @@ EOSH $cat >> protochk <<'EOSH' -$rm -f try.c +$rm_try foo="$1" shift while test $# -ge 2; do @@ -9728,7 +9809,7 @@ echo "$foo" >> try.c echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c $cc $optimize $ccflags -c try.c > /dev/null 2>&1 status=$? -$rm -f try.[co] +$rm_try exit $status EOSH chmod +x protochk @@ -9751,7 +9832,7 @@ else fi; set $varname; eval $setvar; -$rm -f try.c tryout.c' +$rm_try tryout.c' : see if sys/types.h has to be included set sys/types.h i_systypes @@ -9777,7 +9858,7 @@ else fi; set $varname; eval $setvar; -$rm -f try.c try.o' +$rm_try' : see if we should include time.h, sys/time.h, or both echo " " @@ -9864,11 +9945,11 @@ EOCP echo "We'll include ." >&4;; *) i_systime="$undef";; esac - $rm -f try.c try + $rm_try fi : see if struct tm knows about tm_zone case "$i_systime$i_time" in -*$define*) +*$define*) echo " " echo "Checking to see if your struct tm has tm_zone field..." >&4 set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h @@ -9885,7 +9966,7 @@ case "$d_tm_tm_zone" in esac : see if struct tm knows about tm_gmtoff case "$i_systime$i_time" in -*$define*) +*$define*) echo " " echo "Checking to see if your struct tm has tm_gmtoff field..." >&4 set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h @@ -10274,7 +10355,7 @@ EOP esac set d_bsdgetpgrp eval $setvar -$rm -f try try.* +$rm_try : see if setpgrp exists set setpgrp d_setpgrp @@ -10340,7 +10421,8 @@ EOP esac set d_bsdsetpgrp eval $setvar -$rm -f try try.* +$rm_try + : Look for GCC-style __builtin_choose_expr case "$d_builtin_choose_expr" in '') @@ -10377,7 +10459,7 @@ esac set d_builtin_choose_expr eval $setvar -$rm -f try.* try core core.try.* +$rm_try : Look for GCC-style __builtin_expect case "$d_builtin_expect" in @@ -10404,7 +10486,7 @@ esac set d_builtin_expect eval $setvar -$rm -f try.* try core core.try.* +$rm_try : see if bzero exists set bzero d_bzero @@ -10542,7 +10624,7 @@ EOCP echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4 d_c99_variadic_macros="$undef" fi - $rm -f try.* try core core.try.* + $rm_try ;; *) echo "You don't have and , so not checking for C99 variadic macros." >&4 @@ -10619,7 +10701,7 @@ int main() char str[16]; signal(SIGFPE, blech); - /* Don't let compiler optimize the test away. Store the number + /* Don't let compiler optimize the test away. Store the number in a writable string for gcc to pass to sscanf under HP/UX. */ sprintf(str, "2147483647"); @@ -10655,7 +10737,7 @@ case "$yyy" in esac set d_casti32 eval $setvar -$rm -f try try.* +$rm_try : check for ability to cast negative floats to unsigned echo " " @@ -10681,12 +10763,12 @@ int main() unsigned short ashort; int result = 0; char str[16]; - + /* Frustrate gcc-2.7.2's optimizer which failed this test with a direct f = -123. assignment. gcc-2.8.0 reportedly optimized the whole file away */ - /* Store the number in a writable string for gcc to pass to + /* Store the number in a writable string for gcc to pass to sscanf under HP/UX. */ sprintf(str, "-123"); @@ -10755,7 +10837,7 @@ case "$castflags" in esac set d_castneg eval $setvar -$rm -f try.* +$rm_try : see if vprintf exists echo " " @@ -10763,38 +10845,75 @@ if set vprintf val -f d_vprintf; eval $csym; $val; then echo 'vprintf() found.' >&4 val="$define" $cat >try.c < +#$i_stdarg I_STDARG /* Only one of these can be defined by i_varhrd */ +#$i_varargs I_VARARGS + #$i_stdlib I_STDLIB +#$i_unistd I_UNISTD + +#ifdef I_STDARG +# include +#else /* I_VARARGS */ +# include +#endif + +#ifdef I_UNISTD +# include +#endif + #ifdef I_STDLIB -#include +# include #endif -int main() { xxx("foo"); } +#include /* vsprintf prototype */ + +#ifdef I_STDARG +void xxx(int n, ...) +{ + va_list args; + char buf[10]; + va_start(args, n); + exit((unsigned long)vsprintf(buf,"%s",args) > 10L); +} +int main() { xxx(1, "foo"); } + +#else /* I_VARARGS */ xxx(va_alist) va_dcl { - va_list args; - char buf[10]; - - va_start(args); - exit((unsigned long)vsprintf(buf,"%s",args) > 10L); + va_list args; + char buf[10]; + va_start(args); + exit((unsigned long)vsprintf(buf,"%s",args) > 10L); } +int main() { xxx("foo"); } + +#endif + EOF set try - if eval $compile && $run ./try; then - echo "Your vsprintf() returns (int)." >&4 - val2="$undef" + if eval $compile_ok; then + if $run ./try; then + echo "Your vsprintf() returns (int)." >&4 + val2="$undef" + else + echo "Your vsprintf() returns (char*)." >&4 + val2="$define" + fi else - echo "Your vsprintf() returns (char*)." >&4 - val2="$define" + echo 'I am unable to compile the vsprintf() test program.' >&4 + # We shouldn't get here. If we do, assume the standard signature, + # not the old BSD one. + echo 'Guessing that vsprintf() returns (int).' >&4 + val2="$undef" fi else echo 'vprintf() NOT found.' >&4 - val="$undef" - val2="$undef" + val="$undef" + val2="$undef" fi -$rm -f try try.* +$rm_try set d_vprintf eval $setvar val=$val2 @@ -10837,7 +10956,7 @@ else fi; set $varname; eval $setvar; -$rm -f try.c try.o' +$rm_try' socketlib='' sockethdr='' @@ -10878,7 +10997,7 @@ else sockethdr="-I/usr/netinclude" ;; esac - echo "Found Berkeley sockets interface in lib$net." >&4 + echo "Found Berkeley sockets interface in lib$net." >&4 if $contains setsockopt libc.list >/dev/null 2>&1; then d_oldsock="$undef" else @@ -10919,7 +11038,7 @@ EOF val="$define" fi set d_${enum}; eval $setvar - $rm -f try.c try + $rm_try done : see if this is a sys/uio.h system @@ -11275,7 +11394,7 @@ case "$guess1" in 'struct dirent') guess2='struct direct' ;; *) guess2='struct dirent' ;; esac - + if $contains "$guess1" try.c >/dev/null 2>&1; then direntrytype="$guess1" echo "Your directory entries are $direntrytype." >&4 @@ -11289,8 +11408,7 @@ else . ./myread direntrytype="$ans" fi -$rm -f try.c - +$rm_try : see if the directory entry stores field length echo " " @@ -11304,7 +11422,7 @@ else fi set d_dirnamlen eval $setvar -$rm -f try.c +$rm_try : Look for DIR.dd_fd case "$i_dirent" in @@ -11340,7 +11458,7 @@ EOCP esac set d_dir_dd_fd eval $setvar -$rm -f try try.* +$rm_try : see if this is an sysdir system set sys/dir.h i_sysdir @@ -12042,7 +12160,7 @@ else fi set d_open3 eval $setvar -$rm -f try try.* +$rm_try : see which of string.h or strings.h is needed echo " " @@ -12119,6 +12237,14 @@ esac set i_fcntl eval $setvar +: see if fork exists +set fork d_fork +eval $inlibc + +: see if pipe exists +set pipe d_pipe +eval $inlibc + : check for non-blocking I/O stuff case "$h_sysfile" in true) echo "#include " > head.c;; @@ -12173,18 +12299,20 @@ EOCP ;; *) echo "Using $hint value $o_nonblock.";; esac -$rm -f try try.* .out core +$rm_try echo " " echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4 case "$eagain" in '') + case "$d_fork:$d_pipe" in + define:define) $cat head.c > try.c $cat >>try.c < #include #include -#include +#include #$i_stdlib I_STDLIB #ifdef I_STDLIB #include @@ -12311,6 +12439,12 @@ EOCP echo "I can't compile the test program--assuming errno EAGAIN will do." eagain=EAGAIN fi + ;; + *) echo "Can't figure out how to test this--assuming errno EAGAIN will do." + eagain=EAGAIN + val="$define" + ;; + esac set d_eofnblk eval $setvar ;; @@ -12327,7 +12461,7 @@ EOCP esac ;; esac -$rm -f try try.* .out core head.c mtry +$rm_try head.c mtry : see if _ptr and _cnt from stdio act std echo " " @@ -12426,7 +12560,7 @@ if eval $compile && $to try.c; then else echo "Your stdio doesn't appear very std." fi -$rm -f try.c try +$rm_try # glibc 2.2.90 and above apparently change stdio streams so Perl's # direct buffer manipulation no longer works. The Configure tests @@ -12526,7 +12660,7 @@ int main() { if (cnt == FILE_cnt(fp)) { puts("Pass_unchanged"); exit (0); - } + } if (FILE_cnt(fp) == (cnt - 42)) { puts("Pass_changed"); exit (0); @@ -12553,7 +12687,7 @@ EOP else echo "It seems we can't set ptr in your stdio. Nevermind." >&4 fi - $rm -f try.c try + $rm_try ;; esac @@ -12591,7 +12725,7 @@ EOP else echo "However, it seems to be lacking the _base field." fi - $rm -f try.c try + $rm_try ;; esac set d_stdiobase @@ -12694,8 +12828,7 @@ EOM esac set d_fcntl_can_lock eval $setvar -$rm -f try* - +$rm_try : check for fd_set items $cat <&4 +echo "Checking if you have a working futimes()" >&4 $cat >try.c < #include @@ -12930,16 +13059,16 @@ if eval $compile; then `$run ./try` rc=$? case "$rc" in - 0) echo "Yes, it does" >&4 + 0) echo "Yes, you have" >&4 d_futimes="$define" ;; - *) echo "No, it has futimes, but it isn't working ($rc) (probably harmless)\n" >&4 + *) echo "No, you have futimes, but it isn't working ($rc) (probably harmless)" >&4 ;; esac else - echo "No, it does not (probably harmless)\n" >&4 + echo "No, it does not (probably harmless)" >&4 fi -$rm -f try.* try core core.try.* +$rm_try : see if getcwd exists set getcwd d_getcwd @@ -14565,9 +14694,9 @@ EOCP echo "Yes, it does ($foo)" >&4 d_libm_lib_version="$define" else - echo "No, it does not (probably harmless)\n" >&4 + echo "No, it does not (probably harmless)" >&4 fi - $rm -f try.* try core core.try.* + $rm_try ;; esac @@ -14659,7 +14788,7 @@ int main() EOCP set try if eval $compile; then - if ./try; then + if $run ./try; then d_localtime_r_needs_tzset=undef; else d_localtime_r_needs_tzset=define; @@ -14672,7 +14801,7 @@ EOCP d_localtime_r_needs_tzset=undef; ;; esac -$rm -f try try.* core +$rm_try : see if localeconv exists set localeconv d_locconv @@ -14811,12 +14940,12 @@ $define$define) Checking to see whether your modfl() is okay for large values... EOM $cat >try.c < +#include #include EOCP if $test "X$d_modflproto" != "X$define"; then $cat >>try.c <>try.c <&4 - $cat >try.c < -#$i_stdlib I_STDLIB -#ifdef I_STDLIB -#include -#endif -int main() -{ - printf("%d\n", (int)sizeof(char)); - exit(0); -} -EOCP - set try - if eval $compile_ok; then - dflt=`$run ./try` - else - dflt='1' - echo "(I can't seem to compile the test program. Guessing...)" - fi - ;; -*) - dflt="$charsize" - ;; -esac -rp="What is the size of a character (in bytes)?" -. ./myread -charsize="$ans" -$rm -f try.c try - : check for volatile keyword echo " " echo 'Checking to see if your C compiler knows about "volatile"...' >&4 @@ -15051,7 +15146,7 @@ else fi set d_volatile eval $setvar -$rm -f try.* +$rm_try echo " " @@ -15110,38 +15205,10 @@ int main() { } EOCP -case "$i8type" in -'') case "$charsize" in - 1) i8type=char - u8type="unsigned char" - i8size=$charsize - u8size=$charsize - ;; - esac - ;; -esac -case "$i8type" in -'') set try -DINT8 - if eval $compile; then - case "`$run ./try`" in - int8_t) i8type=int8_t - u8type=uint8_t - i8size=1 - u8size=1 - ;; - esac - fi - ;; -esac -case "$i8type" in -'') if $test $charsize -ge 1; then - i8type=char - u8type="unsigned char" - i8size=$charsize - u8size=$charsize - fi - ;; -esac +i8type="signed char" +u8type="unsigned char" +i8size=1 +u8size=1 case "$i16type" in '') case "$shortsize" in @@ -15268,10 +15335,9 @@ int main() { if (($uvtype)d != (u - 1)) break; #ifdef SIGFPE - if (bletched) { + if (bletched) break; #endif - } } printf("%d\n", ((i == n) ? -n : i)); exit(0); @@ -15284,7 +15350,7 @@ if eval $compile; then nv_preserves_uv_bits="`$run ./try`" fi case "$nv_preserves_uv_bits" in -\-[1-9]*) +\-[1-9]*) nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits` $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1 d_nv_preserves_uv="$define" @@ -15292,10 +15358,9 @@ case "$nv_preserves_uv_bits" in [1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1 d_nv_preserves_uv="$undef" ;; *) $echo "Can't figure out how many bits your NVs preserve." 2>&1 - nv_preserves_uv_bits="$undef" ;; + nv_preserves_uv_bits="0" ;; esac - -$rm -f try.* try +$rm_try $echo "Checking whether NV 0.0 is all bits zero in memory..." >&4 : volatile so that the compiler has to store it out to memory. @@ -15374,7 +15439,7 @@ int main(int argc, char **argv) { printf("(gives %g)\n", d); return 1; } - + #ifdef SIGFPE if (bletched) { printf("No - something bleched\n"); @@ -15416,9 +15481,7 @@ EOM ;; esac fi - -$rm -f try.* try - +$rm_try : check for off64_t echo " " @@ -15439,14 +15502,14 @@ else 8) echo "(Your off_t is 64 bits, so you could use that.)" ;; esac fi -$rm -f try.* try +$rm_try set d_off64_t eval $setvar : how to create joinable pthreads if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then echo " " - echo "Checking what constant to use for creating joinable pthreads..." >&4 + echo "Checking what constant to use for creating joinable pthreads..." >&4 $cat >try.c <<'EOCP' #include int main() { @@ -15472,7 +15535,7 @@ EOCP val=PTHREAD_CREATE_UNDETACHED set old_pthread_create_joinable eval $setvar - else + else set try -DJOINABLE=__UNDETACHED if eval $compile; then echo "You seem to use __UNDETACHED." >&4 @@ -15493,7 +15556,7 @@ EOCP fi fi fi - $rm -f try try.* + $rm_try else d_old_pthread_create_joinable="$undef" old_pthread_create_joinable="" @@ -15503,10 +15566,6 @@ fi set pause d_pause eval $inlibc -: see if pipe exists -set pipe d_pipe -eval $inlibc - : see if poll exists set poll d_poll eval $inlibc @@ -15542,6 +15601,54 @@ $rm -f reflect set d_procselfexe eval $setvar +: backward compatibility for d_hvfork +if test X$d_hvfork != X; then + d_vfork="$d_hvfork" + d_hvfork='' +fi +: see if there is a vfork +val='' +set vfork val +eval $inlibc + +d_pseudofork=$undef + +: Ok, but do we want to use it. vfork is reportedly unreliable in +: perl on Solaris 2.x, and probably elsewhere. +case "$val" in +$define) + echo " " + case "$usevfork" in + false) dflt='n';; + *) dflt='y';; + esac + cat <<'EOM' + +Perl can only use a vfork() that doesn't suffer from strict +restrictions on calling functions or modifying global data in +the child. For example, glibc-2.1 contains such a vfork() +that is unsuitable. If your system provides a proper fork() +call, chances are that you do NOT want perl to use vfork(). + +EOM + rp="Do you still want to use vfork()?" + . ./myread + case "$ans" in + y|Y) ;; + *) + echo "Ok, we won't use vfork()." + val="$undef" + ;; + esac + ;; +esac +set d_vfork +eval $setvar +case "$d_vfork" in +$define) usevfork='true';; +*) usevfork='false';; +esac + : see whether the pthread_atfork exists $cat >try.c < @@ -15639,12 +15746,10 @@ $define) esac set d_pthread_yield eval $setvar - case "$sched_yield" in '') sched_yield=undef ;; esac - -$rm -f try try.* +$rm_try : see if random_r exists set random_r d_random_r @@ -15894,7 +15999,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 @@ -15905,7 +16010,7 @@ EOCP fi ;; esac - $rm -f try.* try core + $rm_try ;; esac set d_safebcpy @@ -15970,7 +16075,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 @@ -15981,7 +16086,7 @@ EOCP fi ;; esac - $rm -f try.* try core + $rm_try ;; esac set d_safemcpy @@ -16037,7 +16142,7 @@ EOCP fi ;; esac -$rm -f try.* try core +$rm_try set d_sanemcmp eval $setvar @@ -16112,7 +16217,7 @@ else echo "You do not have union semun in ." >&4 val="$undef" fi -$rm -f try try.c +$rm_try set d_union_semun eval $setvar @@ -16120,7 +16225,7 @@ eval $setvar case "$d_sem" in $define) echo " " - $cat > try.h < tryh.h < #include #include -#include "try.h" +#include "tryh.h" #ifndef errno extern int errno; #endif @@ -16201,7 +16306,7 @@ END semun) val="$define" ;; esac fi - $rm -f try try.c + $rm_try set d_semctl_semun eval $setvar ;; @@ -16225,7 +16330,7 @@ END #include #include #include -#include "try.h" +#include "tryh.h" #include #include #ifndef errno @@ -16263,7 +16368,7 @@ END semid_ds) val="$define" ;; esac fi - $rm -f try try.c + $rm_try set d_semctl_semid_ds eval $setvar ;; @@ -16275,7 +16380,6 @@ END *) echo "You cannot use struct semid_ds* for semctl IPC_STAT." >&4 ;; esac - $rm -f try.h ;; *) val="$undef" @@ -16289,6 +16393,7 @@ END eval $setvar ;; esac +$rm_try tryh.h : see if sendmsg exists set sendmsg d_sendmsg @@ -16884,7 +16989,52 @@ else val="$undef" fi set d_sigaction; eval $setvar -$rm -f try try$_o try.c +$rm_try + +: see if this is a sunmath.h system +set sunmath.h i_sunmath +eval $inhdr + +: see if signbit exists +$echo $n "Checking to see if you have signbit() available to work on $nvtype... $c" >&4 +$cat >try.c < +#endif +#ifdef I_SUNMATH /* Solaris special math library */ +# include +#endif +#define NV $nvtype +int main(int argc, char **argv) +{ + NV x = 0.0; + NV y = -0.0; + if ((signbit(x) == 0) && (signbit(y) != 0)) + return 0; + else + return 1; +} +EOCP +val="$undef" +set try +if eval $compile; then + if $run ./try; then + $echo "Yes." >&4 + val="$define" + else + $echo "Signbit seems to be available, but doesn't work as I expected." + $echo "I won't use it." >&4 + val="$undef" + fi +else + $echo "Nope." >&4 + dflt="$undef" +fi +set d_signbit +eval $setvar +$rm_try : see if sigprocmask exists set sigprocmask d_sigprocmask @@ -16937,7 +17087,7 @@ EOM esac set d_sigsetjmp eval $setvar -$rm -f try.c try +$rm_try : see if snprintf exists set snprintf d_snprintf @@ -17000,7 +17150,7 @@ EOM d_snprintf="$undef" d_vsnprintf="$undef" fi - $rm -f try.* try core core.try.* + $rm_try ;; esac @@ -17076,8 +17226,7 @@ EOM ;; esac fi - -$rm -f try.* try +$rm_try : see if srand48_r exists set srand48_r d_srand48_r @@ -17242,7 +17391,7 @@ EOCP esac fi done - $rm -f try.* try$exe_ext + $rm_try esac case "$stdio_stream_array" in '') $cat >&4 < /dev/null; then + if eval $compile && $run ./try > /dev/null; then dflt=`$run ./try` case "$dflt" in [1-4][1-4][1-4][1-4]|12345678|87654321) @@ -17913,11 +18071,10 @@ EOM esac ;; esac - $rm -f try.c try + $rm_try ;; esac - $cat <&4 $cat >try.c <&4 echo "Something's wrong, but I'll assume you use $db_hashtype." >&4 fi - $rm -f try.* + $rm_try echo "Your version of Berkeley DB uses $db_hashtype for hash." ;; *) db_hashtype=u_int32_t @@ -18413,7 +18525,7 @@ EOCP esac case "$i_db" in define) - : Check the return type needed for prefix + : Check the return type needed for prefix echo " " echo "Checking return type needed for prefix for Berkeley DB ..." >&4 cat >try.c <&4 echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4 fi - $rm -f try.* + $rm_try echo "Your version of Berkeley DB uses $db_prefixtype for prefix." ;; *) db_prefixtype='size_t' ;; esac - : How can we generate normalized random numbers ? echo " " echo "Looking for a random number function..." >&4 @@ -18563,7 +18674,7 @@ EOCP rp="How many bits does your $randfunc() function produce?" . ./myread randbits="$ans" - $rm -f try.c try + $rm_try drand01="($randfunc() / (double) ((unsigned long)1 << $randbits))" seedfunc="s$randfunc" randseedtype=unsigned @@ -18611,7 +18722,7 @@ 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 try try.* +$rm_try set ebcdic eval $setvar @@ -18674,7 +18785,7 @@ int main() { # endif # endif # endif -# endif +# endif # ifdef HAS_STDIO_STREAM_ARRAY if (open_max > 0) { long i; @@ -18683,7 +18794,7 @@ int main() { STDIO_STREAM_ARRAY[i]._file < open_max && STDIO_STREAM_ARRAY[i]._flag) fflush(&STDIO_STREAM_ARRAY[i]); - } + } } # endif #endif @@ -18734,7 +18845,7 @@ EOM fi fi fi - $rm -f core try.core core.try.* + $rm_try case "$fflushNULL" in x) $cat >&4 <&4 <&4 fi - -$rm -f try try.* +$rm_try fi case "$sPRId64" in -'') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef"; - d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef"; +'') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef"; + d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef"; ;; -*) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define"; - d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define"; +*) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define"; + d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define"; ;; esac @@ -19368,28 +19478,28 @@ ivfprintf(FILE *f, const char *fmt, va_list *valp) { return vfprintf(f, fmt, *valp); } - -int + +int myvfprintf(FILE *f, const char *fmt, va_list val) { return ivfprintf(f, fmt, &val); } - + int -myprintf(char *fmt, ...) +myprintf(char *fmt, ...) { va_list val; va_start(val, fmt); - return myvfprintf(stdout, fmt, val); -} + return myvfprintf(stdout, fmt, val); +} int main(int ac, char **av) { signal(SIGSEGV, exit); - myprintf("%s%cs all right, then\n", "that", '\''); - exit(0); + myprintf("%s%cs all right, then\n", "that", '\''); + exit(0); } EOCP set try @@ -19408,7 +19518,7 @@ EOCP need_va_copy="$define" ;; esac - $rm -f try.* core core.* *.core *.core.* + $rm_try ;; *) echo "You don't have , not checking for va_copy()." >&4 ;; @@ -19639,7 +19749,7 @@ else fi $rm -f foo* bar* -: check for type of arguments to select. +: check for type of arguments to select. case "$selecttype" in '') case "$d_select" in $define) @@ -19648,7 +19758,7 @@ case "$selecttype" in Checking to see what type of arguments are accepted by select(). EOM hdrs="$define sys/types.h - $i_systime sys/time.h + $i_systime sys/time.h $i_sysselct sys/select.h $d_socket sys/socket.h" : The first arg can be int, unsigned, or size_t @@ -19787,7 +19897,7 @@ EOM val=$ans selectminbits="$val" fi - $rm -f try.* try + $rm_try ;; *) : no select, so pick a harmless default selectminbits=$safebits @@ -20066,7 +20176,7 @@ echo $sig_name | $awk \ printf "\n" }' sig_size=`echo $sig_name | awk '{print NF}'` -$rm -f signal signal.c signal.awk signal.lst signal_cmd +$rm -f signal signal.c signal.awk signal.lst signal_cmd echo " " case "$sizetype" in @@ -20125,7 +20235,7 @@ else size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;; esac fi -$rm -f try try.* +$rm_try set d_socklen_t eval $setvar @@ -20197,7 +20307,7 @@ int main() printf("$dflt\n"); else if (sizeof(Size_t) == sizeof(int)) printf("int\n"); - else + else printf("long\n"); exit(0); } @@ -20221,7 +20331,7 @@ EOM . ./myread ssizetype="$ans" fi -$rm -f try try.* +$rm_try : see what type of char stdio uses. echo " " @@ -20411,6 +20521,11 @@ case "$yacc" in ;; esac + +: see if this is a assert.h system +set assert.h i_assert +eval $inhdr + : see if this is a fp.h system set fp.h i_fp eval $inhdr @@ -20521,7 +20636,7 @@ EOM echo "We won't be including ." >&4 val="$undef" fi - $rm -f try.* try + $rm_try ;; esac set i_neterrno @@ -20564,7 +20679,7 @@ IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64 INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1 LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE -Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG +LIBCATAMOUNT Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG LONGDOUBLE LONGLONG LP64 luna luna88k Lynx M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3 @@ -20583,7 +20698,7 @@ pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc pc532 pdp11 PGC PIC plexus PORTAR posix POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE POSIX_C_SOURCE POSIX_SOURCE POWER -PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000 +PROTOTYPES PWB pyr QNX QK_USER R3000 REENTRANT RES Rhapsody RISC6000 riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE sony sony_news sonyrisc sparc sparclite spectrum @@ -20703,7 +20818,7 @@ do -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';; esac done -$rm -f try.c +$rm_try EOS postprocess_cc_v='' chmod +x ccsym @@ -20819,10 +20934,6 @@ val=$val3; set i_termios; eval $setvar set stddef.h i_stddef eval $inhdr -: see if this is a sunmath.h system -set sunmath.h i_sunmath -eval $inhdr - : see if sys/access.h is available set sys/access.h i_sysaccess eval $inhdr @@ -20941,40 +21052,42 @@ nonxs_extensions='' : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness find_extensions=' for xxx in *; do - case "$xxx" in - DynaLoader|dynaload) ;; - *) - if $test -f $xxx/$xxx.xs; then - known_extensions="$known_extensions $1$xxx"; - elif $test -f $xxx/Makefile.PL; then - nonxs_extensions="$nonxs_extensions $1$xxx"; - else - if $test -d $xxx -a $# -lt 10; then - set $1$xxx/ $*; - cd "$xxx"; - eval $find_extensions; - cd ..; - shift; - fi; - fi - ;; - esac; + case "$xxx" in + DynaLoader|dynaload) ;; + *) + if $test -f $xxx/$xxx.xs -o -f $xxx/$xxx.c; then + known_extensions="$known_extensions $1$xxx"; + elif $test -f $xxx/Makefile.PL; then + nonxs_extensions="$nonxs_extensions $1$xxx"; + else + if $test -d $xxx -a $# -lt 10; then + set $1$xxx/ $*; + cd "$xxx"; + eval $find_extensions; + cd ..; + shift; + fi; + fi + ;; + esac; done' tdir=`pwd` cd "$rsrc/ext" set X shift eval $find_extensions -# Special case: Add in threads/shared since it is not picked up by the -# recursive find above (and adding in general recursive finding breaks -# SDBM_File/sdbm). A.D. 10/25/2001. -known_extensions="$known_extensions threads/shared" -set X $nonxs_extensions -shift -nonxs_extensions="$*" +# Special case: Add in modules that nest beyond the first level. +# Currently threads/shared and Hash/Util/FieldHash, since they are +# not picked up by the recursive find above (and adding in general +# recursive finding breaks SDBM_File/sdbm). +# A.D. 20011025 (SDBM), ajgough 20071008 (FieldHash) +known_extensions="$known_extensions threads/shared Hash/Util/FieldHash" set X $known_extensions shift known_extensions="$*" +set X $nonxs_extensions +shift +nonxs_extensions="$*" cd "$tdir" : Now see which are supported on this system. @@ -20987,15 +21100,21 @@ for xxx in $known_extensions ; do esac ;; GDBM_File|gdbm_fil) - case "$i_gdbm" in + case "$i_gdbm" in $define) avail_ext="$avail_ext $xxx" ;; esac ;; I18N/Langinfo|i18n_lan) - case "$i_langinfo$d_nl_langinfo" in + case "$i_langinfo$d_nl_langinfo" in $define$define) avail_ext="$avail_ext $xxx" ;; esac ;; + IPC/SysV|ipc/sysv) + : XXX Do we need a useipcsysv variable here + case "${d_msg}${d_sem}${d_shm}" in + *"${define}"*) avail_ext="$avail_ext $xxx" ;; + esac + ;; NDBM_File|ndbm_fil) case "$i_ndbm" in $define) @@ -21010,32 +21129,36 @@ for xxx in $known_extensions ; do ;; esac ;; - ODBM_File|odbm_fil) + ODBM_File|odbm_fil) case "${i_dbm}${i_rpcsvcdbm}" in *"${define}"*) - case "$osname-$use64bitint" in - hpux-define) - case "$libs" in - *-ldbm*) avail_ext="$avail_ext $xxx" ;; + case "$d_cplusplus" in + define) ;; # delete as a function name will not work + *) case "$osname-$use64bitint" in + hpux-define) + case "$libs" in + *-ldbm*) avail_ext="$avail_ext $xxx" ;; + esac + ;; + *) avail_ext="$avail_ext $xxx" ;; esac ;; - *) avail_ext="$avail_ext $xxx" ;; esac ;; esac ;; - POSIX|posix) - case "$useposix" in + Opcode|opcode) + case "$useopcode" in true|define|y) avail_ext="$avail_ext $xxx" ;; esac ;; - Opcode|opcode) - case "$useopcode" in + POSIX|posix) + case "$useposix" in true|define|y) avail_ext="$avail_ext $xxx" ;; esac ;; Socket|socket) - case "$d_socket" in + case "$d_socket" in true|$define|y) case "$osname" in beos) ;; # not unless BONE @@ -21046,31 +21169,18 @@ for xxx in $known_extensions ; do ;; Sys/Syslog|sys/syslog) : XXX syslog requires socket - case "$d_socket" in + case "$d_socket" in true|$define|y) avail_ext="$avail_ext $xxx" ;; esac ;; Thread|thread) case "$usethreads" in true|$define|y) - case "$useithreads" in - $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;; + case "$use5005threads" in + $define|true|[yY]*) avail_ext="$avail_ext $xxx" ;; esac esac ;; - XS/APItest|xs/apitest) - # This is just for testing. Skip it unless we have dynamic loading. - - case "$usedl" in - $define) avail_ext="$avail_ext $xxx" ;; - esac - ;; - XS/Typemap|xs/typemap) - # This is just for testing. Skip it unless we have dynamic loading. - case "$usedl" in - $define) avail_ext="$avail_ext $xxx" ;; - esac - ;; threads|threads/shared) # threads and threads::shared are special cases. # To stop people from asking "Perl 5.8.0 was supposed @@ -21085,10 +21195,22 @@ for xxx in $known_extensions ; do # --jhi avail_ext="$avail_ext $xxx" ;; - IPC/SysV|ipc/sysv) - : XXX Do we need a useipcsysv variable here - case "${d_msg}${d_sem}${d_shm}" in - *"${define}"*) avail_ext="$avail_ext $xxx" ;; + Win32*) + case "$osname" in + cygwin) avail_ext="$avail_ext $xxx" ;; + esac + ;; + XS/APItest|xs/apitest) + # This is just for testing. Skip it unless we have dynamic loading. + + case "$usedl" in + $define) avail_ext="$avail_ext $xxx" ;; + esac + ;; + XS/Typemap|xs/typemap) + # This is just for testing. Skip it unless we have dynamic loading. + case "$usedl" in + $define) avail_ext="$avail_ext $xxx" ;; esac ;; *) avail_ext="$avail_ext $xxx" @@ -21177,11 +21299,11 @@ EOM previous) if test X"$dynamic_ext" != X"$avail_ext"; then $cat <