This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Do not invert a NULL cp_list.
[perl5.git] / Configure
index 29a6152..293ef61 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -28,7 +28,7 @@
 # See Porting/pumpkin.pod for more information on metaconfig.
 #
 
-# Generated on Wed Jan 22 12:03:46 CET 2014 [metaconfig 3.5 PL0]
+# Generated on Wed Apr  9 12:24:24 CEST 2014 [metaconfig 3.5 PL0]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -206,18 +206,18 @@ ccsymbols=''
 cppccsymbols=''
 cppsymbols=''
 from=''
+hostgenerate=''
+hostosname=''
+hostperl=''
 run=''
 targetarch=''
 targetdir=''
+targetenv=''
 targethost=''
 targetmkdir=''
 targetport=''
 to=''
 usecrosscompile=''
-hostperl=''
-hostgenerate=''
-hostosname=''
-targetsh=''
 extern_C=''
 mistrustnm=''
 usedevel=''
@@ -1167,6 +1167,7 @@ scriptdirexp=''
 selectminbits=''
 selecttype=''
 sh=''
+targetsh=''
 sig_count=''
 sig_name=''
 sig_name_init=''
@@ -2840,6 +2841,9 @@ esac
 if $test "X$targethost" = "X"; then
     targethost=""
 fi
+if $test "X$targetenv" = "X"; then
+    targetenv=""
+fi
 case "$usecrosscompile" in
 $define|true|[yY]*)
        $echo "Cross-compiling..."
@@ -2886,13 +2890,14 @@ $define|true|[yY]*)
       cd ..
       cd $src
       src=`pwd`
