This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
char can be unsigned, so i8 needs to be signed char.
[perl5.git] / Configure
index ef0d847..e8059b0 100755 (executable)
--- 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 Tue Aug 21 15:53:52 CEST 2007 [metaconfig 3.0 PL70]
+# Generated on Mon Oct  8 10:22:27 CEST 2007 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -2483,6 +2483,19 @@ FOO
        ;;
 esac
 
+# This question was auctioned at YAPC::Europe-2007 in Vienna
+# I never promised you could answer it. I only auctioned the question.
+cat <<FOO
+The following message is sponsored by
+
+  Dresden.pm<--The stars should be here.
+
+Dear Perl user, system administrator or package
+maintainer, the Perl community sends greetings to
+you. Do you (emblematical) greet back [Y/n]? n
+
+FOO
+
 cat <<EOS >trygcc
 $startsh
 EOS
@@ -5032,6 +5045,27 @@ case "$DEBUGGING" in
 both|$define) dflt='-DDEBUGGING'
 esac
 
+: argument order is deliberate, as the flag will start with - which set could
+: think is an option
+checkccflag='check=$1; flag=$2; callback=$3;
+echo " ";
+echo "Checking if your compiler accepts $flag" 2>&1;
+echo "int main(void) { return 0; }" > gcctest.c;
+if $cc -O2 $flag -o gcctest gcctest.c && ./gcctest; then
+    echo "Yes, it does." 2>&1;
+    case "$ccflags" in
+    *$check*)
+       echo "Leaving current flags $ccflags alone." 2>&1
+       ;;
+    *) dflt="$dflt $flag";
+       eval $callback
+       ;;
+    esac
+else
+    echo "Nope, it does not, but that is ok." 2>&1;
+fi
+'
+
 : We will not override a previous value, but we might want to
 : augment a hint file
 case "$hint" in
@@ -5054,40 +5088,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
        ;;
@@ -15177,7 +15199,7 @@ int main() {
 }
 EOCP
 
-i8type=char
+i8type="signed char"
 u8type="unsigned char"
 i8size=1
 u8size=1
@@ -21043,10 +21065,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="$*"