# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Fri Apr 27 08:02:41 CEST 2007 [metaconfig 3.0 PL70]
+# Generated on Sun Sep 9 11:36:23 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=''
fi
cd UU
shift;;
+ --help|\
-h) shift; error=true;;
-r) shift; reuseval=true;;
-s) shift; silent=true; realsilent=true;;
-D : define symbol to have some value:
-D symbol symbol gets the value 'define'
-D symbol=value symbol gets the value 'value'
+ common used examples (see INSTALL for more info):
+ -Duse64bitint use 64bit integers
+ -Duse64bitall use 64bit integers and pointers
+ -Dusethreads use thread support
+ -Dinc_version_list=none do not include older perl trees in @INC
+ -DEBUGGING=none DEBUGGING options
+ -Dcc=gcc choose your compiler
+ -Dprefix=/opt/perl5 choose your destination
-E : stop at the end of questions, after having produced config.sh.
-K : do not use unless you know what you are doing.
-O : let -D and -U override definitions from loaded configuration file.
-U : undefine symbol:
-U symbol symbol gets the value 'undef'
-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
case "$cc" in
*gcc*) trygcc=no ;;
esac
- case "`$cc -v -c try.c 2>&1`" in
- *gcc*) trygcc=no ;;
- esac
+ # Skip this test because it gives a false match on output like:
+ # ./trygcc: line 23: cc: command not found
+ # case "`$cc -v -c try.c 2>&1`" in
+ # *gcc*) trygcc=no ;;
+ # esac
if $test X"$trygcc" = Xyes; then
if gcc -o try -c try.c; then
echo " "
echo "You seem to have a working gcc, though." >&4
- rp="Would you like to use it?"
- dflt=y
+ # Switching compilers may undo the work of hints files.
+ # The most common problem is -D_REENTRANT for threads.
+ # This heuristic catches that case, but gets false positives
+ # if -Dusethreads was not actually specified. Better to
+ # bail out here with a useful message than fail
+ # mysteriously later. Should we perhaps just try to
+ # re-invoke Configure -Dcc=gcc config_args ?
+ if $test -f usethreads.cbu; then
+ $cat >&4 <<EOM
+
+*** However, any setting of the C compiler flags (e.g. for thread support)
+*** will be lost. It may be necessary for you to restart Configure and
+*** add -Dcc=gcc to your Configure command line.
+
+EOM
+ rp="Would you like to go ahead and try gcc anyway?"
+ dflt=n
+ else
+ rp="Would you like to use it?"
+ dflt=y
+ fi
if $test -f myread; then
. ./myread
else
fi
case "$ans" in
[yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
- if $test -f usethreads.cbu; then
- $cat >&4 <<EOM
-
-*** However, any setting of the C compiler flags (e.g. for thread support)
-*** has been lost. It may be necessary to pass -Dcc=gcc to Configure
-*** (together with e.g. -Dusethreads).
-
-EOM
- fi;;
esac
fi
fi
$test -z "$myuname" && myuname=`hostname 2>/dev/null`
# tr '[A-Z]' '[a-z]' would not work in EBCDIC
# because the A-Z/a-z are not consecutive.
-myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
+myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s,['/],,g" | \
./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
newmyuname="$myuname"
dflt=n
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
else
: perl-5.9.x and later
- use5005threads="$undef"
- case "$usethreads" in
- $define)
- : Default to ithreads unless overridden on command line or with
- : old config.sh
- dflt='y'
- case "$useithreads" in
- $undef|false|[nN]*) dflt='n';;
- esac
- rp='Use the newer interpreter-based ithreads?'
- . ./myread
- case "$ans" in
- y|Y) val="$define" ;;
- *) val="$undef" ;;
+ if test X"$usethreads" = "X$define"; then
+ case "$use5005threads" in
+ $define|true|[yY]*)
+ $cat >&4 <<EOM
+
+5.005 threads has been removed for 5.10. Perl will be built using ithreads.
+
+EOM
+ ;;
esac
- set useithreads
- eval $setvar
- ;;
- *)
- useithreads="$undef"
- ;;
- esac
+ fi
+ use5005threads="$undef"
+ useithreads="$usethreads"
fi
if test X"$usethreads" = "X$define" -a "X$useperlio" = "Xundef"; then
echo " "
echo "Checking for C++..." >&4
-cat >try.c <<'EOCP'
+$cat >try.c <<'EOCP'
#include <stdio.h>
int main(void)
{
#ifdef __cplusplus
- printf("define\n");
+ return 0;
#else
- printf("undef\n");
+ return 1;
#endif
- return 0;
}
EOCP
set try
-if eval $compile_ok && $run ./try >cplusplus$$; then
- val=`$cat cplusplus$$`
+if eval $compile_ok && $run ./try; then
+ val="$define"
echo "You are using a C++ compiler."
else
val="$undef"
echo 'vprintf() found.' >&4
val="$define"
$cat >try.c <<EOF
-#include <varargs.h>
+#$i_stdarg I_STDARG /* Only one of these can be defined by i_varhrd */
+#$i_varargs I_VARARGS
+
#$i_stdlib I_STDLIB
+#$i_unistd I_UNISTD
+
+#ifdef I_STDARG
+# include <stdarg.h>
+#else /* I_VARARGS */
+# include <varargs.h>
+#endif
+
+#ifdef I_UNISTD
+# include <unistd.h>
+#endif
+
#ifdef I_STDLIB
-#include <stdlib.h>
+# include <stdlib.h>
#endif
-int main() { xxx("foo"); }
+#include <stdio.h> /* vsprintf prototype */
+
+#ifdef I_STDARG
+void xxx(int n, ...)
+{
+ va_list args;
+ char buf[10];
+ va_start(args, n);
+ exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
+}
+int main() { xxx(1, "foo"); }
+
+#else /* I_VARARGS */
xxx(va_alist)
va_dcl
{
- va_list args;
- char buf[10];
-
- va_start(args);
- exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
+ va_list args;
+ char buf[10];
+ va_start(args);
+ exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
}
+int main() { xxx("foo"); }
+
+#endif
+
EOF
set try
- if eval $compile && $run ./try; then
- echo "Your vsprintf() returns (int)." >&4
- val2="$undef"
+ if eval $compile_ok; then
+ if $run ./try; then
+ echo "Your vsprintf() returns (int)." >&4
+ val2="$undef"
+ else
+ echo "Your vsprintf() returns (char*)." >&4
+ val2="$define"
+ fi
else
- echo "Your vsprintf() returns (char*)." >&4
- val2="$define"
+ echo 'I am unable to compile the vsprintf() test program.' >&4
+ # We shouldn't get here. If we do, assume the standard signature,
+ # not the old BSD one.
+ echo 'Guessing that vsprintf() returns (int).' >&4
+ val2="$undef"
fi
else
echo 'vprintf() NOT found.' >&4
- val="$undef"
- val2="$undef"
+ val="$undef"
+ val2="$undef"
fi
$rm_try
set d_vprintf
set i_fcntl
eval $setvar
+: see if fork exists
+set fork d_fork
+eval $inlibc
+
+: see if pipe exists
+set pipe d_pipe
+eval $inlibc
+
: check for non-blocking I/O stuff
case "$h_sysfile" in
true) echo "#include <sys/file.h>" > head.c;;
echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
case "$eagain" in
'')
+ case "$d_fork:$d_pipe" in
+ define:define)
$cat head.c > try.c
$cat >>try.c <<EOCP
#include <errno.h>
echo "I can't compile the test program--assuming errno EAGAIN will do."
eagain=EAGAIN
fi
+ ;;
+ *) echo "Can't figure out how to test this--assuming errno EAGAIN will do."
+ eagain=EAGAIN
+ val="$define"
+ ;;
+ esac
set d_eofnblk
eval $setvar
;;
set d_flockproto flock $i_sysfile sys/file.h
eval $hasproto
-: see if fork exists
-set fork d_fork
-eval $inlibc
-
: see if fp_class exists
set fp_class d_fp_class
eval $inlibc
echo "Yes, it does ($foo)" >&4
d_libm_lib_version="$define"
else
- echo "No, it does not (probably harmless)\n" >&4
+ echo "No, it does not (probably harmless)" >&4
fi
$rm_try
;;
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=char
+u8type="unsigned char"
+i8size=1
+u8size=1
case "$i16type" in
'') case "$shortsize" in
set pause d_pause
eval $inlibc
-: see if pipe exists
-set pipe d_pipe
-eval $inlibc
-
: see if poll exists
set poll d_poll
eval $inlibc
INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
-Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
+LIBCATAMOUNT Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
pc532 pdp11 PGC PIC plexus PORTAR posix
POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
POSIX_C_SOURCE POSIX_SOURCE POWER
-PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
+PROTOTYPES PWB pyr QNX QK_USER R3000 REENTRANT RES Rhapsody RISC6000
riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
sony sony_news sonyrisc sparc sparclite spectrum
$define$define) avail_ext="$avail_ext $xxx" ;;
esac
;;
+ IPC/SysV|ipc/sysv)
+ : XXX Do we need a useipcsysv variable here
+ case "${d_msg}${d_sem}${d_shm}" in
+ *"${define}"*) avail_ext="$avail_ext $xxx" ;;
+ esac
+ ;;
NDBM_File|ndbm_fil)
case "$i_ndbm" in
$define)
ODBM_File|odbm_fil)
case "${i_dbm}${i_rpcsvcdbm}" in
*"${define}"*)
- case "$osname-$use64bitint" in
- hpux-define)
- case "$libs" in
- *-ldbm*) avail_ext="$avail_ext $xxx" ;;
+ case "$d_cplusplus" in
+ define) ;; # delete as a function name will not work
+ *) case "$osname-$use64bitint" in
+ hpux-define)
+ case "$libs" in
+ *-ldbm*) avail_ext="$avail_ext $xxx" ;;
+ esac
+ ;;
+ *) avail_ext="$avail_ext $xxx" ;;
esac
;;
- *) avail_ext="$avail_ext $xxx" ;;
esac
;;
esac
;;
- POSIX|posix)
- case "$useposix" in
+ Opcode|opcode)
+ case "$useopcode" in
true|define|y) avail_ext="$avail_ext $xxx" ;;
esac
;;
- Opcode|opcode)
- case "$useopcode" in
+ POSIX|posix)
+ case "$useposix" in
true|define|y) avail_ext="$avail_ext $xxx" ;;
esac
;;
Thread|thread)
case "$usethreads" in
true|$define|y)
- case "$useithreads" in
- $undef|false|[nN]*) avail_ext="$avail_ext $xxx" ;;
+ case "$use5005threads" in
+ $define|true|[yY]*) avail_ext="$avail_ext $xxx" ;;
esac
esac
;;
+ threads|threads/shared)
+ # threads and threads::shared are special cases.
+ # To stop people from asking "Perl 5.8.0 was supposed
+ # to have this new fancy threads implementation but my
+ # perl doesn't have it" and from people trying to
+ # (re)install the threads module using CPAN.pm and
+ # CPAN.pm then offering to reinstall Perl 5.8.0,
+ # the threads.pm and threads/shared.pm will always be
+ # there, croaking informatively ("you need to rebuild
+ # all of Perl with threads, sorry") when threads haven't
+ # been compiled in.
+ # --jhi
+ avail_ext="$avail_ext $xxx"
+ ;;
Win32*)
case "$osname" in
cygwin) avail_ext="$avail_ext $xxx" ;;
$define) avail_ext="$avail_ext $xxx" ;;
esac
;;
- threads|threads/shared)
- # threads and threads::shared are special cases.
- # To stop people from asking "Perl 5.8.0 was supposed
- # to have this new fancy threads implementation but my
- # perl doesn't have it" and from people trying to
- # (re)install the threads module using CPAN.pm and
- # CPAN.pm then offering to reinstall Perl 5.8.0,
- # the threads.pm and threads/shared.pm will always be
- # there, croaking informatively ("you need to rebuild
- # all of Perl with threads, sorry") when threads haven't
- # been compiled in.
- # --jhi
- avail_ext="$avail_ext $xxx"
- ;;
- IPC/SysV|ipc/sysv)
- : XXX Do we need a useipcsysv variable here
- case "${d_msg}${d_sem}${d_shm}" in
- *"${define}"*) avail_ext="$avail_ext $xxx" ;;
- esac
- ;;
*) avail_ext="$avail_ext $xxx"
;;
esac
cf_by='$cf_by'
cf_email='$cf_email'
cf_time='$cf_time'
-charsize='$charsize'
chgrp='$chgrp'
chmod='$chmod'
chown='$chown'