# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Sat Jun 16 07:55:39 CEST 2007 [metaconfig 3.0 PL70]
+# Generated on Mon Oct 8 10:22:27 CEST 2007 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
esac
;;
esac
+test -x "${newsh}" || unset newsh
: if needed set CDPATH to a harmless value that is not chatty
: avoid bash 2.02 problems with empty CDPATH.
cf_email=''
cf_by=''
cf_time=''
-charsize=''
contains=''
cpp_stuff=''
cpplast=''
html3dir=''
html3direxp=''
installhtml3dir=''
+i_assert=''
i_arpainet=''
i_crypt=''
db_hashtype=''
-U symbol= symbol gets completely empty
e.g.: -Uversiononly
-A : manipulate symbol after the platform specific hints have been applied:
- -A symbol=value append " "value to symbol
- -A append:symbol=value append value to symbol
- -A define:symbol=value define symbol to have value
- -A clear:symbol define symbol to be ''
- -A define:symbol define symbol to be 'define'
- -A eval:symbol=value define symbol to be eval of value
- -A prepend:symbol=value prepend value to symbol
- -A undef:symbol define symbol to be 'undef'
- -A undef:symbol= define symbol to be ''
+ -A append:symbol=value append value to symbol
+ -A symbol=value like append:, but with a separating space
+ -A define:symbol=value define symbol to have value
+ -A clear:symbol define symbol to be ''
+ -A define:symbol define symbol to be 'define'
+ -A eval:symbol=value define symbol to be eval of value
+ -A prepend:symbol=value prepend value to symbol
+ -A undef:symbol define symbol to be 'undef'
+ -A undef:symbol= define symbol to be ''
e.g.: -A prepend:libswanted='cl pthread '
+ -A ccflags=-DSOME_MACRO
-V : print version number and exit (with a zero status).
EOM
exit 1
;;
esac
+# This question was auctioned at YAPC::Europe-2007 in Vienna
+# I never promised you could answer it. I only auctioned the question.
+cat <<FOO
+The following message is sponsored by
+
+ Dresden.pm<--The stars should be here.
+
+Dear Perl user, system administrator or package
+maintainer, the Perl community sends greetings to
+you. Do you (emblematical) greet back [Y/n]? n
+
+FOO
+
cat <<EOS >trygcc
$startsh
EOS
api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
- perl_patchlevel=`egrep 'define PERL_PATCHNUM [0-9][0-9]|,"MAINT[0-9][0-9]*"' $rsrc/patchlevel.h|sed 's/[^0-9]//g'`
+ perl_patchlevel=`egrep ',"(MAINT|SMOKE)[0-9][0-9]*"' $rsrc/patchlevel.h|tail -1|sed 's/[^0-9]//g'`
else
revision=0
patchlevel=0
both|$define) dflt='-DDEBUGGING'
esac
+: argument order is deliberate, as the flag will start with - which set could
+: think is an option
+checkccflag='check=$1; flag=$2; callback=$3;
+echo " ";
+echo "Checking if your compiler accepts $flag" 2>&1;
+echo "int main(void) { return 0; }" > gcctest.c;
+if $cc -O2 $flag -o gcctest gcctest.c && ./gcctest; then
+ echo "Yes, it does." 2>&1;
+ case "$ccflags" in
+ *$check*)
+ echo "Leaving current flags $ccflags alone." 2>&1
+ ;;
+ *) dflt="$dflt $flag";
+ eval $callback
+ ;;
+ esac
+else
+ echo "Nope, it does not, but that is ok." 2>&1;
+fi
+'
+
: We will not override a previous value, but we might want to
: augment a hint file
case "$hint" in
case "$gccversion" in
1*) ;;
2.[0-8]*) ;;
- ?*) echo " "
- echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
- echo 'int main(void) { return 0; }' > gcctest.c
- if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
- echo "Yes, it does." 2>&1
- case "$ccflags" in
- *strict-aliasing*)
- echo "Leaving current flags $ccflags alone." 2>&1
- ;;
- *) dflt="$dflt -fno-strict-aliasing" ;;
- esac
- else
- echo "Nope, it doesn't, but that's ok." 2>&1
- fi
+ ?*) set strict-aliasing -fno-strict-aliasing
+ eval $checkccflag
;;
esac
# For gcc, adding -pipe speeds up compilations for some, but apparently
# some assemblers can't read from stdin. (It also slows down compilations
# in other cases, but those are apparently rarer these days.) AD 5/2004.
case "$gccversion" in
- ?*) echo " "
- echo "Checking if your compiler accepts -pipe" 2>&1
- echo 'int main(void) { return 0; }' > gcctest.c
- if $cc -pipe -o gcctest gcctest.c; then
- echo "Yes, it does." 2>&1
- case "$ccflags" in
- *-pipe*)
- echo "Leaving current flags $ccflags alone." 2>&1
- ;;
- *) dflt="$dflt -pipe" ;;
- esac
- else
- echo "Nope, it doesn't, but that's ok." 2>&1
- fi
+ ?*) set pipe -pipe
+ eval $checkccflag
+ ;;
+ esac
+
+ # on x86_64 (at least) we require an extra library (libssp) in the
+ # link command line. This library is not named, so I infer that it is
+ # an implementation detail that may change. Hence the safest approach
+ # is to add the flag to the flags passed to the compiler at link time,
+ # as that way the compiler can do the right implementation dependant
+ # thing. (NWC)
+ case "$gccversion" in
+ ?*) set stack-protector -fstack-protector 'ldflags="$ldflags -fstack-protector"'
+ eval $checkccflag
;;
esac
;;
set nl_langinfo d_nl_langinfo
eval $inlibc
-: 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 volatile keyword
echo " "
echo 'Checking to see if your C compiler knows about "volatile"...' >&4
}
EOCP
-case "$i8type" in
-'') case "$charsize" in
- 1) i8type=char
- u8type="unsigned char"
- i8size=$charsize
- u8size=$charsize
- ;;
- esac
- ;;
-esac
-case "$i8type" in
-'') set try -DINT8
- if eval $compile; then
- case "`$run ./try`" in
- int8_t) i8type=int8_t
- u8type=uint8_t
- i8size=1
- u8size=1
- ;;
- esac
- fi
- ;;
-esac
-case "$i8type" in
-'') if $test $charsize -ge 1; then
- i8type=char
- u8type="unsigned char"
- i8size=$charsize
- u8size=$charsize
- fi
- ;;
-esac
+i8type="signed char"
+u8type="unsigned char"
+i8size=1
+u8size=1
case "$i16type" in
'') case "$shortsize" in
set stddef.h i_stddef
eval $inhdr
+: see if assert.h is available
+set assert.h i_assert
+eval $inhdr
+
: see if sys/access.h is available
set sys/access.h i_sysaccess
eval $inhdr
set X
shift
eval $find_extensions
-# Special case: Add in threads/shared since it is not picked up by the
-# recursive find above (and adding in general recursive finding breaks
-# SDBM_File/sdbm). A.D. 10/25/2001.
-known_extensions="$known_extensions threads/shared"
+# Special case: Add in modules that nest beyond the first level.
+# Currently threads/shared and Hash/Util/FieldHash, since they are
+# not picked up by the recursive find above (and adding in general
+# recursive finding breaks SDBM_File/sdbm).
+# A.D. 20011025 (SDBM), ajgough 20071008 (FieldHash)
+known_extensions="$known_extensions threads/shared Hash/Util/FieldHash"
set X $known_extensions
shift
known_extensions="$*"
cf_by='$cf_by'
cf_email='$cf_email'
cf_time='$cf_time'
-charsize='$charsize'
chgrp='$chgrp'
chmod='$chmod'
chown='$chown'
i8size='$i8size'
i8type='$i8type'
i_arpainet='$i_arpainet'
+i_assert='$i_assert'
i_bsdioctl='$i_bsdioctl'
i_crypt='$i_crypt'
i_db='$i_db'