# Note: this Configure script was generated automatically. Rather than
# working with this copy of Configure, you may wish to get metaconfig.
# The dist package (which contains metaconfig) is available via SVN:
-# svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist
+# svn co https://svn.code.sf.net/p/dist/code/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
# See Porting/pumpkin.pod for more information on metaconfig.
#
-# Generated on Sat Mar 31 16:09:53 CEST 2012 [metaconfig 3.5 PL0]
+# Generated on Mon May 27 09:27:16 CEST 2013 [metaconfig 3.5 PL0]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
is_os2=yes
elif test -n "$DJGPP"; then
case "X${MACHTYPE:-nonesuchmach}" in
- *cygwin) ;;
+ *cygwin|*msys) ;;
*) p_=\; ;;
esac
fi
installarchlib=''
archname=''
myarchname=''
+useversionedarchname=''
d_atolf=''
d_atoll=''
baserev=''
d_vsnprintf=''
d_sockatmark=''
d_sockatmarkproto=''
+d_ip_mreq=''
+d_ip_mreq_source=''
d_ipv6_mreq=''
+d_ipv6_mreq_source=''
d_msg_ctrunc=''
d_msg_dontroute=''
d_msg_oob=''
lddlflags=''
usedl=''
doublesize=''
+bootstrap_charset=''
ebcdic=''
fflushNULL=''
fflushall=''
case "$sh" in
'') cat >&2 <<EOM
-$me: Fatal Error: I can't find a Bourne Shell anywhere.
+$me: Fatal Error: I can't find a Bourne Shell anywhere.
Usually it's in /bin/sh. How did you even get this far?
-Please contact me (Perl Maintainers) at perlbug@perl.org and
+Please contact me (Perl Maintainers) at perlbug@perl.org and
we'll try to straighten this all out.
EOM
exit 1
;;
*) issymlink='' ;;
esac
- fi
+ fi
fi
if $test "X$issymlink" = X; then
if $test -L sym 2>/dev/null; then
'')
myuname=`$uname -a 2>/dev/null`
$test -z "$myuname" && myuname=`hostname 2>/dev/null`
+# Downcase everything to avoid ambiguity.
+# Remove slashes and single quotes so we can use parts of this in
+# directory and file names.
+# Remove newlines so myuname is sane to use elsewhere.
# 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,['/],,g" | \
./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
newmyuname="$myuname"
dflt=n
fi
: determine installation prefix for where package is to be installed.
-if $afs; then
+if $afs; then
$cat <<EOM
Since you are running AFS, I need to distinguish the directory in which
esac
# See note above about -fstack-protector
case "$ccflags" in
-*-fstack-protector*)
+*-fstack-protector*)
case "$dflt" in
*-fstack-protector*) ;; # Don't add it again
- *) dflt="$dflt -fstack-protector" ;;
+ *) dflt="$dflt -fstack-protector" ;;
esac
;;
esac
rp='What is your architecture name'
. ./myread
archname="$ans"
+
+: optionally add API version to the architecture for versioned archlibs
+case "$useversionedarchname" in
+$define|true|[yY]*) dflt='y';;
+*) dflt='n';;
+esac
+rp='Add the Perl API version to your archname?'
+. ./myread
+case "$ans" in
+y|Y) useversionedarchname="$define" ;;
+*) useversionedarchname="$undef" ;;
+esac
+case "$useversionedarchname" in
+$define)
+ case "$archname" in
+ *-$api_versionstring)
+ echo "...and architecture name already has -$api_versionstring" >&4
+ ;;
+ *)
+ archname="$archname-$api_versionstring"
+ echo "...setting architecture name to $archname." >&4
+ ;;
+ esac
+ ;;
+esac
+
case "$usethreads" in
$define)
echo "Threads selected." >&4
[yY]*) fn=d~+
rp='Installation prefix to use for vendor-supplied add-ons?'
case "$vendorprefix" in
- '') dflt='' ;;
+ '') dflt="$prefix" ;;
*) dflt=$vendorprefix ;;
esac
. ./getfile
Lastly, you can have perl look in other directories for extensions and
modules in addition to those already specified.
-These directories will be searched after
- $sitearch
- $sitelib
+These directories will be searched after
+ $sitearch
+ $sitelib
EOM
test X"$vendorlib" != "X" && echo ' ' $vendorlib
test X"$vendorarch" != "X" && echo ' ' $vendorarch
rp='Colon-separated list of additional directories for perl to search?'
. ./myread
case "$ans" in
-' '|''|none) otherlibdirs=' ' ;;
+' '|''|none) otherlibdirs=' ' ;;
*) otherlibdirs="$ans" ;;
esac
case "$otherlibdirs" in
;;
esac
case "$dflt" in
- '')
+ '')
if $test "$osname" = aix -a "X$PASE" != "Xdefine" -a ! -f /lib/syscalls.exp; then
echo " "
echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
- echo "'nm' won't be sufficient on this sytem." >&4
+ echo "'nm' won't be sufficient on this system." >&4
dflt=n
fi
;;
while other systems (such as those using ELF) use $cc.
EOM
- case "$ld" in
- '') $cat >try.c <<EOM
+
+: Determine if this is ELF
+ $cat >try.c <<EOM
/* Test for whether ELF binaries are produced */
#include <fcntl.h>
#$i_stdlib I_STDLIB
if(i == -1)
exit(1); /* fail */
if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F')
- exit(0); /* succeed (yes, it's ELF) */
+ exit(0); /* succeed (yes, it is ELF) */
else
exit(1); /* fail */
}
EOM
- if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
+ if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
+ bin_ELF="$define"
+ fi
+ $rm_try
+
+ case "$ld" in
+ '') if $test $bin_ELF = "$define"; then
cat <<EOM
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'
fi
- $rm_try
;;
*) dflt="$ld"
;;
EOM
case "$lddlflags" in
'') case "$osname" in
- beos) dflt='-nostart' ;;
haiku) dflt='-shared' ;;
hpux) dflt='-b';
case "$gccversion" in
;;
linux|irix*|gnu*) dflt="-shared $optimize" ;;
next) dflt='none' ;;
- solaris) dflt='-G' ;;
+ solaris) # See [perl #66604].
+ # On Solaris 11, gcc -m64 on amd64
+ # appears not to understand -G. gcc versions at
+ # least as old as 3.4.3 support -shared, so just
+ # use that with Solaris 11 and later, but keep
+ # the old behavior for older Solaris versions.
+ case "$gccversion" in
+ '') dflt='-G' ;;
+ *) case "$osvers" in
+ 2.?|2.10) dflt='-G' ;;
+ *) dflt='-shared' ;;
+ esac
+ ;;
+ esac
+ ;;
sunos) dflt='-assert nodefinitions' ;;
svr4*|esix*|nonstopux) dflt="-G $ldflags" ;;
*) dflt='none' ;;
;;
*) case "$useshrplib" in
'') case "$osname" in
- svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|haiku|cygwin*)
+ svr4*|nonstopux|dgux|dynixptx|esix|powerux|haiku|cygwin*)
dflt=y
also='Building a shared libperl is required for dynamic loading to work on your system.'
;;
next)
# next doesn't like the default...
;;
- beos)
- # beos doesn't like the default, either.
- ;;
haiku)
# Haiku doesn't like the default, either.
;;
: determine where manual pages are on this system
echo " "
case "$sysman" in
-'')
+'')
syspath='/usr/share/man/man1 /usr/man/man1'
syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
syspath="$syspath /usr/man/u_man/man1"
EOM
cont=x
while test "$cont"; do
+ case "$MAILDOMAIN" in
+ '')
+ if $test -s /etc/mailname; then
+ maildomain=`$cat /etc/mailname`
+ else
+ maildomain="$myhostname$mydomain"
+ fi
+ ;;
+ *) maildomain="$MAILDOMAIN";;
+ esac
case "$cf_email" in
- '') dflt="$cf_by@$myhostname$mydomain";;
- *) dflt="$cf_email";;
+ '') dflt="$cf_by@$maildomain";;
+ *) dflt="$cf_email";;
esac
rp='What is your e-mail address?'
. ./myread
valstd="$undef"
fi
-: see if varags is available
+: see if varargs is available
echo " "
if $test `./findhdr varargs.h`; then
echo "<varargs.h> found." >&4
: now check which varargs header should be included
echo " "
i_varhdr=''
+val=''
case "$valstd" in
"$define")
if `./varargs I_STDARG`; then
esac
case "$val" in
'')
+ echo " "
+ echo "*** WHOA THERE!!! ***" >&4
+ echo " Your C compiler \"$cc\" doesn't seem to support stdarg or varargs!" >&4
+ case "$knowitall" in
+ '')
+ echo " I'm giving up; maybe you can try again with a different compiler?" >&4
+ exit 1
+ ;;
+ esac
echo "I could not find the definition for va_dcl... You have problems..." >&4
val="$undef"; set i_stdarg; eval $setvar
val="$undef"; set i_varargs; eval $setvar
$rm_try
echo " "
+echo "Checking the availability struct ip_mreq ..." >&4
+$cat >try.c <<EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int main() {
+struct ip_mreq mreq;
+return (mreq.imr_multiaddr.s_addr);
+}
+EOF
+val="$undef"
+set try; if eval $compile; then
+ val="$define"
+fi
+set d_ip_mreq; eval $setvar
+$rm_try
+
+echo " "
+echo "Checking the availability struct ip_mreq_source ..." >&4
+$cat >try.c <<EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int main() {
+struct ip_mreq_source mreq;
+return (mreq.imr_multiaddr.s_addr);
+}
+EOF
+val="$undef"
+set try; if eval $compile; then
+ val="$define"
+fi
+set d_ip_mreq_source; eval $setvar
+$rm_try
+
+echo " "
echo "Checking the availability struct ipv6_mreq ..." >&4
$cat >try.c <<EOF
#include <sys/types.h>
$rm_try
echo " "
+echo "Checking the availability struct ipv6_mreq_source ..." >&4
+$cat >try.c <<EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int main() {
+struct ipv6_mreq_source mreq;
+return (mreq.imr_multiaddr.s_addr);
+}
+EOF
+val="$undef"
+set try; if eval $compile; then
+ val="$define"
+fi
+set d_ipv6_mreq_source; eval $setvar
+$rm_try
+
+echo " "
echo "Checking the availability of certain socket constants..." >&4
for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
#endif
#endif
#endif
-#endif
+#endif
int main() {
DIR *dirp = opendir(".");
if (dirfd(dirp) >= 0)
$rm -f $$.h
;;
*)
- val="$undef";
+ val="$undef";
set d_pwquota; eval $setvar
set d_pwage; eval $setvar
set d_pwchange; eval $setvar
int main() {
int c = ' ';
if (isblank(c))
- exit(0);
+ return 0 ;
else
- exit(1);
+ return 1 ;
}
EOCP
if $cc $ccflags $ldflags -o isblank isblank.c $libs >/dev/null 2>&1 ; then
if eval $compile_ok; then
val="$define"
else
- echo "But you don't seem to have a useable struct sigaction." >&4
+ echo "But you don't seem to have a usable struct sigaction." >&4
val="$undef"
fi
else
# Respect a hint (or previous) value for perl_static_inline, if there is one.
case "$perl_static_inline" in
'') # Check the various possibilities, and break out on success.
- # For gcc, prefer __inline__, which will still permit
+ # For gcc, prefer __inline__, which will still permit
# cflags.SH to add in -ansi.
case "$gccversion" in
'') xxx="inline __inline__ __inline _inline";;
echo 'strerror() found.' >&4
d_strerror="$define"
d_strerrm='strerror(e)'
- if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
- echo "(You also have sys_errlist[], so we could roll our own strerror.)"
+ if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
+ echo "(You also have sys_errlist[], so we could roll our own strerror.)"
d_syserrlst="$define"
else
- echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
+ echo "(Since you don't have sys_errlist[], strerror() is welcome.)"
d_syserrlst="$undef"
fi
elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
echo 'strerror() found in string header.' >&4
d_strerror="$define"
d_strerrm='strerror(e)'
- if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
+ if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
d_syserrlst="$define"
else
: Check if is a multiplatform env
case "$osname" in
-next|rhapsody|darwin) multiarch="$define" ;;
+next|darwin) multiarch="$define" ;;
esac
case "$multiarch" in
''|[nN]*) multiarch="$undef" ;;
: check for alignment requirements
echo " "
-case "$usecrosscompile$multiarch" in
+case "$usecrosscompile" in
*$define*)
$cat <<EOM
-You seem to be either cross-compiling or doing a multiarchitecture build,
-skipping the memory alignment check.
+You seem to be cross-compiling. Skipping the memory alignment check.
EOM
case "$alignbytes" in
dflt='8'
echo "(I can't seem to compile the test program...)"
fi
+ case "$multiarch" in
+ *$define*)
+ : The usual safe value is 8, but Darwin with -Duselongdouble
+ : needs 16. Hence, we will take 8 as a minimum, but allow
+ : Configure to pick a larger value if needed.
+ if $test "$dflt" -lt 8; then
+ dflt='8'
+ echo "Setting alignment to 8 for multiarch support.">&4
+ fi
+ ;;
+ esac
;;
*) dflt="$alignbytes"
;;
: set the base revision
baserev=5.0
-: length of character in bytes. Is always 1, otherwise it isnt C
+: Determine if this is an EBCDIC system
+echo " "
+echo "Determining whether or not we are on an EBCDIC system..." >&4
+$cat >try.c <<'EOM'
+int main()
+{
+ if ('M'==0xd4) return 0;
+ return 1;
+}
+EOM
+
+case "$BOOTSTRAP_CHARSET" in
+ Y|y|define) bootstrap_charset=$define ;;
+ *) bootstrap_charset=$undef ;;
+esac
+
+val=$undef
+set try
+if eval $compile_ok; then
+ if $run ./try; then
+ echo "You seem to speak EBCDIC." >&4
+ val="$define"
+ else
+ echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
+ fi
+else
+ echo "I'm unable to compile the test program." >&4
+ echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
+fi
+$rm_try
+set ebcdic
+eval $setvar
+
+: length of character in bytes. Is always 1, otherwise it is not C
: This used to be a test using sizeof
charsize=1
echo "OK, found random()." >&4
else
dflt="rand"
- echo "Yick, looks like I have to use rand()." >&4
+ echo "Yuck, looks like I have to use rand()." >&4
fi
echo " "
;;
#endif
int main()
{
- register int i;
- register unsigned long tmp;
- register unsigned long max = 0L;
+ int i;
+ unsigned long tmp;
+ unsigned long max = 0L;
for (i = 1000; i; i--) {
tmp = (unsigned long) $randfunc();
esac
done
-: Determine if this is an EBCDIC system
-echo " "
-echo "Determining whether or not we are on an EBCDIC system..." >&4
-$cat >try.c <<'EOM'
-int main()
-{
- if ('M'==0xd4) return 0;
- return 1;
-}
-EOM
-
-val=$undef
-set try
-if eval $compile_ok; then
- if $run ./try; then
- echo "You seem to speak EBCDIC." >&4
- val="$define"
- else
- echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
- fi
-else
- echo "I'm unable to compile the test program." >&4
- echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
-fi
-$rm_try
-set ebcdic
-eval $setvar
-
: Check how to flush
echo " "
$cat >&4 <<EOM
;;
esac
fi
-: check for fflush NULL behaviour
+: check for fflush NULL behavior
case "$fflushNULL" in
'') set try -DTRY_FFLUSH_NULL $output
if eval $compile; then
$rm_try
;;
*) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
+ need_va_copy="$undef"
;;
esac
esac
;;
*) dflt="$pager"
- fn="f/($pager)"
;;
esac
+fn="f/($dflt)"
echo " "
rp='What pager is used on your system?'
. ./getfile
val=$undef
set try
-if eval $compile_ok; then
+if eval $compile; then
if $run ./try; then
echo "You can use sysctl with KERN_PROC_PATHNAME to find the executing program." >&4
val="$define"
val=$undef
set try
-if eval $compile_ok; then
+if eval $compile; then
if $run ./try; then
echo "You can use _NSGetExecutablePath to find the executing program." >&4
val="$define"
*-y*) ;;
*)
yacc="$yacc -y"
- echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
+ echo "(Adding -y option to bison to get yacc-compatible behavior.)"
;;
esac
;;
EOSH
chmod +x Cppsym.try
$eunicefix Cppsym.try
-./Cppsym < Cppsym.know > Cppsym.true
-: Add in any linux cpp "predefined macros":
+./Cppsym < Cppsym.know | $sort | $uniq > Cppsym.true
+: Add in any Linux cpp "predefined macros":
case "$osname::$gccversion" in
*linux*::*.*|*gnukfreebsd*::*.*|gnu::*.*)
tHdrH=_tmpHdr
rm -f $tHdrH'.h' $tHdrH
touch $tHdrH'.h'
+ # Filter out macro arguments, such as Linux's __INT8_C(c)
if $cpp -dM $tHdrH'.h' > $tHdrH'_cppsym.h' && [ -s $tHdrH'_cppsym.h' ]; then
- sed 's/#define[\ \ ]*//;s/[\ \ ].*$//' <$tHdrH'_cppsym.h' >$tHdrH'_cppsym.real'
+ sed -e 's/#define[\ \ ]*//;s/[\ \ ].*$//' -e '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
fi
n*|N*) ;;
*) echo >&4;
echo "Ok. Stopping Configure." >&4;
- echo "Please remove the duplicate directory (eg using git clean) and then re-run Configure" >&4;
+ echo "Please remove the duplicate directory (e.g. using git clean) and then re-run Configure" >&4;
exit 1;;
esac;
echo "Ok. You will need to correct config.sh before running make." >&4;
;;
Socket|socket)
case "$d_socket" in
- true|$define|y)
- case "$osname" in
- beos) ;; # not unless BONE
- *) avail_ext="$avail_ext $xxx" ;;
- esac
- ;;
+ true|$define|y) avail_ext="$avail_ext $xxx" ;;
esac
;;
Sys/Syslog|sys/syslog)
;;
*) case "$usedl" in
$define|true|[yY]*)
- set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
shift
perllibs="$*"
;;
bin_ELF='$bin_ELF'
binexp='$binexp'
bison='$bison'
+bootstrap_charset='$bootstrap_charset'
byacc='$byacc'
byteorder='$byteorder'
c='$c'
d_inetntop='$d_inetntop'
d_inetpton='$d_inetpton'
d_int64_t='$d_int64_t'
+d_ip_mreq='$d_ip_mreq'
+d_ip_mreq_source='$d_ip_mreq_source'
d_ipv6_mreq='$d_ipv6_mreq'
+d_ipv6_mreq_source='$d_ipv6_mreq_source'
d_isascii='$d_isascii'
d_isblank='$d_isblank'
d_isfinite='$d_isfinite'
usesocks='$usesocks'
usethreads='$usethreads'
usevendorprefix='$usevendorprefix'
+useversionedarchname='$useversionedarchname'
usevfork='$usevfork'
usrinc='$usrinc'
uuname='$uuname'