X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=21cf09ed6e8e2d5926d8c918a3b56511f7b77bcb;hb=cb1f50b8bcbf67997c1040a0bba4a468fe0cefcc;hp=10f73fece55c416fcdd1e4646bafbbf4fce39979;hpb=d1777648259a97c52b380dc00e781956751e1d6c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index 10f73fe..21cf09e 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 Mon Dec 24 20:13:53 EET 2001 [metaconfig 3.0 PL70] +# Generated on Fri Mar 1 20:03:36 EET 2002 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ </dev/null 2>&1`; then xcat=/bin/cat test -f $xcat$_exe || xcat=/usr/bin/cat if test ! -f $xcat$_exe; then - for p in $paths; do + for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do if test -f $p/cat$_exe; then xcat=$p/cat break @@ -1582,13 +1592,13 @@ if test -f MANIFEST; then set x `awk '{print $1}' < MANIFEST | grep '\.SH$'` else echo "(Looking for .SH files under the source directory.)" - set x `(cd $src; find . -name "*.SH" -print)` + set x `(cd "$src"; find . -name "*.SH" -print)` fi shift case $# in -0) set x `(cd $src; echo *.SH)`; shift;; +0) set x `(cd "$src"; echo *.SH)`; shift;; esac -if test ! -f $src/$1; then +if test ! -f "$src/$1"; then shift fi mkdir_p=' @@ -1614,7 +1624,7 @@ for file in $*; do */*) dir=`expr X$file : 'X\(.*\)/'` file=`expr X$file : 'X.*/\(.*\)'` - (cd $dir && . ./$file) + (cd "$dir" && . ./$file) ;; *) . ./$file @@ -1627,19 +1637,19 @@ for file in $*; do dir=`expr X$file : 'X\(.*\)/'` file=`expr X$file : 'X.*/\(.*\)'` (set x $dir; shift; eval $mkdir_p) - sh <$src/$dir/$file + sh <"$src/$dir/$file" ;; *) - sh <$src/$file + sh <"$src/$file" ;; esac ;; esac done -if test -f $src/config_h.SH; then +if test -f "$src/config_h.SH"; then if test ! -f config.h; then : oops, they left it out of MANIFEST, probably, so do it anyway. - . $src/config_h.SH + . "$src/config_h.SH" fi fi EOS @@ -1695,13 +1705,13 @@ rm -f .echotmp : Now test for existence of everything in MANIFEST echo " " -if test -f $rsrc/MANIFEST; then +if test -f "$rsrc/MANIFEST"; then echo "First let's make sure your kit is complete. Checking..." >&4 - awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -50 + awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | (split -l 50 2>/dev/null || split -50) rm -f missing tmppwd=`pwd` for filelist in x??; do - (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing) + (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` >/dev/null 2>>"$tmppwd/missing") done if test -s missing; then cat missing >&4 @@ -2142,7 +2152,7 @@ for file in $trylist; do '') xxx=`./loc $file $file $pth`;; *) xxx=`./loc $xxx $xxx $pth`;; esac - eval $file=$xxx + eval $file=$xxx$_exe eval _$file=$xxx case "$xxx" in /*) @@ -2161,12 +2171,14 @@ case "$egrep" in egrep) echo "Substituting grep for egrep." egrep=$grep + _egrep=$grep ;; esac case "$ln" in ln) echo "Substituting cp for ln." ln=$cp + _ln=$cp ;; esac case "$make" in @@ -2188,6 +2200,7 @@ gmake) ;; # and prefer it over the system make. echo "Substituting gmake for make." make=$gmake + _make=$gmake fi ;; esac @@ -2234,10 +2247,10 @@ FOO ;; esac -cat <checkcc +cat <trygcc $startsh EOS -cat <<'EOSC' >>checkcc +cat <<'EOSC' >>trygcc case "$cc" in '') ;; *) $rm -f try try.* @@ -2279,15 +2292,37 @@ EOM esac fi fi + fi + $rm -f try try.* + ;; +esac +EOSC + +cat <checkcc +$startsh +EOS +cat <<'EOSC' >>checkcc +case "$cc" in +'') ;; +*) $rm -f try try.* + $cat >try.c <&4 <&4 + fi + $cat >&4 <&4 $lns blurfl sym if $test "X$issymlink" = X; then @@ -2372,7 +2407,7 @@ $define|true|[yY]*) exit 1 ;; *) case "$lns:$issymlink" in - *"ln -s:"*"test -"?) + *"ln"*" -s:"*"test -"?) echo "Creating the symbolic links..." >&4 echo "(First creating the subdirectories...)" >&4 cd .. @@ -2810,7 +2845,7 @@ EOM $test -d /usr/apollo/bin && osname=apollo $test -f /etc/saf/_sactab && osname=svr4 $test -d /usr/include/minix && osname=minix - $test -d /system && osname=vos + $test -f /system/gnu_library/bin/ar.pm && osname=vos if $test -d /MachTen -o -d /MachTen_Folder; then osname=machten if $test -x /sbin/version; then @@ -3530,6 +3565,9 @@ esac rp="Use which C compiler?" . ./myread cc="$ans" + +: See if they have not cc but they do have gcc +. ./trygcc : 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. @@ -4245,7 +4283,7 @@ for thislib in $libswanted; do for thisdir in $libspath; do xxx='' if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then - xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|tail -1` + xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'` $test -f "$xxx" && eval $libscheck $test -f "$xxx" && libstyle=shared fi @@ -5744,63 +5782,6 @@ esac' set sqrtl d_sqrtl eval $inlibc -case "$ccflags" in -*-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;; -esac - -case "$uselongdouble" in -$define|true|[yY]*) dflt='y';; -*) dflt='n';; -esac -cat <&4 - -*** You requested the use of long doubles but you do not seem to have -*** the mathematic functions for long doubles. I'm disabling the use -*** of long doubles. - -EOM - uselongdouble=$undef - ;; -esac - : check for length of double echo " " case "$doublesize" in @@ -5863,19 +5844,266 @@ EOCP longdblsize=`$run ./try` echo "Your long doubles are $longdblsize bytes long." 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" + 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.* 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=`$run ./try` + case "$yyy" in + 123.456) + sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"'; + sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"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("%.3Lf\n", d); +} +EOCP + set try + if eval $compile; then + yyy=`$run ./try` + case "$yyy" in + 123.456) + sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"'; + sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"'; + echo "We will use %Lf." + ;; + 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=`$run ./try` + case "$yyy" in + 123.456) + sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"'; + sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"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=`$run ./try` + case "$yyy" in + 123.456) + sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"'; + sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"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 +else + sSCNfldbl=$sPRIfldbl # expect consistency +fi + +$rm -f try 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_SCNfldbl="$undef"; + ;; +*) d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define"; + d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define"; + d_SCNfldbl="$define"; + ;; +esac + +: see if modfl exists +set modfl d_modfl +eval $inlibc + +d_modfl_pow32_bug="$undef" + +case "$d_longdbl$d_modfl" in +$define$define) + $cat <try.c < +#include +int main() { + long double nv = 4294967303.15; + long double v, w; + v = modfl(nv, &w); +#ifdef __GLIBC__ + printf("glibc"); +#endif + printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w); + return 0; +} +EOCP + case "$osname:$gccversion" in + aix:) saveccflags="$ccflags" + ccflags="$ccflags -qlongdouble" ;; # to avoid core dump + esac + set try + if eval $compile; then + foo=`$run ./try` + case "$foo" in + *" 4294967303.150000 1.150000 4294967302.000000") + echo >&4 "Your modfl() is broken for large values." + d_modfl_pow32_bug="$define" + case "$foo" in + glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()." + ;; + esac + ;; + *" 4294967303.150000 0.150000 4294967303.000000") + echo >&4 "Your modfl() seems okay for large values." + ;; + *) echo >&4 "I don't understand your modfl() at all." + d_modfl="$undef" + ;; + esac + $rm -f try.* try core core.try.* + else + echo "I cannot figure out whether your modfl() is okay, assuming it isn't." + d_modfl="$undef" + fi + case "$osname:$gccversion" in + aix:) ccflags="$saveccflags" ;; # restore + esac + ;; +esac + +case "$ccflags" in +*-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;; +esac + +case "$uselongdouble" in +$define|true|[yY]*) dflt='y';; +*) dflt='n';; +esac +cat <&4 + +*** You requested the use of long doubles but you do not seem to have +*** the mathematic functions for long doubles. +*** ($message) +*** I'm disabling the use of long doubles. + +EOM + + uselongdouble=$undef +fi case "$useperlio" in $define|true|[yY]*|'') dflt='y';; @@ -7113,7 +7341,7 @@ y*) usedl="$define" esac echo "The following dynamic loading files are available:" : Can not go over to $dldir because getfile has path hard-coded in. - tdir=`pwd`; cd $rsrc; $ls -C $dldir/dl*.xs; cd $tdir + tdir=`pwd`; cd "$rsrc"; $ls -C $dldir/dl*.xs; cd "$tdir" rp="Source file to use for dynamic loading" fn="fne" gfpth="$src" @@ -7363,8 +7591,8 @@ true) linux*) # ld won't link with a bare -lperl otherwise. dflt=libperl.$so ;; - cygwin*) # include version - dflt=`echo libperl$version | sed -e 's/\./_/g'`$lib_ext + cygwin*) # ld links against an importlib + dflt=libperl$lib_ext ;; *) # Try to guess based on whether libc has major.minor. case "$libc" in @@ -7447,7 +7675,7 @@ if "$useshrplib"; then freebsd|netbsd) xxx="-Wl,-R$shrpdir" ;; - linux|irix*|dec_osf) + bsdos|linux|irix*|dec_osf) xxx="-Wl,-rpath,$shrpdir" ;; next) @@ -7834,6 +8062,9 @@ if $test "$cont"; then fi fi fi +case "$myhostname" in +'') myhostname=noname ;; +esac : you do not want to know about this set $myhostname myhostname=$1 @@ -7934,7 +8165,7 @@ case "$myhostname" in esac case "$dflt" in .) echo "(Lost all hope -- silly guess then)" - dflt='.uucp' + dflt='.nonet' ;; esac $rm -f hosts @@ -8445,122 +8676,10 @@ fi set qgcvt d_qgcvt eval $inlibc -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=`$run ./try` - case "$yyy" in - 123.456) - sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"'; - sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"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("%.3Lf\n", d); -} -EOCP - set try - if eval $compile; then - yyy=`$run ./try` - case "$yyy" in - 123.456) - sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"'; - sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"'; - echo "We will use %Lf." - ;; - 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=`$run ./try` - case "$yyy" in - 123.456) - sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"'; - sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"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=`$run ./try` - case "$yyy" in - 123.456) - sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"'; - sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"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 -else - sSCNfldbl=$sPRIfldbl # expect consistency -fi - -$rm -f try try.* - -fi # d_longdbl +: Check how to convert floats to strings. -case "$sPRIfldbl" in -'') 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_SCNfldbl="$define"; - ;; -esac +if test "X$d_Gconvert" = X; then -: Check how to convert floats to strings. echo " " echo "Checking for an efficient way to convert floats to strings." echo " " > try.c @@ -8588,9 +8707,13 @@ char *myname = "qgcvt"; #define DOUBLETYPE long double #endif #ifdef TRY_sprintf -#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && defined(HAS_PRIgldbl) +#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) +#ifdef HAS_PRIgldbl #define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x)) #else +#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x)) +#endif +#else #define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x)) #endif char *myname = "sprintf"; @@ -8633,6 +8756,21 @@ int main() Gconvert((DOUBLETYPE)0.1, 8, 0, buf); checkit("0.1", buf); + Gconvert((DOUBLETYPE)0.01, 8, 0, buf); + checkit("0.01", buf); + + Gconvert((DOUBLETYPE)0.001, 8, 0, buf); + checkit("0.001", buf); + + Gconvert((DOUBLETYPE)0.0001, 8, 0, buf); + checkit("0.0001", buf); + + Gconvert((DOUBLETYPE)0.00009, 8, 0, buf); + if (strlen(buf) > 5) + checkit("9e-005", buf); /* for Microsoft ?? */ + else + checkit("9e-05", buf); + Gconvert((DOUBLETYPE)1.0, 8, 0, buf); checkit("1", buf); @@ -8671,31 +8809,59 @@ int main() Gconvert((DOUBLETYPE)123.456, 8, 0, buf); checkit("123.456", buf); - /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */ - Gconvert((DOUBLETYPE)1e30, 8, 0, buf); - if (strlen(buf) > 5) - checkit("1e+030", buf); /* for Microsoft */ - else - checkit("1e+30", buf); + /* Testing of 1e+129 in bigintpm.t must not get extra '.' here. */ + Gconvert((DOUBLETYPE)1e30, 8, 0, buf); + if (strlen(buf) > 5) + checkit("1e+030", buf); /* for Microsoft */ + else + checkit("1e+30", buf); exit(0); } EOP -case "$d_Gconvert" in -gconvert*) xxx_list='gconvert gcvt sprintf' ;; -gcvt*) xxx_list='gcvt gconvert sprintf' ;; -sprintf*) xxx_list='sprintf gconvert gcvt' ;; -*) xxx_list='gconvert gcvt sprintf' ;; -esac - -case "$d_longdbl$uselongdouble$d_PRIgldbl" in -"$define$define$define") - # for long doubles prefer first qgcvt, then sprintf - xxx_list="`echo $xxx_list|sed s/sprintf//`" - xxx_list="sprintf $xxx_list" - case "$d_qgcvt" in - "$define") xxx_list="qgcvt $xxx_list" ;; - esac +: first add preferred functions to our list +xxx_list="" +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 +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 +done + +case "$d_longdbl$uselongdouble" in +"$define$define") + : again, add prefered functions to our list first + xxx_ld_list="" + for xxx_convert in $gconvert_ld_preference; do + case $xxx_convert in + qgcvt|gcvt|gconvert|sprintf) xxx_ld_list="$xxx_ld_list $xxx_convert" ;; + *) echo "Discarding unrecognized gconvert_ld_preference $xxx_convert" ;; + esac + done + : then add qgcvt, sprintf--then, in xxx_list order, gconvert and gcvt + for xxx_convert in qgcvt sprintf $xxx_list; do + case "$xxx_ld_list" in + $xxx_convert*|*" $xxx_convert"*) ;; + *) xxx_ld_list="$xxx_ld_list $xxx_convert" ;; + esac + done + : if sprintf cannot do long doubles, move it to the end + if test "$d_PRIgldbl" != "$define"; then + xxx_ld_list="`echo $xxx_ld_list|sed s/sprintf//` sprintf" + fi + : if no qgcvt, remove it + if test "$d_qgcvt" != "$define"; then + xxx_ld_list="`echo $xxx_ld_list|sed s/qgcvt//`" + fi + : use the ld_list + xxx_list="$xxx_ld_list" ;; esac @@ -8710,12 +8876,19 @@ for xxx_convert in $xxx_list; do break; else echo "...But $xxx_convert didn't work as I expected." + xxx_convert='' fi else echo "$xxx_convert NOT found." >&4 fi done - + +if test X$xxx_convert = X; then + echo "*** WHOA THERE!!! ***" >&4 + echo "None of ($xxx_list) seemed to work properly. I'll use sprintf." >&4 + xxx_convert=sprintf +fi + case "$xxx_convert" in gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;; gcvt) d_Gconvert='gcvt((x),(n),(b))' ;; @@ -8723,11 +8896,15 @@ qgcvt) d_Gconvert='qgcvt((x),(n),(b))' ;; *) case "$uselongdouble$d_longdbl$d_PRIgldbl" in "$define$define$define") d_Gconvert="sprintf((b),\"%.*\"$sPRIgldbl,(n),(x))" ;; + "$define$define$undef") + d_Gconvert='sprintf((b),"%.*g",(n),(double)(x))' ;; *) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;; esac ;; esac +fi + : see if _fwalk exists set fwalk d__fwalk eval $inlibc @@ -10052,7 +10229,7 @@ int main() ret = read(pd[0], buf, 1); /* Should read EOF */ alarm(0); sprintf(string, "%d\n", ret); - write(3, string, strlen(string)); + write(4, string, strlen(string)); exit(0); } @@ -10066,7 +10243,7 @@ EOCP set try if eval $compile_ok; then echo "$startsh" >mtry - echo "$run ./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry + echo "$run ./try >try.out 2>try.ret 4>try.err || exit 4" >>mtry chmod +x mtry ./mtry >/dev/null 2>&1 case $? in @@ -11068,65 +11245,6 @@ esac -: see if modfl exists -set modfl d_modfl -eval $inlibc - -d_modfl_pow32_bug="$undef" - -case "$d_longdbl$d_modfl" in -$define$define) - $cat <try.c < -#include -int main() { - long double nv = 4294967303.15; - long double v, w; - v = modfl(nv, &w); -#ifdef __GLIBC__ - printf("glibc"); -#endif - printf(" %"$sPRIfldbl" %"$sPRIfldbl" %"$sPRIfldbl"\n", nv, v, w); - return 0; -} -EOCP - case "$osname:$gccversion" in - aix:) saveccflags="$ccflags" - ccflags="$ccflags -qlongdouble" ;; # to avoid core dump - esac - set try - if eval $compile; then - foo=`$run ./try` - case "$foo" in - *" 4294967303.150000 1.150000 4294967302.000000") - echo >&4 "Your modfl() is broken for large values." - d_modfl_pow32_bug="$define" - case "$foo" in - glibc) echo >&4 "You should upgrade your glibc to at least 2.2.2 to get a fixed modfl()." - ;; - esac - ;; - *" 4294967303.150000 0.150000 4294967303.000000") - echo >&4 "Your modfl() seems okay for large values." - ;; - *) echo >&4 "I don't understand your modfl() at all." - d_modfl="$undef" - ;; - esac - $rm -f try.* try core core.try.* - else - echo "I cannot figure out whether your modfl() is okay, assuming it isn't." - d_modfl="$undef" - fi - case "$osname:$gccversion" in - aix:) ccflags="$saveccflags" ;; # restore - esac - ;; -esac - : see if mprotect exists set mprotect d_mprotect eval $inlibc @@ -13472,14 +13590,19 @@ $cat <try.c <try.c < #define U32 $u32type #define BYTEORDER 0x$byteorder #define U8 $u8type +#include +#ifdef SIGBUS +$signal_t bletch(s) int s; { exit(4); } +#endif int main() { #if BYTEORDER == 0x1234 || BYTEORDER == 0x4321 - U8 buf[] = "\0\0\0\1\0\0\0\0"; + U8 buf[8]; U32 *up; int i; @@ -13490,6 +13613,19 @@ int main() { fflush(stdout); +#ifdef SIGBUS + signal(SIGBUS, bletch); +#endif + + buf[0] = 0; + buf[1] = 0; + buf[2] = 0; + buf[3] = 1; + buf[5] = 0; + buf[6] = 0; + buf[7] = 0; + buf[8] = 1; + for (i = 0; i < 4; i++) { up = (U32*)(buf + i); if (! ((*up == 1 << (8*i)) || /* big-endian */ @@ -13536,7 +13672,6 @@ EOM d_u32align="$define" ;; esac - $rm -f core core.try.* try.core else rp='Can you access character data at unaligned addresses?' dflt='n' @@ -13546,6 +13681,9 @@ else *) d_u32align="$define" ;; esac fi +$rm -f core core.try.* try.core +;; +esac : see if ualarm exists set ualarm d_ualarm @@ -15555,7 +15693,7 @@ $cat >>signal_cmd <<'EOS' set signal if eval $compile_ok; then - $run ./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst + $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | $uniq | $awk -f signal.awk >signal.lst else echo "(I can't seem be able to compile the whole test program)" >&4 echo "(I'll try it in little pieces.)" >&4 @@ -15589,7 +15727,7 @@ EOCP done if $test -s signal.ls1; then $cat signal.nsg signal.ls1 | - $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst + $sort -n | $uniq | $awk -f signal.awk >signal.lst fi fi @@ -16041,6 +16179,20 @@ eval $inhdr : see if ndbm.h is available set ndbm.h t_ndbm eval $inhdr + +case "$t_ndbm" in +$undef) + # Some Linux distributions such as RedHat 7.1 put the + # ndbm.h header in /usr/include/gdbm/ndbm.h. + if $test -f /usr/include/gdbm/ndbm.h; then + echo ' found.' + ccflags="$ccflags -I/usr/include/gdbm" + cppflags="$cppflags -I/usr/include/gdbm" + t_ndbm=$define + fi + ;; +esac + case "$t_ndbm" in $define) : see if dbm_open exists @@ -16512,7 +16664,7 @@ find_extensions=' else if $test -d $xxx -a $# -lt 10; then set $1$xxx/ $*; - cd $xxx; + cd "$xxx"; eval $find_extensions; cd ..; shift; @@ -16522,21 +16674,23 @@ find_extensions=' esac; done' tdir=`pwd` -cd $rsrc/ext +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" +# Encode::JP needs an explicit mention for the same reason +# --jhi 2002-02-23 +known_extensions="$known_extensions threads/shared Encode/JP" set X $nonxs_extensions shift nonxs_extensions="$*" set X $known_extensions shift known_extensions="$*" -cd $tdir +cd "$tdir" : Now see which are supported on this system. avail_ext='' @@ -17785,7 +17939,7 @@ echo " " exec 1>&4 pwd=`pwd` . ./UU/extract -cd $pwd +cd "$pwd" if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then dflt=y