X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=68dc00ef8e063fdf4abc7c54572f1c65e2ea1429;hb=33b5f13c2468a991d2b495f02a62b59163be82af;hp=64ea4210444157517212a1d821f6e4c695fb14e3;hpb=2478f7a0ecfc00f4d83ec0abe7521859385d9893;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index 64ea421..68dc00e 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 Thu Jan 5 22:03:19 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$$ <&4 + $cat >try.c <<'EOCP' +#include +#include +#include + +#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 @@ -15744,9 +15818,9 @@ $define) #endif END : see whether semctl IPC_STAT can use union semun - val="$undef" case "$d_semctl_semun" in '') + val="$undef" $cat > try.c < #include @@ -15785,7 +15859,7 @@ int main() { printf("semctl IPC_STAT failed: errno = %d\n", errno); # ifdef IPC_RMID if (semctl(sem, 0, IPC_RMID, arg) != 0) -# endif /* IPC_RMID */ +# endif /* IPC_RMID */ printf("semctl IPC_RMID failed: errno = %d\n", errno); } else #endif /* IPC_PRIVATE && ... */ @@ -15801,10 +15875,10 @@ END esac fi $rm -f try try.c + set d_semctl_semun + eval $setvar ;; esac - set d_semctl_semun - eval $setvar case "$d_semctl_semun" in $define) echo "You can use union semun for semctl IPC_STAT." >&4 @@ -15816,9 +15890,9 @@ END esac : see whether semctl IPC_STAT can use struct semid_ds pointer - val="$undef" case "$d_semctl_semid_ds" in '') + val="$undef" $cat > try.c <<'END' #include #include @@ -15863,10 +15937,10 @@ END esac fi $rm -f try try.c + set d_semctl_semid_ds + eval $setvar ;; esac - set d_semctl_semid_ds - eval $setvar case "$d_semctl_semid_ds" in $define) echo "You can $also use struct semid_ds* for semctl IPC_STAT." >&4 @@ -18891,6 +18965,34 @@ EOM *) groupstype="$gidtype";; esac + +case "$mad" in +$define|true|[yY]*) dflt='y' ;; +*) dflt='n' ;; +esac +cat <&4 case "$make_set_make" in @@ -19271,6 +19373,12 @@ if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 && if [ "X$ranlib" = "X" ]; then ranlib=":" fi +elif $ar s bar$_a >/dev/null 2>&1 && + $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 && + $run ./foobar >/dev/null 2>&1; then + echo "a table of contents needs to be added with '$ar s'." + orderlib=false + ranlib="$ar s" elif $ar ts bar$_a >/dev/null 2>&1 && $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 && $run ./foobar >/dev/null 2>&1; then @@ -19295,7 +19403,7 @@ else ranlib=":" fi fi -$rm -f foo* bar* +$rm -f foo* bar* : check for type of arguments to select. case "$selecttype" in @@ -20178,7 +20286,7 @@ set prot.h i_prot eval $inhdr echo " " -$echo "Guessing which symbols your C compiler and preprocessor define..." >&4 +$echo "Guessing which symbols your C compiler and preprocessor define..." >&4 $cat <<'EOSH' > Cppsym.know a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370 AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE @@ -20309,6 +20417,21 @@ EOSH chmod +x Cppsym.try $eunicefix Cppsym.try ./Cppsym < Cppsym.know > Cppsym.true +: Add in any linux cpp "predefined macros": +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 @@ -21148,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' @@ -21779,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'