X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/5129fff43c4fe08cb17d8789b8a5c778039a25c3..b0a2e8e64dee1b1bd00055b3c5b69e2c3c888f55:/Configure diff --git a/Configure b/Configure index ed90386..b282a16 100755 --- a/Configure +++ b/Configure @@ -17,10 +17,16 @@ # comp.sources.misc and is available on CPAN under authors/id/RAM so # you may fetch it yourself from your nearest archive site.) # +# +# Though this script was generated by metaconfig, it is OK to send +# patches against it. It's up to the Configure pumpkin to backport +# the patch to the metaunits if it is accepted. +# See Porting/pumpkin.pod for more information on metaconfig. +# # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Sat May 24 10:07:39 EET DST 2003 [metaconfig 3.0 PL70] +# Generated on Tue Oct 18 16:11:43 CEST 2005 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ </dev/null`" in - ij) up='[A-Z]' - low='[a-z]' +*) # There is a discontinuity in EBCDIC between 'R' and 'S' + # (0xd9 and 0xe2), therefore that is a nice testing point. + if test "X$up" = X -o "X$low" = X; then + case "`echo RS | $tr '[R-S]' '[r-s]' 2>/dev/null`" in + rs) up='[A-Z]' + low='[a-z]' ;; esac - fi + fi if test "X$up" = X -o "X$low" = X; then - case "`echo IJ | $tr I-J i-j 2>/dev/null`" in - ij) up='A-Z' + case "`echo RS | $tr R-S r-s 2>/dev/null`" in + rs) up='A-Z' low='a-z' ;; esac - fi + fi if test "X$up" = X -o "X$low" = X; then - case "`echo IJ | od -x 2>/dev/null`" in - *C9D1*|*c9d1*) + case "`echo RS | od -x 2>/dev/null`" in + *D9E2*|*d9e2*) echo "Hey, this might be EBCDIC." >&4 if test "X$up" = X -o "X$low" = X; then - case "`echo IJ | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in - ij) up='[A-IJ-RS-Z]' - low='[a-ij-rs-z]' + case "`echo RS | $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in + rs) up='[A-IJ-RS-Z]' + low='[a-ij-rs-z]' ;; esac fi if test "X$up" = X -o "X$low" = X; then - case "`echo IJ | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in - ij) up='A-IJ-RS-Z' - low='a-ij-rs-z' + case "`echo RS | $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in + rs) up='A-IJ-RS-Z' + low='a-ij-rs-z' ;; esac fi @@ -2917,8 +2935,8 @@ ABYZ) esac fi esac -case "`echo IJ | $tr \"$up\" \"$low\" 2>/dev/null`" in -ij) +case "`echo RS | $tr \"$up\" \"$low\" 2>/dev/null`" in +rs) echo "Using $up and $low to convert case." >&4 ;; *) @@ -3084,7 +3102,9 @@ EOM aix) osname=aix tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1` case "$tmp" in - 'not found') osvers="$4"."$3" ;; + # oslevel can fail with: + # oslevel: Unable to acquire lock. + *not\ found) osvers="$4"."$3" ;; '<3240'|'<>3240') osvers=3.2.0 ;; '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;; '=3250'|'>3250') osvers=3.2.5 ;; @@ -3106,7 +3126,7 @@ EOM domainos) osname=apollo osvers="$3" ;; - dgux) osname=dgux + dgux) osname=dgux osvers="$3" ;; dynixptx*) osname=dynixptx @@ -3114,23 +3134,25 @@ EOM ;; freebsd) osname=freebsd osvers="$3" ;; - genix) osname=genix ;; - hp*) osname=hpux + genix) osname=genix ;; + gnu) osname=gnu + osvers="$3" ;; + hp*) osname=hpux osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'` ;; - irix*) osname=irix + irix*) osname=irix case "$3" in 4*) osvers=4 ;; 5*) osvers=5 ;; *) osvers="$3" ;; esac ;; - linux) osname=linux + linux) osname=linux case "$3" in *) osvers="$3" ;; esac ;; - MiNT) osname=mint + MiNT) osname=mint ;; netbsd*) osname=netbsd osvers="$3" @@ -3461,12 +3483,15 @@ esac : who configured the system cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1` -cf_by=`(logname) 2>/dev/null` case "$cf_by" in "") - cf_by=`(whoami) 2>/dev/null` + cf_by=`(logname) 2>/dev/null` case "$cf_by" in - "") cf_by=unknown ;; + "") + cf_by=`(whoami) 2>/dev/null` + case "$cf_by" in + "") cf_by=unknown ;; + esac ;; esac ;; esac @@ -3676,22 +3701,22 @@ set d_oldpthreads eval $setvar -case "$usethreads" in -"$define"|true|[yY]*) : Look for a hint-file generated 'call-back-unit'. If the : 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 - else +if $test -f usethreads.cbu; then + echo "Your platform has some specific hints regarding threaded builds, using them..." + . ./usethreads.cbu +else + case "$usethreads" in + "$define"|true|[yY]*) $cat </dev/null 2>&1 then + # Interactive Systems (ISC) POSIX mode. dflt="$dflt -posix" fi ;; @@ -4720,7 +4746,7 @@ default|recommended) if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then echo "Yes, it does." 2>&1 case "$ccflags" in - *strict-aliasing*) + *strict-aliasing*) echo "Leaving current flags $ccflags alone." 2>&1 ;; *) dflt="$dflt -fno-strict-aliasing" ;; @@ -4730,6 +4756,40 @@ default|recommended) fi ;; 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 + + echo "Checking if your compiler accepts -Wdeclaration-after-statement" 2>&1 + echo 'int main(void) { return 0; }' > gcctest.c + if $cc -Wdeclaration-after-statement -o gcctest gcctest.c; then + echo "Yes, it does." 2>&1 + case "$ccflags" in + *-Wdeclaration-after-statement*) + echo "Leaving current flags $ccflags alone." 2>&1 + ;; + *) dflt="$dflt -Wdeclaration-after-statement" ;; + esac + else + echo "Nope, it doesn't, but that's ok." 2>&1 + fi + ;; + esac ;; esac @@ -4741,8 +4801,8 @@ for thisincl in $inclwanted; do if $test -d $thisincl; then if $test x$thisincl != x$usrinc; then case "$dflt" in - *" -I$thisincl "*);; - *) dflt="$dflt -I$thisincl ";; + *" -I$thisincl "*);; + *) dflt="$dflt -I$thisincl ";; esac fi fi @@ -4873,7 +4933,7 @@ esac for thislibdir in $libpth; do case " $loclibpth " in *" $thislibdir "*) - case "$dflt " in + case "$dflt " in *"-L$thislibdir "*) ;; *) dflt="$dflt -L$thislibdir" ;; esac @@ -5450,15 +5510,15 @@ EOM ;; esac -case "$use64bitint" in -"$define"|true|[yY]*) : Look for a hint-file generated 'call-back-unit'. If the : user has specified that a 64-bit perl is to be built, : we may need to set or change some other defaults. - if $test -f use64bitint.cbu; then - echo "Your platform has some specific hints for 64-bit integers, using them..." - . ./use64bitint.cbu - fi +if $test -f use64bitint.cbu; then + echo "Your platform has some specific hints regarding 64-bit integers, using them..." + . ./use64bitint.cbu +fi +case "$use64bitint" in +"$define"|true|[yY]*) case "$longsize" in 4) case "$archname64" in '') archname64=64int ;; @@ -5468,15 +5528,15 @@ case "$use64bitint" in ;; esac -case "$use64bitall" in -"$define"|true|[yY]*) : Look for a hint-file generated 'call-back-unit'. If the : user has specified that a maximally 64-bit perl is to be built, : we may need to set or change some other defaults. - if $test -f use64bitall.cbu; then - echo "Your platform has some specific hints for 64-bit builds, using them..." - . ./use64bitall.cbu - fi +if $test -f use64bitall.cbu; then + echo "Your platform has some specific hints regarding 64-bit builds, using them..." + . ./use64bitall.cbu +fi +case "$use64bitall" in +"$define"|true|[yY]*) case "$longsize" in 4) case "$archname64" in ''|64int) archname64=64all ;; @@ -5491,7 +5551,7 @@ $undef:$define) cat >&4 < /dev/null 2>&1; then nm_so_opt='--dynamic' fi @@ -7357,9 +7440,9 @@ eval $inhdr : is a C symbol defined? csym='tlook=$1; case "$3" in --v) tf=libc.tmp; tc=""; tdc="";; --a) tf=libc.tmp; tc="[0]"; tdc="[]";; -*) tlook="^$1\$"; tf=libc.list; tc=""; tdc="()";; +-v) tf=libc.tmp; tdc="";; +-a) tf=libc.tmp; tdc="[]";; +*) tlook="^$1\$"; tf=libc.list; tdc="()";; esac; tx=yes; case "$reuseval-$4" in @@ -7373,16 +7456,15 @@ yes) if $contains $tlook $tf >/dev/null 2>&1; then tval=true; elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then - echo "int main() { extern void *$1$tdc; return(&$1$tc ? 0 : 1); }" > try.c; + echo "void *(*(p()))$tdc { extern void *$1$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 >/dev/null 2>&1 || tval=false; }; - $rm -f try try.c core; + $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; fi; else - echo "#include " > try.c; - echo "int main() { extern void *$1$tdc; return(&$1$tc ? 0 : 1); }" > try.c; + echo "void *(*(p()))$tdc { extern void *$1$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 try.c; + $rm -f try$_exe try.c; fi; ;; *) @@ -7578,7 +7660,7 @@ EOM '') dflt="$dflt +vnocompatwarnings" ;; esac ;; - linux|irix*) dflt='-shared' ;; + linux|irix*|gnu*) dflt='-shared' ;; next) dflt='none' ;; solaris) dflt='-G' ;; sunos) dflt='-assert nodefinitions' ;; @@ -7625,11 +7707,9 @@ say "none". EOM case "$ccdlflags" in '') case "$osname" in - hpux) dflt='-Wl,-E' ;; - linux) dflt='-rdynamic' ;; - next) dflt='none' ;; - sunos) dflt='none' ;; - *) dflt='none' ;; + linux|hpux|gnu*) dflt='-Wl,-E' ;; + next|sunos) dflt='none' ;; + *) dflt='none' ;; esac ;; ' ') dflt='none' ;; *) dflt="$ccdlflags" ;; @@ -7688,7 +7768,7 @@ any other libraries needed on this system (such as -lm, etc.). Since your system supports dynamic loading, it is probably possible to build a shared libperl.$so. If you will have more than one executable linked to libperl.$so, this will significantly reduce the size of each -executable, but it may have a noticeable affect on performance. The +executable, but it may have a noticeable effect on performance. The default is probably sensible for your system. $also @@ -7724,7 +7804,7 @@ true) dflt=libperl.5.$so # XXX How handle the --version stuff for MAB? ;; - linux*) # ld won't link with a bare -lperl otherwise. + linux*|gnu*) # ld won't link with a bare -lperl otherwise. dflt=libperl.$so ;; cygwin*) # ld links against an importlib @@ -7808,10 +7888,10 @@ if "$useshrplib"; then solaris) xxx="-R $shrpdir" ;; - freebsd|netbsd|openbsd) + freebsd|netbsd|openbsd|interix) xxx="-Wl,-R$shrpdir" ;; - bsdos|linux|irix*|dec_osf) + bsdos|linux|irix*|dec_osf|gnu*) xxx="-Wl,-rpath,$shrpdir" ;; next) @@ -8556,11 +8636,11 @@ else fi : determine where add-on html pages go -: There is no standard location, so try to copy the previously-selected +: There is no standard location, so try to copy the previously-selected : directory structure for the core html pages. -case "$sitehtml1" in -'') dflt=`echo "$html1dir" | $sed "s#^$prefix#$siteprefix#"` ;; -*) dflt=$sitehtml1 ;; +case "$sitehtml1dir" in +'') dflt=`echo "$html1dir" | $sed "s#^$prefix#$siteprefix#"` ;; +*) dflt=$sitehtml1dir ;; esac case "$dflt" in ''|' ') dflt=none ;; @@ -8568,23 +8648,21 @@ esac fn=dn+~ rp='Pathname where the site-specific html pages should be installed?' . ./getfile -sitehtml1="$ans" -sitehtml1exp="$ansexp" -: Use ' ' for none so value is preserved next time through Configure -$test X"$sitehtml1" = "X" && sitehtml1=' ' +sitehtml1dir="$ans" +sitehtml1direxp="$ansexp" : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installsitehtml1=`echo "$sitehtml1exp" | $sed "s#^$prefix#$installprefix#"` + installsitehtml1dir=`echo $sitehtml1direxp | $sed "s#^$prefix#$installprefix#"` else - installsitehtml1="$sitehtml1exp" + installsitehtml1dir="$sitehtml1direxp" fi : determine where add-on library html pages go : There is no standard location, so try to copy the previously-selected : directory structure for the core html pages. -case "$sitehtml3" in -'') dflt=`echo "$html3dir" | $sed "s#^$prefix#$siteprefix#"` ;; -*) dflt=$sitehtml3 ;; +case "$sitehtml3dir" in +'') dflt=`echo "$html3dir" | $sed "s#^$prefix#$siteprefix#"` ;; +*) dflt=$sitehtml3dir ;; esac case "$dflt" in ''|' ') dflt=none ;; @@ -8592,21 +8670,19 @@ esac fn=dn+~ rp='Pathname where the site-specific library html pages should be installed?' . ./getfile -sitehtml3="$ans" -sitehtml3exp="$ansexp" -: Use ' ' for none so value is preserved next time through Configure -$test X"$sitehtml3" = "X" && sitehtml3=' ' +sitehtml3dir="$ans" +sitehtml3direxp="$ansexp" : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installsitehtml3=`echo "$sitehtml3exp" | $sed "s#^$prefix#$installprefix#"` + installsitehtml3dir=`echo $sitehtml3direxp | $sed "s#^$prefix#$installprefix#"` else - installsitehtml3="$sitehtml3exp" + installsitehtml3dir="$sitehtml3direxp" fi : determine where add-on manual pages go -case "$siteman1" in -'') dflt=`echo "$man1dir" | $sed "s#^$prefix#$siteprefix#"` ;; -*) dflt=$siteman1 ;; +case "$siteman1dir" in +'') dflt=`echo $man1dir | $sed "s#^$prefix#$siteprefix#"` ;; +*) dflt=$siteman1dir ;; esac case "$dflt" in ''|' ') dflt=none ;; @@ -8614,21 +8690,19 @@ esac fn=dn+~ rp='Pathname where the site-specific manual pages should be installed?' . ./getfile -siteman1="$ans" -siteman1exp="$ansexp" -: Use ' ' for none so value is preserved next time through Configure -$test X"$siteman1" = "X" && siteman1=' ' +siteman1dir="$ans" +siteman1direxp="$ansexp" : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installsiteman1=`echo "$siteman1exp" | $sed "s#^$prefix#$installprefix#"` + installsiteman1dir=`echo $siteman1direxp | $sed "s#^$prefix#$installprefix#"` else - installsiteman1="$siteman1exp" + installsiteman1dir="$siteman1direxp" fi : determine where add-on library man pages go -case "$siteman3" in -'') dflt=`echo "$man3dir" | $sed "s#^$prefix#$siteprefix#"` ;; -*) dflt=$siteman3 ;; +case "$siteman3dir" in +'') dflt=`echo $man3dir | $sed "s#^$prefix#$siteprefix#"` ;; +*) dflt=$siteman3dir ;; esac case "$dflt" in ''|' ') dflt=none ;; @@ -8636,15 +8710,13 @@ esac fn=dn+~ rp='Pathname where the site-specific library manual pages should be installed?' . ./getfile -siteman3="$ans" -siteman3exp="$ansexp" -: Use ' ' for none so value is preserved next time through Configure -$test X"$siteman3" = "X" && siteman3=' ' +siteman3dir="$ans" +siteman3direxp="$ansexp" : Change installation prefix, if necessary. if $test X"$prefix" != X"$installprefix"; then - installsiteman3=`echo "$siteman3exp" | $sed "s#^$prefix#$installprefix#"` + installsiteman3dir=`echo $siteman3direxp | $sed "s#^$prefix#$installprefix#"` else - installsiteman3="$siteman3exp" + installsiteman3dir="$siteman3direxp" fi : determine where add-on public executable scripts go @@ -8862,14 +8934,16 @@ EOM esac set uselargefiles eval $setvar -case "$uselargefiles" in -"$define") : Look for a hint-file generated 'call-back-unit'. If the : user has specified that a large files perl is to be built, : we may need to set or change some other defaults. +if $test -f uselargefiles.cbu; then + echo "Your platform has some specific hints regarding large file builds, using them..." + . ./uselargefiles.cbu +fi +case "$uselargefiles" in +"$define") if $test -f uselargefiles.cbu; then - echo "Your platform has some specific hints for large file builds, using them..." - . ./uselargefiles.cbu echo " " echo "Rechecking to see how big your file offsets are..." >&4 $cat >try.c <&4 +$cat >attrib.c <<'EOCP' +#include +void my_special_printf(char* pat,...) __attribute__((__format__(__printf__,1,2))); +EOCP +if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then + if $contains 'warning' attrib.out >/dev/null 2>&1; then + echo "Your C compiler doesn't support __attribute__((format))." + val="$undef" + else + echo "Your C compiler supports __attribute__((format))." + val="$define" + fi +else + echo "Your C compiler doesn't seem to understand __attribute__ at all." + val="$undef" +fi +;; +*) val="$d_attribute_format" ;; +esac +set d_attribute_format +eval $setvar +$rm -f attrib* + +: Look for GCC-style attribute malloc +case "$d_attribute_malloc" in +'') +echo " " +echo "Checking whether your compiler can handle __attribute__((malloc)) ..." >&4 +$cat >attrib.c <<'EOCP' +#include +char *go_get_some_memory( int how_many_bytes ) __attribute__((malloc)); +EOCP +if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then + if $contains 'warning' attrib.out >/dev/null 2>&1; then + echo "Your C compiler doesn't support __attribute__((malloc))." + val="$undef" + else + echo "Your C compiler supports __attribute__((malloc))." + val="$define" + fi +else + echo "Your C compiler doesn't seem to understand __attribute__ at all." + val="$undef" +fi +;; +*) val="$d_attribute_malloc" ;; +esac +set d_attribute_malloc +eval $setvar +$rm -f attrib* + +: Look for GCC-style attribute nonnull +case "$d_attribute_nonnull" in +'') +echo " " +echo "Checking whether your compiler can handle __attribute__((nonnull(1))) ..." >&4 +$cat >attrib.c <<'EOCP' +#include +void do_something (char *some_pointer,...) __attribute__((nonnull(1))); +EOCP +if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then + if $contains 'warning' attrib.out >/dev/null 2>&1; then + echo "Your C compiler doesn't support __attribute__((nonnull))." + val="$undef" + else + echo "Your C compiler supports __attribute__((nonnull))." + val="$define" + fi +else + echo "Your C compiler doesn't seem to understand __attribute__ at all." + val="$undef" +fi +;; +*) val="$d_attribute_nonnull" ;; +esac +set d_attribute_nonnull +eval $setvar +$rm -f attrib* + +: Look for GCC-style attribute noreturn +case "$d_attribute_noreturn" in +'') +echo " " +echo "Checking whether your compiler can handle __attribute__((noreturn)) ..." >&4 +$cat >attrib.c <<'EOCP' +#include +void fall_over_dead( void ) __attribute__((noreturn)); +EOCP +if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then + if $contains 'warning' attrib.out >/dev/null 2>&1; then + echo "Your C compiler doesn't support __attribute__((noreturn))." + val="$undef" + else + echo "Your C compiler supports __attribute__((noreturn))." + val="$define" + fi +else + echo "Your C compiler doesn't seem to understand __attribute__ at all." + val="$undef" +fi +;; +*) val="$d_attribute_noreturn" ;; +esac +set d_attribute_noreturn +eval $setvar +$rm -f attrib* + +: Look for GCC-style attribute pure +case "$d_attribute_pure" in +'') +echo " " +echo "Checking whether your compiler can handle __attribute__((pure)) ..." >&4 +$cat >attrib.c <<'EOCP' +#include +int square( int n ) __attribute__((pure)); +EOCP +if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then + if $contains 'warning' attrib.out >/dev/null 2>&1; then + echo "Your C compiler doesn't support __attribute__((pure))." + val="$undef" + else + echo "Your C compiler supports __attribute__((pure))." + val="$define" + fi +else + echo "Your C compiler doesn't seem to understand __attribute__ at all." + val="$undef" +fi +;; +*) val="$d_attribute_pure" ;; +esac +set d_attribute_pure +eval $setvar +$rm -f attrib* + +: Look for GCC-style attribute unused +case "$d_attribute_unused" in +'') +echo " " +echo "Checking whether your compiler can handle __attribute__((unused)) ..." >&4 +$cat >attrib.c <<'EOCP' +#include +int do_something( int dummy __attribute__((unused)), int n ); +EOCP +if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then + if $contains 'warning' attrib.out >/dev/null 2>&1; then + echo "Your C compiler doesn't support __attribute__((unused))." + val="$undef" + else + echo "Your C compiler supports __attribute__((unused))." + val="$define" + fi +else + echo "Your C compiler doesn't seem to understand __attribute__ at all." + val="$undef" +fi +;; +*) val="$d_attribute_unused" ;; +esac +set d_attribute_unused +eval $setvar +$rm -f attrib* + +: Look for GCC-style attribute warn_unused_result +case "$d_attribute_warn_unused_result" in +'') echo " " -echo "Checking whether your compiler can handle __attribute__ ..." >&4 +echo "Checking whether your compiler can handle __attribute__((warn_unused_result)) ..." >&4 $cat >attrib.c <<'EOCP' #include -void croak (char* pat,...) __attribute__((__format__(__printf__,1,2),noreturn)); +int I_will_not_be_ignored(void) __attribute__((warn_unused_result)); EOCP if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then if $contains 'warning' attrib.out >/dev/null 2>&1; then - echo "Your C compiler doesn't fully support __attribute__." + echo "Your C compiler doesn't support __attribute__((warn_unused_result))." val="$undef" else - echo "Your C compiler supports __attribute__." + echo "Your C compiler supports __attribute__((warn_unused_result))." val="$define" fi else echo "Your C compiler doesn't seem to understand __attribute__ at all." val="$undef" fi -set d_attribut +;; +*) val="$d_attribute_warn_unused_result" ;; +esac +set d_attribute_warn_unused_result eval $setvar $rm -f attrib* @@ -10064,7 +10316,7 @@ int main() i32 = ($xxx) g; /* x86 processors will probably give 0x8000 0000, which is a - sign change. We don't want that. We want to mimic SPARC + sign change. We don't want that. We want to mimic SPARC behavior here, which is to preserve the sign and give back 0x7fff ffff. */ @@ -10253,6 +10505,10 @@ eval $inlibc set class d_class eval $inlibc +: see if clearenv exists +set clearenv d_clearenv +eval $inlibc + hasstruct='varname=$1; struct=$2; shift; shift; while $test $# -ge 2; do case "$1" in @@ -10783,6 +11039,7 @@ int main() { exit(1); } EOM +val=$undef set dirfd if eval $compile; then val="$define" @@ -13896,6 +14153,38 @@ $rm -f ldbl_dig.? set d_ldbl_dig eval $setvar +: see if this is a math.h system +set math.h i_math +eval $inhdr + +d_libm_lib_version="$undef" +case $i_math in + $define) + : check to see if math.h defines _LIB_VERSION + echo " " + echo "Checking to see if your libm supports _LIB_VERSION..." >&4 + $cat >try.c < +#include +int main (int argc, char *argv[]) +{ + printf ("%d\n", _LIB_VERSION); + return (0); + } /* main */ +EOCP + set try + if eval $compile; then + foo=`$run ./try` + echo "Yes, it does ($foo)" >&4 + d_libm_lib_version="$define" + else + echo "No, it does not (probably harmless)\n" >&4 + fi + $rm -f try.* try core core.try.* + ;; + + esac + : see if link exists set link d_link eval $inlibc @@ -13966,6 +14255,14 @@ eval $inlibc set madvise d_madvise eval $inlibc +: see if malloc_size exists +set malloc_size d_malloc_size +eval $inlibc + +: see if malloc_size_good exists +set malloc_good_size d_malloc_good_size +eval $inlibc + : see if mblen exists set mblen d_mblen eval $inlibc @@ -14063,7 +14360,7 @@ eval $inlibc : see if prototype for modfl is available echo " " -set d_modflproto modfl math.h +set d_modflproto modfl $i_math math.h eval $hasproto d_modfl_pow32_bug="$undef" @@ -14239,10 +14536,6 @@ eval $inlibc set munmap d_munmap eval $inlibc -: see if nanosleep exists -set nanosleep d_nanosleep -eval $inlibc - : see if nice exists set nice d_nice eval $inlibc @@ -14564,6 +14857,128 @@ esac $rm -f try.* 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. +if test X"$d_volatile" = X"$define"; then + volatile=volatile +fi +$cat <try.c +#include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif +#$i_string I_STRING +#ifdef I_STRING +# include +#else +# include +#endif +#include +#include +#ifdef SIGFPE +$volatile int bletched = 0; +$signal_t blech(s) int s; { bletched = 1; } +#endif + +int checkit($nvtype d, char *where) { + unsigned char *p = (char *)&d; + unsigned char *end = p + sizeof(d); + int fail = 0; + + while (p < end) + fail += *p++; + + if (!fail) + return 0; + + p = (char *)&d; + printf("No - %s: 0x", where); + while (p < end) + printf ("%02X", *p++); + printf("\n"); + return 1; +} + +int main(int argc, char **argv) { + $nvtype d = 0.0; + int fail = 0; + fail += checkit(d, "0.0"); + + /* The compiler shouldn't be assuming that bletched is 0 */ + d = bletched; + + fail += checkit(d, "bleched"); + +#ifdef SIGFPE + signal(SIGFPE, blech); +#endif + + /* Paranoia - the compiler should have no way of knowing that ANSI says + that argv[argc] will always be NULL. Actually, if it did assume this it + would be buggy, as this is C and main() can be called from elsewhere in + the program. */ + d = argv[argc] ? 1 : 0; + + if (d) { + printf("Odd argv[argc]=%p, d=%g\n", argv[argc], d); + } + + fail += checkit(d, "ternary"); + + memset(&d, sizeof(d), argv[argc] ? 1 : 0); + + if (d != 0.0) { + printf("No - memset doesn't give 0.0\n"); + /* This might just blow up: */ + printf("(gives %g)\n", d); + return 1; + } + +#ifdef SIGFPE + if (bletched) { + printf("No - something bleched\n"); + return 1; + } +#endif + if (fail) { + printf("No - %d fail(s)\n", fail); + return 1; + } + printf("Yes\n"); + return 0; +} +EOP +set try + +d_nv_zero_is_allbits_zero="$undef" +if eval $compile; then + xxx="`$run ./try`" + case "$?" in + 0) + case "$xxx" in + Yes) cat >&4 <&4 <&4 <." >&4 val="$undef" fi -$rm -f try try.c try.h +$rm -f try try.c set d_union_semun eval $setvar : see how to do semctl IPC_STAT case "$d_sem" in $define) - : see whether semctl IPC_STAT can use union semun echo " " $cat > try.h < try.c < try.c < #include #include @@ -15337,15 +15754,16 @@ int main() { return 0; } END - val="$undef" - set try - if eval $compile; then - xxx=`$run ./try` - case "$xxx" in - semun) val="$define" ;; - esac - fi - $rm -f try try.c + set try + if eval $compile; then + xxx=`$run ./try` + case "$xxx" in + semun) val="$define" ;; + esac + fi + $rm -f try try.c + ;; + esac set d_semctl_semun eval $setvar case "$d_semctl_semun" in @@ -15359,7 +15777,10 @@ END esac : see whether semctl IPC_STAT can use struct semid_ds pointer - $cat > try.c <<'END' + val="$undef" + case "$d_semctl_semid_ds" in + '') + $cat > try.c <<'END' #include #include #include @@ -15395,15 +15816,16 @@ int main() { return 0; } END - val="$undef" - set try - if eval $compile; then - xxx=`$run ./try` - case "$xxx" in - semid_ds) val="$define" ;; - esac - fi - $rm -f try try.c + set try + if eval $compile; then + xxx=`$run ./try` + case "$xxx" in + semid_ds) val="$define" ;; + esac + fi + $rm -f try try.c + ;; + esac set d_semctl_semid_ds eval $setvar case "$d_semctl_semid_ds" in @@ -16388,6 +16810,14 @@ esac set strftime d_strftime eval $inlibc +: see if strlcat exists +set strlcat d_strlcat +eval $inlibc + +: see if strlcpy exists +set strlcpy d_strlcpy +eval $inlibc + : see if strtod exists set strtod d_strtod eval $inlibc @@ -16960,10 +17390,10 @@ int main() { buf[1] = 0; buf[2] = 0; buf[3] = 1; + buf[4] = 0; buf[5] = 0; buf[6] = 0; - buf[7] = 0; - buf[8] = 1; + buf[7] = 1; for (i = 0; i < 4; i++) { up = (U32*)(buf + i); @@ -17036,6 +17466,10 @@ eval $inlibc set unordered d_unordered eval $inlibc +: see if unsetenv exists +set unsetenv d_unsetenv +eval $inlibc + : see if usleep exists set usleep d_usleep eval $inlibc @@ -18648,12 +19082,6 @@ rp="What is the type of process ids on this system?" set pid_t pidtype int stdio.h sys/types.h eval $typedef_ask -: Find earliest binary compatible site_perl subdirectory perl can use. -xs_apiversion=$version # The current site_perl version. -: Find earliest pure perl site_perl subdirectory perl can use. -: The versioned directories started at 5.005. -pm_apiversion='5.005' - : see if ar generates random libraries by itself echo " " echo "Checking how to generate random libraries on your machine..." >&4 @@ -18674,7 +19102,9 @@ if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 && $run ./foobar >/dev/null 2>&1; then echo "$ar appears to generate random libraries itself." orderlib=false - ranlib=":" + if [ "X$ranlib" = "X" ]; then + ranlib=":" + fi elif $ar ts bar$_a >/dev/null 2>&1 && $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 && $run ./foobar >/dev/null 2>&1; then @@ -18929,6 +19359,12 @@ int main() { #endif #ifndef NSIG +# ifdef _SIG_MAX +# define NSIG (_SIG_MAX+1) +# endif +#endif + +#ifndef NSIG # ifdef MAXSIG # define NSIG (MAXSIG+1) # endif @@ -18942,7 +19378,7 @@ int main() { #ifndef NSIG # ifdef SIGARRAYSIZE -# define NSIG (SIGARRAYSIZE+1) /* Not sure of the +1 */ +# define NSIG SIGARRAYSIZE /* Assume ary[SIGARRAYSIZE] */ # endif #endif @@ -19427,6 +19863,16 @@ case "$uidsign" in ;; esac + +case "$usesitecustomize" in + $define|true|[Yy]*) + usesitecustomize="$define" + ;; + *) + usesitecustomize="$undef" + ;; + esac + : determine compiler compiler case "$yacc" in '') @@ -19487,10 +19933,6 @@ fi -: see if this is a math.h system -set math.h i_math -eval $inhdr - : see if this is a mntent.h system set mntent.h i_mntent eval $inhdr @@ -19575,13 +20017,13 @@ $echo "Guessing which symbols your C compiler and preprocessor define..." >&4 $cat <<'EOSH' > Cppsym.know a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE -alliant alpha am29000 AM29000 AMD64 amiga AMIGAOS AMIX +alliant alpha am29000 AM29000 AMD64 amd64 amiga AMIGAOS AMIX ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4 BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi bull c cadmus clipper CMU COFF COMPILER_VERSION concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX -CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO +CYGWIN DECC DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel GLIBC GLIBC_MINOR @@ -19633,7 +20075,7 @@ USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64 USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2 USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED USGr4 USGr4_2 -Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286 +Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms x86_64 xenix Xenix286 XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED z8000 @@ -20150,8 +20592,8 @@ case "$noextensions" in *) keepextensions='' echo "You have requested that certain extensions be ignored..." >&4 for i in $avail_ext; do - case " $i " in - " $noextensions ") echo "Ignoring extension $i." ;; + case " $noextensions " in + *" $i "*) echo "Ignoring extension $i." ;; *) echo "Keeping extension $i."; keepextensions="$keepextensions $i" ;; @@ -20521,7 +20963,13 @@ d_archlib='$d_archlib' d_asctime_r='$d_asctime_r' d_atolf='$d_atolf' d_atoll='$d_atoll' -d_attribut='$d_attribut' +d_attribute_format='$d_attribute_format' +d_attribute_malloc='$d_attribute_malloc' +d_attribute_nonnull='$d_attribute_nonnull' +d_attribute_noreturn='$d_attribute_noreturn' +d_attribute_pure='$d_attribute_pure' +d_attribute_unused='$d_attribute_unused' +d_attribute_warn_unused_result='$d_attribute_warn_unused_result' d_bcmp='$d_bcmp' d_bcopy='$d_bcopy' d_bsd='$d_bsd' @@ -20535,6 +20983,7 @@ d_chown='$d_chown' d_chroot='$d_chroot' d_chsize='$d_chsize' d_class='$d_class' +d_clearenv='$d_clearenv' d_closedir='$d_closedir' d_cmsghdr_s='$d_cmsghdr_s' d_const='$d_const' @@ -20676,6 +21125,7 @@ d_isnanl='$d_isnanl' d_killpg='$d_killpg' d_lchown='$d_lchown' d_ldbl_dig='$d_ldbl_dig' +d_libm_lib_version='$d_libm_lib_version' d_link='$d_link' d_localtime_r='$d_localtime_r' d_locconv='$d_locconv' @@ -20685,6 +21135,8 @@ d_longlong='$d_longlong' d_lseekproto='$d_lseekproto' d_lstat='$d_lstat' d_madvise='$d_madvise' +d_malloc_good_size='$d_malloc_good_size' +d_malloc_size='$d_malloc_size' d_mblen='$d_mblen' d_mbstowcs='$d_mbstowcs' d_mbtowc='$d_mbtowc' @@ -20718,10 +21170,10 @@ d_msgsnd='$d_msgsnd' d_msync='$d_msync' d_munmap='$d_munmap' d_mymalloc='$d_mymalloc' -d_nanosleep='$d_nanosleep' d_nice='$d_nice' d_nl_langinfo='$d_nl_langinfo' d_nv_preserves_uv='$d_nv_preserves_uv' +d_nv_zero_is_allbits_zero='$d_nv_zero_is_allbits_zero' d_off64_t='$d_off64_t' d_old_pthread_create_joinable='$d_old_pthread_create_joinable' d_oldpthreads='$d_oldpthreads' @@ -20845,6 +21297,8 @@ d_strerrm='$d_strerrm' d_strerror='$d_strerror' d_strerror_r='$d_strerror_r' d_strftime='$d_strftime' +d_strlcat='$d_strlcat' +d_strlcpy='$d_strlcpy' d_strtod='$d_strtod' d_strtol='$d_strtol' d_strtold='$d_strtold' @@ -20880,6 +21334,7 @@ d_umask='$d_umask' d_uname='$d_uname' d_union_semun='$d_union_semun' d_unordered='$d_unordered' +d_unsetenv='$d_unsetenv' d_usleep='$d_usleep' d_usleepproto='$d_usleepproto' d_ustat='$d_ustat' @@ -21091,21 +21546,21 @@ installprivlib='$installprivlib' installscript='$installscript' installsitearch='$installsitearch' installsitebin='$installsitebin' -installsitehtml1='$installsitehtml1' -installsitehtml3='$installsitehtml3' +installsitehtml1dir='$installsitehtml1dir' +installsitehtml3dir='$installsitehtml3dir' installsitelib='$installsitelib' -installsiteman1='$installsiteman1' -installsiteman3='$installsiteman3' +installsiteman1dir='$installsiteman1dir' +installsiteman3dir='$installsiteman3dir' installsitescript='$installsitescript' installstyle='$installstyle' installusrbinperl='$installusrbinperl' installvendorarch='$installvendorarch' installvendorbin='$installvendorbin' -installvendorhtml1='$installvendorhtml1' -installvendorhtml3='$installvendorhtml3' +installvendorhtml1dir='$installvendorhtml1dir' +installvendorhtml3dir='$installvendorhtml3dir' installvendorlib='$installvendorlib' -installvendorman1='$installvendorman1' -installvendorman3='$installvendorman3' +installvendorman1dir='$installvendorman1dir' +installvendorman3dir='$installvendorman3dir' installvendorscript='$installvendorscript' intsize='$intsize' issymlink='$issymlink' @@ -21215,7 +21670,6 @@ pg='$pg' phostname='$phostname' pidtype='$pidtype' plibpth='$plibpth' -pm_apiversion='$pm_apiversion' pmake='$pmake' pr='$pr' prefix='$prefix' @@ -21286,17 +21740,17 @@ sitearch='$sitearch' sitearchexp='$sitearchexp' sitebin='$sitebin' sitebinexp='$sitebinexp' -sitehtml1='$sitehtml1' -sitehtml1exp='$sitehtml1exp' -sitehtml3='$sitehtml3' -sitehtml3exp='$sitehtml3exp' +sitehtml1dir='$sitehtml1dir' +sitehtml1direxp='$sitehtml1direxp' +sitehtml3dir='$sitehtml3dir' +sitehtml3direxp='$sitehtml3direxp' sitelib='$sitelib' sitelib_stem='$sitelib_stem' sitelibexp='$sitelibexp' -siteman1='$siteman1' -siteman1exp='$siteman1exp' -siteman3='$siteman3' -siteman3exp='$siteman3exp' +siteman1dir='$siteman1dir' +siteman1direxp='$siteman1direxp' +siteman3dir='$siteman3dir' +siteman3direxp='$siteman3direxp' siteprefix='$siteprefix' siteprefixexp='$siteprefixexp' sitescript='$sitescript' @@ -21370,6 +21824,7 @@ usefaststdio='$usefaststdio' useithreads='$useithreads' uselargefiles='$uselargefiles' uselongdouble='$uselongdouble' +usemallocwrap='$usemallocwrap' usemorebits='$usemorebits' usemultiplicity='$usemultiplicity' usemymalloc='$usemymalloc' @@ -21378,8 +21833,10 @@ useopcode='$useopcode' useperlio='$useperlio' useposix='$useposix' usereentrant='$usereentrant' +userelocatableinc='$userelocatableinc' usesfio='$usesfio' useshrplib='$useshrplib' +usesitecustomize='$usesitecustomize' usesocks='$usesocks' usethreads='$usethreads' usevendorprefix='$usevendorprefix' @@ -21396,17 +21853,17 @@ vendorarch='$vendorarch' vendorarchexp='$vendorarchexp' vendorbin='$vendorbin' vendorbinexp='$vendorbinexp' -vendorhtml1='$vendorhtml1' -vendorhtml1exp='$vendorhtml1exp' -vendorhtml3='$vendorhtml3' -vendorhtml3exp='$vendorhtml3exp' +vendorhtml1dir='$vendorhtml1dir' +vendorhtml1direxp='$vendorhtml1direxp' +vendorhtml3dir='$vendorhtml3dir' +vendorhtml3direxp='$vendorhtml3direxp' vendorlib='$vendorlib' vendorlib_stem='$vendorlib_stem' vendorlibexp='$vendorlibexp' -vendorman1='$vendorman1' -vendorman1exp='$vendorman1exp' -vendorman3='$vendorman3' -vendorman3exp='$vendorman3exp' +vendorman1dir='$vendorman1dir' +vendorman1direxp='$vendorman1direxp' +vendorman3dir='$vendorman3dir' +vendorman3direxp='$vendorman3direxp' vendorprefix='$vendorprefix' vendorprefixexp='$vendorprefixexp' vendorscript='$vendorscript' @@ -21417,7 +21874,6 @@ versiononly='$versiononly' vi='$vi' voidflags='$voidflags' xlibpth='$xlibpth' -xs_apiversion='$xs_apiversion' yacc='$yacc' yaccflags='$yaccflags' zcat='$zcat'