X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/7894ad662a3cd2f4ed62524c47717e580145900e..9eafb59736e2d046fbc9fd6762a4ebe03b15288b:/Configure diff --git a/Configure b/Configure index b63287b..576b88d 100755 --- a/Configure +++ b/Configure @@ -16,16 +16,21 @@ # The dist package (which contains metaconfig) is available via SVN: # svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist # +# Though this script was generated by metaconfig from metaunits, it is +# OK to send patches against Configure itself. It's up to the Configure +# pumpkin to backport the patch to the metaunits if it is accepted. +# For more information on patching Configure, see pod/perlhack.pod +# +# The metaunits are also available from the public git repository: +# http://perl5.git.perl.org/metaconfig.git/ or +# $ git clone git://perl5.git.perl.org/metaconfig.git metaconfig # -# Though this script was generated by metaconfig, it is OK to send -# patches against it. It's up to the Configure pumpkin to backport -# the patch to the metaunits if it is accepted. # See Porting/pumpkin.pod for more information on metaconfig. # # $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $ # -# Generated on Tue Aug 18 19:22:01 CEST 2009 [metaconfig 3.5 PL0] +# Generated on Sat Feb 13 19:05:42 CET 2010 [metaconfig 3.5 PL0] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&4 <&4 </dev/null; then + echo "Substituting less -R for less." + less="$less -R" + _less=$less + fi + ;; +esac case "$ln" in ln) echo "Substituting cp for ln." @@ -7135,6 +7152,8 @@ esac : DTrace support dflt_dtrace='/usr/sbin/dtrace' +$test -x /usr/bin/dtrace && dflt_dtrace='/usr/bin/dtrace' + cat <&4 + $cat >try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif +int main() +{ + printf("%d\n", (int)sizeof(char)); + exit(0); +} +EOCP + set try + if eval $compile_ok; then + dflt=`$run ./try` + else + dflt='1' + echo "(I can't seem to compile the test program. Guessing...)" + fi + ;; +*) + dflt="$charsize" + ;; +esac +rp="What is the size of a character (in bytes)?" +. ./myread +charsize="$ans" +$rm_try + +: Check for the number of bits in a character +case "$charbits" in +'') echo "Checking how long a character is (in bits)..." >&4 + $cat >try.c < +int main () +{ + int n; + unsigned char c; + for (c = 1, n = 0; c; c <<= 1, n++) ; + printf ("%d\n", n); + return (0); + } +EOCP + set try + if eval $compile_ok; then + dflt=`$run ./try` + else + dflt='8' + echo "(I can't seem to compile the test program. Guessing...)" + fi + ;; +*) + dflt="$charbits" + ;; +esac +rp="What is the length of a character (in bits)?" +. ./myread +charbits="$ans" +$rm_try +case "$charbits" in +8) ;; +*) cat >&4 << EOM +Your system has an unsigned character size of $charbits bits, which +is rather unusual (normally it is 8 bits). Perl likely will not work +correctly on your system, with subtle bugs in various places. +EOM + rp='Do you really want to continue?' + dflt='n' + . ./myread + case "$ans" in + [yY]) echo >&4 "Okay, continuing." ;; + *) exit 1 ;; + esac +esac + : how do we concatenate cpp tokens here? echo " " echo "Checking to see how your cpp does stuff like concatenate tokens..." >&4 @@ -21123,6 +21222,21 @@ case "$usesitecustomize" in ;; esac +: see if prototypes support variable argument declarations +echo " " +case "$prototype$i_stdarg" in +$define$define) + echo "It appears we'll be able to prototype varargs functions." >&4 + val="$define" + ;; +*) + echo "Too bad... We won't be using prototyped varargs functions..." >&4 + val="$undef" + ;; +esac +set vaproto +eval $setvar + : determine compiler compiler case "$yacc" in '') @@ -21385,11 +21499,11 @@ $eunicefix Cppsym.try ./Cppsym < Cppsym.know > Cppsym.true : Add in any linux cpp "predefined macros": case "$osname::$gccversion" in - *linux*::*.*|*gnukfreebsd*::*.*) + *linux*::*.*|*gnukfreebsd*::*.*|gnu::*.*) tHdrH=_tmpHdr rm -f $tHdrH'.h' $tHdrH touch $tHdrH'.h' - if cpp -dM $tHdrH'.h' > $tHdrH'_cppsym.h' && [ -s $tHdrH'_cppsym.h' ]; then + 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 @@ -21646,9 +21760,7 @@ nonxs_extensions='' : Function to recursively find available extensions, ignoring DynaLoader : NOTE: recursion limit of 10 to prevent runaway in case of symlink madness : In 5.10.1 and later, extensions are stored in directories -: like File-Glob instead of the older File/Glob/. In this scheme, -: IO-Compress does not appear to be an XS extension, but we want -: to install it as one. A.D. 8/2009. +: like File-Glob instead of the older File/Glob/. find_extensions=' for xxx in *; do case "$xxx" in @@ -21656,19 +21768,7 @@ find_extensions=' *) this_ext=`echo $xxx | $sed -e s/-/\\\//g`; leaf=`echo $xxx | $sed -e s/.*-//`; - if $test -d File-Glob; then - $ls -1 $xxx > $$.tmp; - if $contains "\.xs$" $$.tmp > /dev/null 2>&1; then - known_extensions="$known_extensions $this_ext"; - elif $contains "\.c$" $$.tmp > /dev/null 2>&1; then - known_extensions="$known_extensions $this_ext"; - elif $test "$this_ext" = "IO/Compress"; then - known_extensions="$known_extensions $this_ext"; - elif $test -d $xxx; then - nonxs_extensions="$nonxs_extensions $this_ext"; - fi; - $rm -f $$.tmp; - else + if $test -d File; then if $test -f $xxx/$leaf.xs -o -f $xxx/$leaf.c; then known_extensions="$known_extensions $1$this_ext"; elif $test -f $xxx/Makefile.PL; then @@ -21682,11 +21782,29 @@ find_extensions=' shift; fi; fi; + else + $ls -1 $xxx > $$.tmp; + if $contains "\.xs$" $$.tmp > /dev/null 2>&1; then + known_extensions="$known_extensions $this_ext"; + elif $contains "\.c$" $$.tmp > /dev/null 2>&1; then + known_extensions="$known_extensions $this_ext"; + elif $test -d $xxx; then + nonxs_extensions="$nonxs_extensions $this_ext"; + fi; + $rm -f $$.tmp; fi ;; esac; done' tdir=`pwd` +cd "$rsrc/cpan" +set X +shift +eval $find_extensions +cd "$rsrc/dist" +set X +shift +eval $find_extensions cd "$rsrc/ext" set X shift @@ -21703,10 +21821,10 @@ else fi set X $known_extensions shift -known_extensions="$*" +known_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '` set X $nonxs_extensions shift -nonxs_extensions="$*" +nonxs_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '` cd "$tdir" : Now see which are supported on this system. @@ -21828,6 +21946,13 @@ for xxx in $known_extensions ; do $define) avail_ext="$avail_ext $xxx" ;; esac ;; + XS/APItest/KeywordRPN|xs/apitest/keywordrpn) + # This is just for testing. Skip it unless we have dynamic loading. + + case "$usedl" in + $define) avail_ext="$avail_ext $xxx" ;; + esac + ;; XS/Typemap|xs/typemap) # This is just for testing. Skip it unless we have dynamic loading. case "$usedl" in @@ -22195,6 +22320,8 @@ ccversion='$ccversion' cf_by='$cf_by' cf_email='$cf_email' cf_time='$cf_time' +charbits='$charbits' +charsize='$charsize' chgrp='$chgrp' chmod='$chmod' chown='$chown' @@ -23179,6 +23306,7 @@ uvsize='$uvsize' uvtype='$uvtype' uvuformat='$uvuformat' uvxformat='$uvxformat' +vaproto='$vaproto' vendorarch='$vendorarch' vendorarchexp='$vendorarchexp' vendorbin='$vendorbin'