Remove two warnings (sub diag() was redefined, and implict split is
[p5sagit/p5-mst-13.2.git] / Configure
index cd04dae..d907e04 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -839,6 +839,7 @@ installhtml1dir=''
 html3dir=''
 html3direxp=''
 installhtml3dir=''
+i_assert=''
 i_arpainet=''
 i_crypt=''
 db_hashtype=''
@@ -5047,17 +5048,19 @@ esac
 
 : argument order is deliberate, as the flag will start with - which set could
 : think is an option
-checkccflag='check=$1; flag=$2;
+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; then
+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" ;;
+    *) dflt="$dflt $flag";
+       eval $callback
+       ;;
     esac
 else
     echo "Nope, it does not, but that is ok." 2>&1;
@@ -5098,6 +5101,18 @@ default|recommended)
                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
        ;;
 esac
 
@@ -15185,7 +15200,7 @@ int main() {
 }
 EOCP
 
-i8type=char
+i8type="signed char"
 u8type="unsigned char"
 i8size=1
 u8size=1
@@ -20909,6 +20924,10 @@ val=$val3; set i_termios; eval $setvar
 set stddef.h i_stddef
 eval $inhdr
 
+: see if assert.h is available
+set assert.h i_assert
+eval $inhdr
+
 : see if sys/access.h is available
 set sys/access.h i_sysaccess
 eval $inhdr
@@ -22090,6 +22109,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'