Possible NULL pointer reference found by Coverity checks.
[p5sagit/p5-mst-13.2.git] / Configure
index 6419e5f..68dc00e 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 Thu Mar  2 21:01:10 CET 2006 [metaconfig 3.0 PL70]
+# Generated on Wed Mar  8 09:08:03 CET 2006 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -354,6 +354,8 @@ d_attribute_unused=''
 d_attribute_warn_unused_result=''
 d_bcmp=''
 d_bcopy=''
+d_builtin_choose_expr=''
+d_builtin_expect=''
 d_bzero=''
 d_casti32=''
 castflags=''
@@ -960,9 +962,13 @@ sPRIgldbl=''
 sSCNfldbl=''
 lseeksize=''
 lseektype=''
+mad=''
 make_set_make=''
 d_mymalloc=''
 freetype=''
+madlyh=''
+madlyobj=''
+madlysrc=''
 mallocobj=''
 mallocsrc=''
 malloctype=''
@@ -10241,6 +10247,71 @@ esac
 set d_bsdsetpgrp
 eval $setvar
 $rm -f try try.*
+: Look for GCC-style __builtin_choose_expr
+case "$d_builtin_choose_expr" in
+'')
+    echo " "
+    echo "Checking whether your compiler can handle __builtin_choose_expr ..." >&4
+    $cat >try.c <<'EOCP'
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#define SYRINX(x) __builtin_choose_expr( x, (1056*2), (103*50) )
+
+int main(void) {
+    assert( SYRINX(1) == 2112 );
+    assert( SYRINX(1) != 5150 );
+    assert( SYRINX(0) == 5150 );
+    assert( SYRINX(0) != 2112 );
+    puts( "All good!" );
+    exit(0);
+}
+
+EOCP
+    set try
+    if eval $compile; then
+       echo "Your C compiler supports __builtin_choose_expr."
+       val="$define"
+    else
+       echo "Your C compiler doesn't seem to understand __builtin_choose_expr."
+       val="$undef"
+    fi
+;;
+*) val="$d_builtin_choose_expr" ;;
+esac
+
+set d_builtin_choose_expr
+eval $setvar
+$rm -f try.* try core core.try.*
+
+: Look for GCC-style __builtin_expect
+case "$d_builtin_expect" in
+'')
+    echo " "
+    echo "Checking whether your compiler can handle __builtin_expect ..." >&4
+    $cat >builtin.c <<'EOCP'
+int main(void) {
+    int n = 50;
+    if ( __builtin_expect(n, 0) ) n = 1;
+}
+EOCP
+    set try
+    if eval $compile; then
+       echo "Your C compiler supports __builtin_choose_expr."
+       val="$define"
+    else
+       echo "Your C compiler doesn't seem to understand __builtin_choose_expr."
+       val="$undef"
+    fi
+    ;;
+*) val="$d_builtin_expect" ;;
+esac
+
+set d_builtin_expect
+eval $setvar
+$rm -f try.* try core core.try.*
+
 : see if bzero exists
 set bzero d_bzero
 eval $inlibc
@@ -18894,6 +18965,34 @@ EOM
 *)  groupstype="$gidtype";;
 esac
 
+
+case "$mad" in
+$define|true|[yY]*)    dflt='y' ;;
+*)                     dflt='n' ;;
+esac
+cat <<EOM
+
+Would you like to build with Misc Attribute Decoration? This is development
+work leading to a Perl 5 to Perl 6 convertor, which imposes a space and speed
+overhead on the interpreter.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+rp='Build Perl with MAD?'
+. ./myread
+case "$ans" in
+y|Y)   val="$define"
+       madlyh='madly.h madly.act madly.tab'
+       madlysrc='madly.c'
+       madlyobj="madly$_o" ;;
+*)     val="$undef"
+       madlyh=''
+       madlysrc=''
+       madlyobj='' ;;
+esac
+set mad
+eval $setvar
+
 echo " "
 echo "Checking if your $make program sets \$(MAKE)..." >&4
 case "$make_set_make" in
@@ -20319,18 +20418,20 @@ chmod +x Cppsym.try
 $eunicefix Cppsym.try
 ./Cppsym < Cppsym.know > Cppsym.true
 : Add in any linux cpp "predefined macros":
-if [[ "$osname" == *linux* ]] && [[ "$gccversion" != "" ]]; then
-  tHdrH=_tmpHdr
-  rm -f $tHdrH'.h' $tHdrH
-  touch $tHdrH'.h'
-  if cpp -dM $tHdrH'.h' > $tHdrH'_cppsym.h' && [ -s $tHdrH'_cppsym.h' ]; then
-     sed 's/#define[\ \  ]*//;s/[\ \     ].*$//' <$tHdrH'_cppsym.h' >$tHdrH'_cppsym.real'
-     if [ -s $tHdrH'_cppsym.real' ]; then
-       cat $tHdrH'_cppsym.real' Cppsym.know | sort | uniq | ./Cppsym | sort | uniq > Cppsym.true
-     fi
-  fi
-  rm -f $tHdrH'.h' $tHdrH'_cppsym.h' $tHdrH'_cppsym.real'
-fi
+case "$osname::$gccversion" in
+  *linux*::*.*)
+    tHdrH=_tmpHdr
+    rm -f $tHdrH'.h' $tHdrH
+    touch $tHdrH'.h'
+    if cpp -dM $tHdrH'.h' > $tHdrH'_cppsym.h' && [ -s $tHdrH'_cppsym.h' ]; then
+       sed 's/#define[\ \  ]*//;s/[\ \     ].*$//' <$tHdrH'_cppsym.h' >$tHdrH'_cppsym.real'
+       if [ -s $tHdrH'_cppsym.real' ]; then
+         cat $tHdrH'_cppsym.real' Cppsym.know | sort | uniq | ./Cppsym | sort | uniq > Cppsym.true
+       fi
+    fi
+    rm -f $tHdrH'.h' $tHdrH'_cppsym.h' $tHdrH'_cppsym.real'
+  ;;
+esac
 : now check the C compiler for additional symbols
 postprocess_cc_v=''
 case "$osname" in
@@ -21170,6 +21271,8 @@ d_bcopy='$d_bcopy'
 d_bsd='$d_bsd'
 d_bsdgetpgrp='$d_bsdgetpgrp'
 d_bsdsetpgrp='$d_bsdsetpgrp'
+d_builtin_choose_expr='$d_builtin_choose_expr'
+d_builtin_expect='$d_builtin_expect'
 d_bzero='$d_bzero'
 d_casti32='$d_casti32'
 d_castneg='$d_castneg'
@@ -21801,12 +21904,16 @@ lpr='$lpr'
 ls='$ls'
 lseeksize='$lseeksize'
 lseektype='$lseektype'
+mad='$mad'
 mail='$mail'
 mailx='$mailx'
 make='$make'
 make_set_make='$make_set_make'
 mallocobj='$mallocobj'
 mallocsrc='$mallocsrc'
+madlyh='$madlyh'
+madlyobj='$madlyobj'
+madlysrc='$madlysrc'
 malloctype='$malloctype'
 man1dir='$man1dir'
 man1direxp='$man1direxp'