X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/4dd8f9b3e73c1cf5316433b1f968dcf927e1f499..59cd0e26eb6c10499b25d783562357dd68cc16f2:/Configure diff --git a/Configure b/Configure index dc7a7bf..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 Fri Jun 1 08:37:13 CEST 2007 [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 @@ -2503,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 2>&1 then # Interactive Systems (ISC) POSIX mode. @@ -5041,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 ;; @@ -5330,7 +5371,7 @@ y) ;; n) echo "OK, that should do.";; esac -$rm_try +$rm_try gcctest.out : define a shorthand compile call compile=' @@ -7576,21 +7617,20 @@ eval $inhdr echo " " echo "Checking for C++..." >&4 -cat >try.c <<'EOCP' +$cat >try.c <<'EOCP' #include int main(void) { #ifdef __cplusplus - printf("define\n"); + return 0; #else - printf("undef\n"); + return 1; #endif - return 0; } EOCP set try -if eval $compile_ok && $run ./try >cplusplus$$; then - val=`$cat cplusplus$$` +if eval $compile_ok && $run ./try; then + val="$define" echo "You are using a C++ compiler." else val="$undef" @@ -10805,36 +10845,73 @@ 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_try set d_vprintf @@ -15040,40 +15117,6 @@ eval $inhdr set nl_langinfo d_nl_langinfo eval $inlibc -: check for length of character -echo " " -case "$charsize" in -'') - echo "Checking to see how big your characters are (hey, you never know)..." >&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_try - : check for volatile keyword echo " " echo 'Checking to see if your C compiler knows about "volatile"...' >&4 @@ -15162,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 @@ -19734,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) @@ -19743,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 @@ -20161,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 @@ -20506,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 @@ -20659,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 @@ -20678,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 @@ -21056,10 +21076,12 @@ 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" +# 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="$*" @@ -21546,7 +21568,6 @@ ccversion='$ccversion' cf_by='$cf_by' cf_email='$cf_email' cf_time='$cf_time' -charsize='$charsize' chgrp='$chgrp' chmod='$chmod' chown='$chown' @@ -22094,6 +22115,7 @@ i64type='$i64type' i8size='$i8size' i8type='$i8type' i_arpainet='$i_arpainet' +i_assert='$i_assert' i_bsdioctl='$i_bsdioctl' i_crypt='$i_crypt' i_db='$i_db'