-      test -d $src/host || mkdir $src/host
-      cd $src/host && rm -rf ./*
+      rm -rf $src/host
+      mkdir $src/host
+      cd $src/host
       $src/Configure -des -Dusedevel -Dmksymlinks
       $make miniperl
       case "$hostgenerate" in
       '') $make generate_uudmap
-          hostgenerate=$src/host/generate_uudmap      
+          hostgenerate=$src/host/generate_uudmap
           ;;
        "$undef") hostgenerate=''
           ;;
@@ -2903,7 +2908,7 @@ $define|true|[yY]*)
     hostosname=`$hostperl -le 'print $^O'`
     ;;
 *)
-    usecrosscompile='undef'
+    usecrosscompile="$undef"
     ;;
 esac
 
@@ -3028,11 +3033,11 @@ do
   case "\$f" in
   /*)
     $targetmkdir \`dirname \$f\`
-    $targetto -P $targetport -r $q \$f $targetuser@$targethost:\$f            || exit 1
+    $targetto -P $targetport -r $q \$f $targetuser@$targethost:\$f           2>/dev/null  || exit 1
     ;;
   *)
     $targetmkdir $targetdir/\`dirname \$f\`
-    $targetto -P $targetport -r $q \$f $targetuser@$targethost:$targetdir/\$f  2>/dev/null || exit 1
+    $targetto -P $targetport -r $q \$f $targetuser@$targethost:$targetdir/\$f 2>/dev/null || exit 1
     ;;
   esac
 done
@@ -3114,7 +3119,7 @@ EOF
 *)     run=''
        to=:
        from=:
-       usecrosscompile='undef'
+       usecrosscompile="$undef"
        targetarch=''
        ;;
 esac
@@ -3543,23 +3548,40 @@ EOM
         *)  hostarch=$osname
             case "$targetarch" in
                 nto*|*-nto-*)
-                    osname=nto
+                    # Will load qnx.sh, which should change osname to nto
+                    osname=qnx
+                    osvers=''
                     ;;
                 *linux-android*)
                     # Catch arm-linux-androideabi, mipsel-linux-android,
                     # and i686-linux-android
                     osname=linux-android
+                    osvers=''
                     ;;
                 *linux*)
                     # Something like arm-linux-gnueabihf is really just
                     # plain linux.
                     osname=linux
+                    osvers=''
+                    ;;
+                *solaris*|*sunos*)
+                    osname=solaris
+                    # XXX perhaps we should just assume
+                    # osvers to be 2, or maybe take the value
+                    # from targetarch. Using $run before the
+                    # hints are run is somewhat icky.
+                    set X `$run $uname -a 2>/dev/null`
+                    shift
+                    case "$3" in
+                        5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+                        *)  osvers="$3" ;;
+                    esac
                     ;;
                 *)
-                    osname=`echo $targetarch|sed 's,^[^-]*-,,'`
+                   osname=`echo $targetarch|sed 's,^[^-]*-,,'`
+                   osvers=''
                 ;;
             esac
-            osvers=''
             ;;
         esac
 
@@ -4621,6 +4643,22 @@ case "$gccversion" in
     $rm -f try try.*
 esac
 
+# gcc 4.9 by default does some optimizations that break perl.
+# see ticket 121505.
+#
+# The -fwrapv disables those optimizations (and probably others,) so
+# for gcc 4.9 (and later, since the optimizations probably won't go
+# away), add -fwrapv unless the user requests -fno-wrapv, which
+# disables -fwrapv, or if the user requests -fsanitize=undefined,
+# which turns the overflows -fwrapv ignores into runtime errors.
+case "$gccversion" in
+4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*)
+    case "$ccflags" in
+    *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;;
+    *) ccflags="$ccflags -fwrapv" ;;
+    esac
+esac
+
 : What should the include directory be ?
 : Use sysroot if set, so findhdr looks in the right place.
 echo " "
@@ -7955,13 +7993,13 @@ yes)
                if $contains $tlook $tf >/dev/null 2>&1; then
                        tval=true;
                elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then
-                       echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
+                       echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p() && p() != (void *)main) 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$_exe >/dev/null 2>&1 || tval=false; };
                        $rm_try;
                fi;
        else
-               echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
+               echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p() && p() != (void *)main) return(0); else return(1); }"> try.c;
                $cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true;
                $rm_try;
        fi;
@@ -19713,9 +19751,9 @@ EOCP
                    if $test "X$targethost" != X; then
                        $to tryp.c
                        $to tryp
-                       $run "cat tryp.c | ./tryp" 2>/dev/null > tryp.out
+                       $run "cat tryp.c | ./tryp " 2>/dev/null > tryp.out
                    else
-                       $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
+                       $cat tryp.c | $run ./tryp   2>/dev/null > tryp.out
                    fi
                    if cmp tryp.c tryp.out >/dev/null 2>&1; then
                       $cat >&4 <<EOM
@@ -19782,10 +19820,10 @@ EOCP
            $rm -f tryp.out
            if $test "X$targethost" != X; then
                $to tryp.c
-                $to tryp
-                $run "cat tryp.c | ./tryp" 2>/dev/null > tryp.out
+               $to tryp
+               $run "cat tryp.c | ./tryp " 2>/dev/null > tryp.out
            else
-               $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
+               $cat tryp.c | $run ./tryp   2>/dev/null > tryp.out
            fi
            if cmp tryp.c tryp.out >/dev/null 2>&1; then
               $cat >&4 <<EOM
@@ -23464,13 +23502,13 @@ h_fcntl='$h_fcntl'
 h_sysfile='$h_sysfile'
 hint='$hint'
 hostcat='$hostcat'
+hostgenerate='$hostgenerate'
+hostosname='$hostosname'
+hostperl='$hostperl'
 html1dir='$html1dir'
 html1direxp='$html1direxp'
 html3dir='$html3dir'
 html3direxp='$html3direxp'
-hostgenerate='$hostgenerate'
-hostperl='$hostperl'
-hostosname='$hostosname'
 i16size='$i16size'
 i16type='$i16type'
 i32size='$i32size'
@@ -23842,6 +23880,7 @@ tail='$tail'
 tar='$tar'
 targetarch='$targetarch'
 targetdir='$targetdir'
+targetenv='$targetenv'
 targethost='$targethost'
 targetmkdir='$targetmkdir'
 targetport='$targetport'