# 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 Fri Nov 6 07:43:05 CET 2009 [metaconfig 3.5 PL0]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
cf_email=''
cf_by=''
cf_time=''
+charbits=''
+charsize=''
contains=''
cpp_stuff=''
cpplast=''
signal(SIGFPE, blech);
/* Don't let compiler optimize the test away. Store the number
- in a writable string for gcc to pass to sscanf under HP/UX.
+ in a writable string for gcc to pass to sscanf under HP-UX.
*/
sprintf(str, "2147483647");
sscanf(str, "%lf", &f); /* f = (double) 0x7fffffff; */
optimized the whole file away
*/
/* Store the number in a writable string for gcc to pass to
- sscanf under HP/UX.
+ sscanf under HP-UX.
*/
sprintf(str, "-123");
sscanf(str, "%lf", &f); /* f = -123.; */
: set the base revision
baserev=5.0
+: check for length of character
+echo " "
+case "$charsize" in
+'')
+ echo "Checking to see how big your characters are (hey, you never know)..." >&4
+ $cat >try.c <<EOCP
+#include <stdio.h>
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#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 <<EOCP
+#include <stdio.h>
+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
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
set X
shift
eval $find_extensions
+cd "$rsrc/dist"
+set X
+shift
+eval $find_extensions
cd "$rsrc/ext"
set X
shift
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.
$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
cf_by='$cf_by'
cf_email='$cf_email'
cf_time='$cf_time'
+charbits='$charbits'
+charsize='$charsize'
chgrp='$chgrp'
chmod='$chmod'
chown='$chown'