# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
#
-# Generated on Mon Oct 27 19:29:26 CET 2008 [metaconfig 3.5 PL0]
+# Generated on Tue Aug 18 19:22:01 CEST 2009 [metaconfig 3.5 PL0]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
usecrosscompile=''
extern_C=''
mistrustnm=''
+usedevel=''
perllibs=''
dynamic_ext=''
extensions=''
d_alarm=''
asctime_r_proto=''
d_asctime_r=''
+d_attribute_deprecated=''
d_attribute_format=''
d_attribute_malloc=''
d_attribute_nonnull=''
d_gettimeod=''
d_futimes=''
d_Gconvert=''
+d_getaddrinfo=''
d_getcwd=''
d_getespwnam=''
d_getfsstat=''
getlogin_r_proto=''
d_getmnt=''
d_getmntent=''
+d_getnameinfo=''
d_getnbyaddr=''
d_getnbyname=''
d_getnent=''
d_htonl=''
d_ilogbl=''
d_inetaton=''
+d_inetntop=''
+d_inetpton=''
d_int64_t=''
d_isascii=''
d_isfinite=''
d_wctomb=''
d_writev=''
dlext=''
+bin_ELF=''
cccdlflags=''
ccdlflags=''
dlsrc=''
i_math=''
i_memory=''
i_mntent=''
+d_gdbm_ndbm_h_uses_prototypes=''
+d_gdbmndbm_h_uses_prototypes=''
d_ndbm=''
+d_ndbm_h_uses_prototypes=''
i_gdbm_ndbm=''
i_gdbmndbm=''
i_ndbm=''
: See if we are using a devel version and want that
xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
case "$usedevel" in
-$define|true|[yY]*) ;;
+$define|true|[yY]*)
+ usedevel="$define" ;;
*) case "$xversion" in
*[13579])
cat >&4 <<EOH
esac
;;
esac
+ usedevel="$undef"
;;
esac
case "$usedevel" in
version_patchlevel_string="version $patchlevel subversion $subversion"
case "$perl_patchlevel" in
0|'') ;;
-*) version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" ;;
+*) perl_patchlevel=`echo $perl_patchlevel | sed 's/.* //'`
+ version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel"
+ ;;
esac
$echo "(You have $package $version_patchlevel_string.)"
$rm -f reflect flect
: now see if they want to do setuid emulation
+if $test $patchlevel -lt 11; then
echo " "
val="$undef"
case "$d_suidsafe" in
esac
set d_dosuid
eval $setvar
+else
+ case "$d_dosuid" in
+ "$define")
+ cat >&4 <<EOH
+
+SUID emulation has been removed for 5.12
+Please re-run Configure without -Dd_dosuid
+
+EOH
+ exit 1;
+ ;;
+ esac
+ d_dosuid=undef
+fi
: Find perl5.005 or later.
echo "Looking for a previously installed perl5.005 or later... "
chdir($stem);
;@candidates = map {
[ $_, pack "sss", split m/[._]/, "$_.0.0" ] } glob("5.*");
+ ;@candidates = sort { $a->[1] cmp $b->[1]} @candidates;
}
else {
;@candidates = ();
esac
prefixvar=vendorarch
. ./installprefix
+if $test X"$vendorarch" = X"$vendorlib"; then
+ d_vendorarch="$undef"
+else
+ d_vendorarch="$define"
+fi
: Final catch-all directories to search
$cat <<EOM
rp="Do you wish to use dynamic loading?"
. ./myread
usedl="$ans"
+bin_ELF="$undef"
case "$ans" in
y*) usedl="$define"
case "$dlsrc" in
You appear to have ELF support. I'll use $cc to build dynamic libraries.
EOM
dflt="$cc"
+ bin_ELF="$define"
else
echo "I'll use ld to build dynamic libraries."
dflt='ld'
case "$lddlflags" in
'') case "$osname" in
beos) dflt='-nostart' ;;
+ haiku) dflt='-shared' ;;
hpux) dflt='-b';
case "$gccversion" in
'') dflt="$dflt +vnocompatwarnings" ;;
;;
*) case "$useshrplib" in
'') case "$osname" in
- svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
+ svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|haiku|cygwin*)
dflt=y
also='Building a shared libperl is required for dynamic loading to work on your system.'
;;
case "$useshrplib" in
true)
+ case "$userelocatableinc" in
+ true|define)
+ echo "Cannot build with both -Duserelocatableinc and -Duseshrplib" >&4
+ echo "See INSTALL for an explanation why that won't work." >&4
+ exit 4
+ ;;
+ esac
case "$libperl" in
'')
# Figure out a good name for libperl.so. Since it gets stored in
beos)
# beos doesn't like the default, either.
;;
+ haiku)
+ # Haiku doesn't like the default, either.
+ ;;
hpux*)
# hpux doesn't like the default, either.
tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
prefixvar=vendorscript
. ./installprefix
+: script used to emit important warnings
+cat >warn <<EOS
+$startsh
+if test \$# -gt 0; then
+ echo "\$@" >msg
+else
+ cat >msg
+fi
+echo "*** WARNING:" >&4
+sed -e 's/^/*** /' <msg >&4
+echo "*** " >&4
+cat msg >>config.msg
+echo " " >>config.msg
+rm -f msg
+EOS
+chmod +x warn
+$eunicefix warn
+
+: see which of string.h or strings.h is needed
+echo " "
+strings=`./findhdr string.h`
+if $test "$strings" && $test -r "$strings"; then
+ echo "Using <string.h> instead of <strings.h>." >&4
+ val="$define"
+else
+ val="$undef"
+ strings=`./findhdr strings.h`
+ if $test "$strings" && $test -r "$strings"; then
+ echo "Using <strings.h> instead of <string.h>." >&4
+ else
+ ./warn "No string header found -- You'll surely have problems."
+ fi
+fi
+set i_string
+eval $setvar
+case "$i_string" in
+"$undef") strings=`./findhdr strings.h`;;
+*) strings=`./findhdr string.h`;;
+esac
+
: see if qgcvt exists
set qgcvt d_qgcvt
eval $inlibc
#include <stdio.h>
-#define I_STDLIB $i_stdlib
+#$i_stdlib I_STDLIB
#ifdef I_STDLIB
#include <stdlib.h>
#endif
+#$i_string I_STRING
+#ifdef I_STRING
+# include <string.h>
+#else
+# include <strings.h>
+#endif
-int
-checkit(expect, got)
-char *expect;
-char *got;
+int checkit(char *expect, char *got)
{
if (strcmp(expect, got)) {
printf("%s oddity: Expected %s, got %s\n",
eval $setvar
$rm -f attrib*
+: Look for GCC-style attribute deprecated
+case "$d_attribute_deprecated" in
+'')
+echo " "
+echo "Checking whether your compiler can handle __attribute__((deprecated)) ..." >&4
+$cat >attrib.c <<'EOCP'
+#include <stdio.h>
+int I_am_deprecated(void) __attribute__((deprecated));
+EOCP
+if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
+ if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ echo "Your C compiler doesn't support __attribute__((deprecated))."
+ val="$undef"
+ else
+ echo "Your C compiler supports __attribute__((deprecated))."
+ val="$define"
+ fi
+else
+ echo "Your C compiler doesn't seem to understand __attribute__ at all."
+ val="$undef"
+fi
+;;
+*) val="$d_attribute_deprecated" ;;
+esac
+set d_attribute_deprecated
+eval $setvar
+$rm -f attrib*
+
: Look for GCC-style attribute warn_unused_result
case "$d_attribute_warn_unused_result" in
'')
eval $setvar
$rm_try
-: script used to emit important warnings
-cat >warn <<EOS
-$startsh
-if test \$# -gt 0; then
- echo "\$@" >msg
-else
- cat >msg
-fi
-echo "*** WARNING:" >&4
-sed -e 's/^/*** /' <msg >&4
-echo "*** " >&4
-cat msg >>config.msg
-echo " " >>config.msg
-rm -f msg
-EOS
-chmod +x warn
-$eunicefix warn
-
-: see which of string.h or strings.h is needed
-echo " "
-strings=`./findhdr string.h`
-if $test "$strings" && $test -r "$strings"; then
- echo "Using <string.h> instead of <strings.h>." >&4
- val="$define"
-else
- val="$undef"
- strings=`./findhdr strings.h`
- if $test "$strings" && $test -r "$strings"; then
- echo "Using <strings.h> instead of <string.h>." >&4
- else
- ./warn "No string header found -- You'll surely have problems."
- fi
-fi
-set i_string
-eval $setvar
-case "$i_string" in
-"$undef") strings=`./findhdr strings.h`;;
-*) strings=`./findhdr string.h`;;
-esac
-
: see if this is a sys/file.h system
val=''
set sys/file.h val
fi
$rm_try
+: see if ndbm.h is available
+set ndbm.h i_ndbm
+eval $inhdr
+: Compatibility location for RedHat 7.1
+set gdbm/ndbm.h i_gdbmndbm
+eval $inhdr
+: Compatibility location for Debian 4.0
+set gdbm-ndbm.h i_gdbm_ndbm
+eval $inhdr
+
+val="$undef"
+if $test "$i_ndbm" = "$define" -o "$i_gdbmndbm" = "$define" -o "$i_gdbm_ndbm" = "$define"; then
+ : see if dbm_open exists
+ set dbm_open d_dbm_open
+ eval $inlibc
+ case "$d_dbm_open" in
+ $undef)
+ i_ndbm="$undef"
+ i_gdbmndbm="$undef"
+ i_gdbm_ndbm="$undef"
+ echo "We won't be including <ndbm.h>"
+ val="$undef"
+ ;;
+ *) val="$define"
+ ;;
+ esac
+fi
+set d_ndbm
+eval $setvar
+
+ndbm_hdr_protochk='name=$1; hdr=$2;
+eval "ihdr=\$""i_$name";
+val="$undef";
+if $test "$ihdr" = "$define"; then
+ $echo "Checking if your <$hdr> uses prototypes..." >&4;
+ case "$d_cplusplus" in
+ $define) ./protochk "$extern_C void dbm_close(DBM *);" literal "extern \"C\" {" $ihdr $hdr literal "}" && val="$define" ;;
+ *) ./protochk "$extern_C void dbm_close(int, int);" $ihdr $hdr || val="$define" ;;
+ esac;
+ case "$val" in
+ $define) $echo "Your <$hdr> seems to have prototypes";;
+ *) $echo "Your <$hdr> does not seem to have prototypes";;
+ esac;
+fi;
+set "d_${name}_h_uses_prototypes";
+eval $setvar'
+
+set ndbm ndbm.h
+eval $ndbm_hdr_protochk
+set gdbmndbm gdbm/ndbm.h
+eval $ndbm_hdr_protochk
+set gdbm_ndbm gdbm-ndbm.h
+eval $ndbm_hdr_protochk
+
+: see if getaddrinfo exists
+set getaddrinfo d_getaddrinfo
+eval $inlibc
+
: see if getcwd exists
set getcwd d_getcwd
eval $inlibc
set getmntent d_getmntent
eval $inlibc
+: see if getnameinfo exists
+set getnameinfo d_getnameinfo
+eval $inlibc
+
: see if getnetbyaddr exists
set getnetbyaddr d_getnbyaddr
eval $inlibc
set inet_aton d_inetaton
eval $inlibc
+: see if inet_ntop exists
+set inet_ntop d_inetntop
+eval $inlibc
+
+: see if inet_pton exists
+set inet_pton d_inetpton
+eval $inlibc
+
: Look for isascii
echo " "
$cat >isascii.c <<EOCP
set i_gdbm
eval $setvar
-: see if ndbm.h is available
-set ndbm.h i_ndbm
-eval $inhdr
-: Compatibility location for RedHat 7.1
-set gdbm/ndbm.h i_gdbmndbm
-eval $inhdr
-: Compatibility location for Debian 4.0
-set gdbm-ndbm.h i_gdbm_ndbm
-eval $inhdr
-
-if $test "$i_ndbm" = "$define" -o "$i_gdbmndbm" = "$define" -o "$i_gdbm_ndbm" = "$define"; then
- : see if dbm_open exists
- set dbm_open d_dbm_open
- eval $inlibc
- case "$d_dbm_open" in
- $undef)
- i_ndbm="$undef"
- i_gdbmndbm="$undef"
- i_gdbm_ndbm="$undef"
- echo "We won't be including <ndbm.h>"
- val="$undef"
- ;;
- *) val="$define"
- ;;
- esac
-fi
-set d_ndbm
-eval $setvar
-
: see if this is a ieeefp.h system
case "$i_ieeefp" in
'' ) set ieeefp.h i_ieeefp
./Cppsym < Cppsym.know > Cppsym.true
: Add in any linux cpp "predefined macros":
case "$osname::$gccversion" in
- *linux*::*.*)
+ *linux*::*.*|*gnukfreebsd*::*.*)
tHdrH=_tmpHdr
rm -f $tHdrH'.h' $tHdrH
touch $tHdrH'.h'
: 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.
find_extensions='
for xxx in *; do
case "$xxx" in
DynaLoader|dynaload) ;;
*)
- if $test -f $xxx/$xxx.xs -o -f $xxx/$xxx.c; then
- known_extensions="$known_extensions $1$xxx";
- elif $test -f $xxx/Makefile.PL; then
- nonxs_extensions="$nonxs_extensions $1$xxx";
+ 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 $xxx -a $# -lt 10; then
- set $1$xxx/ $*;
- cd "$xxx";
- eval $find_extensions;
- cd ..;
- shift;
+ 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
+ nonxs_extensions="$nonxs_extensions $1$this_ext";
+ else
+ if $test -d $xxx -a $# -lt 10; then
+ set $1$xxx/ $*;
+ cd "$xxx";
+ eval $find_extensions;
+ cd ..;
+ shift;
+ fi;
fi;
fi
;;
set X
shift
eval $find_extensions
-# 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"
+if $test -d File-Glob; then
+ : All ext/ flattened
+else
+ # 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"
+fi
set X $known_extensions
shift
known_extensions="$*"
esac
;;
NDBM_File|ndbm_fil)
- case "$i_ndbm" in
+ case "$d_ndbm" in
$define)
case "$osname-$use64bitint" in
hpux-define)
# --jhi
avail_ext="$avail_ext $xxx"
;;
+ VMS*)
+ ;;
Win32*)
case "$osname" in
cygwin) avail_ext="$avail_ext $xxx" ;;
# Target system : $myuname
EOT
+: Add in command line options if available
$test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
+
$spitshell <<EOT >>config.sh
Author='$Author'
baserev='$baserev'
bash='$bash'
bin='$bin'
+bin_ELF='$bin_ELF'
binexp='$binexp'
bison='$bison'
byacc='$byacc'
d_asctime_r='$d_asctime_r'
d_atolf='$d_atolf'
d_atoll='$d_atoll'
+d_attribute_deprecated='$d_attribute_deprecated'
d_attribute_format='$d_attribute_format'
d_attribute_malloc='$d_attribute_malloc'
d_attribute_nonnull='$d_attribute_nonnull'
d_ftello='$d_ftello'
d_ftime='$d_ftime'
d_futimes='$d_futimes'
+d_gdbm_ndbm_h_uses_prototypes='$d_gdbm_ndbm_h_uses_prototypes'
+d_gdbmndbm_h_uses_prototypes='$d_gdbmndbm_h_uses_prototypes'
+d_getaddrinfo='$d_getaddrinfo'
d_getcwd='$d_getcwd'
d_getespwnam='$d_getespwnam'
d_getfsstat='$d_getfsstat'
d_getlogin_r='$d_getlogin_r'
d_getmnt='$d_getmnt'
d_getmntent='$d_getmntent'
+d_getnameinfo='$d_getnameinfo'
d_getnbyaddr='$d_getnbyaddr'
d_getnbyname='$d_getnbyname'
d_getnent='$d_getnent'
d_inc_version_list='$d_inc_version_list'
d_index='$d_index'
d_inetaton='$d_inetaton'
+d_inetntop='$d_inetntop'
+d_inetpton='$d_inetpton'
d_int64_t='$d_int64_t'
d_isascii='$d_isascii'
d_isfinite='$d_isfinite'
d_munmap='$d_munmap'
d_mymalloc='$d_mymalloc'
d_ndbm='$d_ndbm'
+d_ndbm_h_uses_prototypes='$d_ndbm_h_uses_prototypes'
d_nice='$d_nice'
d_nl_langinfo='$d_nl_langinfo'
d_nv_preserves_uv='$d_nv_preserves_uv'
use64bitall='$use64bitall'
use64bitint='$use64bitint'
usecrosscompile='$usecrosscompile'
+usedevel='$usedevel'
usedl='$usedl'
usedtrace='$usedtrace'
usefaststdio='$usefaststdio'
zip='$zip'
EOT
-: Add in command line options if available
-$test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
-
: add special variables
$test -f $src/patchlevel.h && \
awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
-echo "PERL_PATCHLEVEL=$perl_patchlevel" >>config.sh
+echo "PERL_PATCHLEVEL='$perl_patchlevel'" >>config.sh
echo "PERL_CONFIG_SH=true" >>config.sh
: propagate old symbols