# Yes, you may rip this off to use in other distribution packages. This
# script belongs to the public domain and cannot be copyrighted.
#
-# (Note: this Configure script was generated automatically. Rather than
+# Note: this Configure script was generated automatically. Rather than
# working with this copy of Configure, you may wish to get metaconfig.
-# The dist-3.0 package (which contains metaconfig) was posted in
-# comp.sources.misc and is available on CPAN under authors/id/RAM so
-# you may fetch it yourself from your nearest archive site.)
+# 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, it is OK to send
# See Porting/pumpkin.pod for more information on metaconfig.
#
-# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
+# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
#
-# Generated on Wed May 16 19:31:47 CEST 2007 [metaconfig 3.0 PL70]
+# Generated on Mon Jan 14 17:33:05 CET 2008 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
: Proper separator for the PATH environment variable
p_=:
-: On OS/2 this directory should exist if this is not floppy only system :-]
+: On OS/2 this directory should exist if this is not floppy only system ":-]"
if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' ) 2>&1 >/dev/null ; then
- if test -n "$OS2_SHELL"; then
+ if test -n "$OS2_SHELL"; then
p_=\;
PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
fi
if test -f /osf_boot -a -f /usr/sbin/setld; then
if test X`/usr/bin/uname -s` = XOSF1; then
- avoidksh="to avoid Digital UNIX' ksh"
- newsh=/bin/sh
- unset BIN_SH # if this is 'xpg4' sh will start up ksh
+ avoidksh="to avoid Digital UNIX' ksh"
+ newsh=/bin/sh
+ unset BIN_SH
fi
fi
case "$inksh/$needksh" in
esac
;;
esac
+test -x "${newsh}" || unset newsh
-: if needed set CDPATH to a harmless value that is not chatty
+: if needed, set CDPATH to a harmless value that is not chatty
: avoid bash 2.02 problems with empty CDPATH.
case "$CDPATH" in
'') ;;
*) case "$SHELL" in
- *bash*) CDPATH='.' ;;
- *) CDPATH='' ;;
+ *bash*) CDPATH='.' ;;
+ *) CDPATH='' ;;
esac
;;
esac
+
: Configure runs within the UU subdirectory
test -d UU || mkdir UU
cd UU && rm -f ./*
cf_email=''
cf_by=''
cf_time=''
-charsize=''
contains=''
cpp_stuff=''
cpplast=''
html3direxp=''
installhtml3dir=''
i_arpainet=''
+i_assert=''
i_crypt=''
db_hashtype=''
db_prefixtype=''
archname64=''
use64bitall=''
use64bitint=''
+dtrace=''
+usedtrace=''
usefaststdio=''
ccflags_uselargefiles=''
ldflags_uselargefiles=''
yaccflags=''
CONFIG=''
+: Detect odd OSs
define='define'
undef='undef'
smallmach='pdp11 i8086 z8000 i80286 iAPX286'
fi
rm -f sharp
-
: Save command line options in file UU/cmdline.opt for later use in
: generating config.sh.
cat > cmdline.opt <<EOSH
-# Configure command line arguments.
+: Configure command line arguments.
config_arg0='$0'
config_args='$*'
config_argc=$#
cat >>cmdline.opt <<EOSH
config_arg$argn='$arg'
EOSH
- # Extreme backslashitis: replace each ' by '"'"'
cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
$arg
EOC
argn=`expr $argn + 1`
args_sep=' '
done
-# args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@"
-# used by ./hints/os2.sh
rm -f cmdl.opt
: produce awk script to parse command line options
case "$zzz" in
*:*) zzz='' ;;
*) xxx=append
- zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
+ zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
esac
;;
*) xxx=`echo "$yyy"|sed 's!:.*!!'`
yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
esac
- ;;
+ ;;
esac
case "$xxx" in
append)
-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
touch posthint.sh
: set package name
-package=perl5
+package='perl5'
first=`echo $package | sed -e 's/^\(.\).*/\1/'`
last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
'') src=/
rsrc=/
;;
-/*) rsrc="$src";;
-*) rsrc="../$src";;
+/*) rsrc="$src";;
+*) rsrc="../$src";;
esac
if test -f $rsrc/Configure && \
- $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
+ $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1
then
: found it, so we are ok.
else
fi
rm -f missing x??
-echo " "
: Find the appropriate value for a newline for tr
+echo " "
if test -n "$DJGPP"; then
trnl='\012'
fi
You may safely delete it if you wish.
EOF
+: 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]*) ;;
;;
esac
case "$make" in
-make)
+make)
case "$gmake" in
gmake)
echo "I can't find make or gmake, and my life depends on it." >&4
;;
esac
;;
-esac
+esac
case "$gmake" in
gmake) ;;
*) # We can't have osname yet.
;;
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
+
+: Check what type of C compiler we use
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
esac
echo " "
-
+: Make symlinks util
case "$mksymlinks" in
$define|true|[yY]*)
case "$src" in
;;
esac
-
+: Check for Cross-Compilation
case "$usecrosscompile" in
$define|true|[yY]*)
$echo "Cross-compiling..."
prefix="$ans"
prefixexp="$ansexp"
+: is AFS running?
case "$afsroot" in
'') afsroot=/afs ;;
*) afsroot=$afsroot ;;
esac
-: is AFS running?
echo " "
case "$afs" in
$define|true) afs=true ;;
*) eval "$var=$val";;
esac'
+: Check is we will use socks
case "$usesocks" in
$define|true|[yY]*) dflt='y';;
*) dflt='n';;
rp='Build Perl for SOCKS?'
. ./myread
case "$ans" in
-y|Y) val="$define" ;;
+y|Y) val="$define" ;;
*) val="$undef" ;;
esac
set usesocks
$define|true|[yY]*) useperlio="$define";;
esac
+: Check if we want perlio
case "$useperlio" in
$define|true|[yY]*|'') dflt='y';;
*) dflt='n';;
rp='Use the PerlIO abstraction layer?'
. ./myread
case "$ans" in
-y|Y)
+y|Y)
val="$define"
;;
-*)
+*)
echo "Ok, doing things the stdio way."
val="$undef"
;;
esac
set useperlio
-eval $setvar
+eval $setvar
case "$usesocks" in
$define|true|[yY]*)
;;
esac
-
: get the patchlevel
echo " "
echo "Getting the current patchlevel..." >&4
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
api_versionstring='5.005'
fi
+: Do we want threads support and if so, what type
case "$usethreads" in
$define|true|[yY]*) dflt='y';;
*) # Catch case where user specified ithreads or 5005threads but
# forgot -Dusethreads (A.D. 4/2002)
case "$useithreads$use5005threads" in
- *$define*)
+ *$define*)
case "$useperlio" in
"$define") dflt='y' ;;
*) dflt='n' ;;
esac
fi
+: Check if multiplicity is required
cat <<EOM
Perl can be built so that multiple Perl interpreters can coexist
set usemultiplicity
eval $setvar
-
+: Check if morebits is requested
case "$usemorebits" in
"$define"|true|[yY]*)
use64bitint="$define"
$eunicefix bsd usg v7 osf1 eunice xenix venix os2
$rm -f foo
+: Checking the C compiler
case "$cc" in
'') dflt=cc;;
*) dflt="$cc";;
fi
. ./checkcc
+: Check if we are using GNU gcc and what its version is
echo " "
echo "Checking for GNU cc in disguise and/or its version number..." >&4
$cat >try.c <<EOM
'') firstmakefile='makefile';;
esac
+: Check for uselongdouble support
case "$ccflags" in
*-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
esac
xxx=$thisdir/lib$thislib.$so
$test -f "$xxx" && eval $libscheck
$test -f "$xxx" && libstyle=shared
- fi
+ fi
if test ! -f "$xxx"; then
xxx=$thisdir/lib$thislib$_a
$test -f "$xxx" && eval $libscheck
;;
esac
break
- fi
+ fi
done
if $test ! -f "$xxx"; then
echo "No -l$thislib."
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 2>gcctest.out && ./gcctest; then
+ echo "Yes, it does." 2>&1;
+ if $test -s gcctest.out ; then
+ echo "But your platform does not like it:";
+ cat gcctest.out;
+ else
+ case "$ccflags" in
+ *$check*)
+ echo "Leaving current flags $ccflags alone." 2>&1
+ ;;
+ *) dflt="$dflt $flag";
+ eval $callback
+ ;;
+ esac
+ fi
+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
*-g*:old) dflt="$dflt -DDEBUGGING";;
esac
case "$gccversion" in
- 2*) if test -d /etc/conf/kconfig.d &&
+ 2*) if $test -d /etc/conf/kconfig.d &&
$contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
then
# Interactive Systems (ISC) POSIX mode.
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
;;
EOM
dflt=y
if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
- if $sh -c "$run ./try" >>try.msg 2>&1; then
+ if $sh -c "$run ./try " >>try.msg 2>&1; then
xxx=`$run ./try`
case "$xxx" in
"Ok") dflt=n ;;
;;
n) echo "OK, that should do.";;
esac
-$rm_try
+$rm_try gcctest gcctest.out
: define a shorthand compile call
compile='
set d_int64_t
eval $setvar
-
+: Check if 64bit ints have a quad type
echo " "
echo "Checking which 64-bit integer type we could use..." >&4
;;
esac
-
+: Do we want 64bit support
case "$uselonglong" in
"$define"|true|[yY]*)
cat <<EOM >&4
EOM
use64bitint="$define"
;;
-esac
+esac
case "$use64bits" in
"$define"|true|[yY]*)
cat <<EOM >&4
EOM
use64bitint="$define"
;;
-esac
+esac
case "$use64bitints" in
"$define"|true|[yY]*)
cat <<EOM >&4
EOM
use64bitint="$define"
;;
-esac
+esac
case "$use64bitsint" in
"$define"|true|[yY]*)
cat <<EOM >&4
EOM
use64bitint="$define"
;;
-esac
+esac
case "$uselonglongs" in
"$define"|true|[yY]*)
cat <<EOM >&4
EOM
use64bitint="$define"
;;
-esac
+esac
case "$use64bitsall" in
"$define"|true|[yY]*)
cat <<EOM >&4
EOM
use64bitall="$define"
;;
-esac
+esac
case "$ccflags" in
*-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
*) dflt='n' ;;
esac
;;
-esac
+esac
cat <<EOM
You may also choose to try maximal 64-bitness. It means using as much
*) echo "Using $perl5." ;;
esac
+: Set the siteprefix variables
$cat <<EOM
After $package is installed, you may wish to install various
d_sitearch="$define"
fi
+: Set the vendorprefix variables
$cat <<EOM
The installation process will also create a directory for
;;
esac
+: Set the vendorlib variables
case "$vendorprefix" in
'') d_vendorlib="$undef"
vendorlib=''
prefixvar=vendorlib
. ./installprefix
+: Set the vendorarch variables
case "$vendorprefix" in
'') d_vendorarch="$undef"
vendorarch=''
eval $setvar
$rm -f prototype*
+: Check if ansi2knr is required
case "$prototype" in
"$define") ;;
*) ansi2knr='ansi2knr'
;;
esac
+: DTrace support
+dflt_dtrace='/usr/sbin/dtrace'
+cat <<EOM
+
+Perl can be built to support DTrace on platforms that support it.
+DTrace is a diagnosis and performance analysis tool from Sun.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+
+while $test 1 ; do
+ case "$usedtrace" in
+ $define|true|[yY]*)
+ dflt='y'
+ ;;
+ ?*)
+ dflt='y'
+ dflt_dtrace=$usedtrace
+ ;;
+ *)
+ dflt='n'
+ ;;
+ esac
+
+ rp='Support DTrace if available?'
+ . ./myread
+ case "$ans" in
+ y|Y) val="$define" ;;
+ *) val="$undef" ;;
+ esac
+ set usedtrace
+ eval $setvar
+
+ test "X$usedtrace" != "X$define" && break
+
+ echo " "
+ rp='Where is the dtrace executable?'
+ dflt=$dflt_dtrace
+ . ./getfile
+ val="$ans"
+ set dtrace
+ eval $setvar
+
+ if $test -f $dtrace
+ then
+ if $dtrace -h -s ../perldtrace.d \
+ -o perldtrace.tmp >/dev/null 2>&1 \
+ && rm -f perldtrace.tmp
+ then
+ echo " "
+ echo "Good: your $dtrace knows about the -h flag."
+ else
+ cat >&2 <<EOM
+
+*** $me: Fatal Error: $dtrace doesn't support -h flag
+***
+*** Your installed dtrace doesn't support the -h switch to compile a D
+*** program into a C header. Can't continue.
+
+EOM
+ exit 1
+ fi
+ break;
+ fi
+
+ case "$fastread" in
+ yes)
+ cat >&2 <<EOM
+
+*** $me: Fatal Error: $dtrace not found.
+*** Can't continue.
+
+EOM
+ exit 1
+ ;;
+ *)
+ echo "*** $dtrace was not found."
+ echo " "
+ ;;
+ esac
+done
+
+: See if we want extra modules installed
echo " "
case "$extras" in
'') dflt='n';;
set installusrbinperl
eval $setvar
+: Check if we are using the GNU C library
echo " "
echo "Checking for GNU C Library..." >&4
cat >try.c <<'EOCP'
;;
esac
+: get list of predefined functions in a handy place
case "$runnm" in
true)
-: get list of predefined functions in a handy place
echo " "
case "$libc" in
'') libc=unknown
set dld.h i_dld
eval $inhdr
-
+: Check if we are using C++
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"
;;
esac
+: Do we want a shared libperl?
also=''
case "$usedl" in
$undef)
xxx=''
tmp_shrpenv=''
if "$useshrplib"; then
- case "$osname" in
+ case "$osname" in
aix)
# We'll set it in Makefile.SH...
;;
esac
case "$xxx" in
'') ;;
- *)
+ *)
# Only add $xxx if it isn't already in ccdlflags.
case " $ccdlflags " in
*" $xxx "*) ;;
cat <<EOM >&4
Adding $xxx to the flags
-passed to $ld so that the perl executable will find the
+passed to $ld so that the perl executable will find the
installed shared $libperl.
EOM
;;
esac
+: Ask for e-mail
$cat <<EOM
I need to get your e-mail address in Internet format if possible, i.e.
esac
done
+: Ask e-mail of administrator
$cat <<EOM
If you or somebody else will be maintaining perl at your site, please
prefixvar=sitescript
. ./setprefixvar
+: Check if faststdio is requested and available
case "$usefaststdio" in
$define|true|[yY]*|'')
xversion=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
rp='Use the "fast stdio" if available?'
. ./myread
case "$ans" in
-y|Y) val="$define" ;;
+y|Y) val="$define" ;;
*) val="$undef" ;;
esac
set usefaststdio
set fpos_t fpostype long stdio.h sys/types.h
eval $typedef_ask
+: Check size for Fpos_t
echo " "
case "$fpostype" in
*_t) zzz="$fpostype" ;;
*) zzz="fpos_t" ;;
esac
-echo "Checking the size of $zzz..." >&4
+echo "Checking the size of $zzz..." >&4
cat > try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
fpossize="$ans"
fi
+: Check for large file support
# Backward compatibility (uselfs is deprecated).
case "$uselfs" in
"$define"|true|[yY]*)
;;
esac
+: Set the vendorbin variables
case "$vendorprefix" in
'') d_vendorbin="$undef"
vendorbin=''
prefixvar=vendorbin
. ./installprefix
+: Set the vendorhtml1dir variables
case "$vendorprefix" in
'') vendorhtml1dir=''
vendorhtml1direxp=''
prefixvar=vendorhtml1dir
. ./installprefix
+: Set the vendorhtml3dir variables
case "$vendorprefix" in
'') vendorhtml3dir=''
vendorhtml3direxp=''
prefixvar=vendorhtml3dir
. ./installprefix
+: Set the vendorman1dir variables
case "$vendorprefix" in
'') vendorman1dir=''
vendorman1direxp=''
prefixvar=vendorman1dir
. ./installprefix
+: Set the vendorman3dir variables
case "$vendorprefix" in
'') vendorman3dir=''
vendorman3direxp=''
prefixvar=vendorman3dir
. ./installprefix
+: Set the vendorscript variables
case "$vendorprefix" in
'') d_vendorscript="$undef"
vendorscript=''
set qgcvt d_qgcvt
eval $inlibc
+: Check print/scan long double stuff
echo " "
if $test X"$d_longdbl" = X"$define"; then
chmod +x protochk
$eunicefix protochk
+: Define hasproto macro for Configure internal use
hasproto='varname=$1; func=$2; shift; shift;
while $test $# -ge 2; do
case "$1" in
set sys/select.h i_sysselct
eval $inhdr
+: Define hasfield macro for Configure internal use
hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift;
while $test $# -ge 2; do
case "$1" in
val="$undef"; set i_stdarg; eval $setvar
val="$undef"; set i_varargs; eval $setvar
;;
-*)
+*)
set i_varhdr
eval $setvar
case "$i_varhdr" in
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 clearenv d_clearenv
eval $inlibc
+: Define hasstruct macro for Configure internal use
hasstruct='varname=$1; struct=$2; shift; shift;
while $test $# -ge 2; do
case "$1" in
eval $setvar;
$rm_try'
+: see whether socket exists
socketlib=''
sockethdr=''
-: see whether socket exists
echo " "
$echo $n "Hmm... $c" >&4
if set socket val -f d_socket; eval $csym; $val; then
set sys/uio.h i_sysuio
eval $inhdr
-
+: Check for cmsghdr support
echo " "
echo "Checking to see if your system supports struct cmsghdr..." >&4
set d_cmsghdr_s cmsghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
set dlfcn.h i_dlfcn
eval $inhdr
+: Check what extension to use for shared libs
case "$usedl" in
$define|y|true)
$cat << EOM
}
EOM
: Call the object file tmp-dyna.o in case dlext=o.
- if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
- mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
- $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
+ if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
+ mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
+ $ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
$cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
xxx=`$run ./fred`
case $xxx in
fi
;;
esac
-
+
$rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
set d_dlsymun
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 fcntl d_fcntl
eval $inlibc
-echo " "
: See if fcntl-based locking works.
+echo " "
$cat >try.c <<EOCP
#$i_stdlib I_STDLIB
#ifdef I_STDLIB
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
set fpclassl d_fpclassl
eval $inlibc
-
: check for fpos64_t
echo " "
echo "Checking to see if you have fpos64_t..." >&4
set sys/mount.h i_sysmount
eval $inhdr
-
+: Check for fs_data_s
echo " "
echo "Checking to see if your system supports struct fs_data..." >&4
set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
set fsetpos d_fsetpos
eval $inlibc
-
: see if fstatfs exists
set fstatfs d_fstatfs
eval $inlibc
-
: see if statvfs exists
set statvfs d_statvfs
eval $inlibc
8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
esac
-d_futimes="$undef"
: check for a working futimes
+d_futimes="$undef"
echo " "
echo "Checking if you have a working futimes()" >&4
$cat >try.c <<EOCP
set getespwnam d_getespwnam
eval $inlibc
-
: see if getfsstat exists
set getfsstat d_getfsstat
eval $inlibc
*define*)
dflt=n
cat <<EOM
-
+
Every now and then someone has a $call() that lies about the hostname
but can't be fixed for political or economic reasons. If you wish, I can
pretend $call() isn't there and maybe compute hostname at run-time
set getpagesize d_getpagsz
eval $inlibc
+: Optional checks for getprotobyname and getprotobynumber
: see if getprotobyname exists
set getprotobyname d_getpbyname
;;
esac
+: Optional checks for getsbyname and getsbyport
: see if getservbyname exists
set getservbyname d_getsbyname
set math.h i_math
eval $inhdr
+: check to see if math.h defines _LIB_VERSION
d_libm_lib_version="$undef"
case $i_math in
$define)
- : check to see if math.h defines _LIB_VERSION
echo " "
echo "Checking to see if your libm supports _LIB_VERSION..." >&4
$cat >try.c <<EOCP
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 d_msg
eval $setvar
-
+: Check for msghdr_s
echo " "
echo "Checking to see if your system supports struct msghdr..." >&4
set d_msghdr_s msghdr $i_systypes sys/types.h $d_socket sys/socket.h $i_sysuio sys/uio.h
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
eval $setvar
$rm_try
-
+: Check basic sizes
echo " "
$echo "Choosing the C types to be used for Perl's internal types..." >&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 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
set readlink d_readlink
eval $inlibc
+: Check if exe is symlink to abs path of executing program
echo " "
procselfexe=''
val="$undef"
set pthread_attr_setscope d_pthread_attr_setscope
eval $inlibc
-
: see whether the various POSIXish _yields exist
$cat >try.c <<EOP
#include <pthread.h>
set sfio.h i_sfio
eval $inhdr
-
: see if sfio library is available
case "$i_sfio" in
$define)
set d_shm
eval $setvar
-echo " "
: see if we have sigaction
+echo " "
if set sigaction val -f d_sigaction; eval $csym; $val; then
echo 'sigaction() found.' >&4
$cat > try.c <<EOP
set sys/stat.h i_sysstat
eval $inhdr
-
: see if stat knows about block sizes
echo " "
echo "Checking to see if your struct stat has st_blocks field..." >&4
set d_statblks stat st_blocks $i_sysstat sys/stat.h
eval $hasfield
-
: see if this is a sys/vfs.h system
set sys/vfs.h i_sysvfs
eval $inhdr
-
: see if this is a sys/statfs.h system
set sys/statfs.h i_sysstatfs
eval $inhdr
-
+: Check for statfs_s
echo " "
echo "Checking to see if your system supports struct statfs..." >&4
set d_statfs_s statfs $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h $i_sysvfs sys/vfs.h $i_sysstatfs sys/statfs.h
esac
-
: see if struct statfs knows about f_flags
case "$d_statfs_s" in
-define)
+define)
echo " "
echo "Checking to see if your struct statfs has f_flags field..." >&4
set d_statfs_f_flags statfs f_flags $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h $i_sysvfs sys/vfs.h $i_sysstatfs sys/statfs.h
*) echo "No, it doesn't." ;;
esac
+: Check stream access
$cat >&4 <<EOM
Checking how to access stdio streams by file descriptor number...
EOM
#define strtoll _strtoll
#endif
#include <stdio.h>
-extern long long int strtoll(char *s, char **, int);
+extern long long int strtoll(char *s, char **, int);
static int bad = 0;
int check(char *s, long long ell, int een) {
long long gll;
$cat >try.c <<'EOCP'
#include <errno.h>
#include <stdio.h>
-extern unsigned long int strtoul(char *s, char **, int);
+extern unsigned long int strtoul(char *s, char **, int);
static int bad = 0;
void check(char *s, unsigned long eul, int een) {
unsigned long gul;
#define strtoull __strtoull
#endif
#include <stdio.h>
-extern unsigned long long int strtoull(char *s, char **, int);
+extern unsigned long long int strtoull(char *s, char **, int);
static int bad = 0;
int check(char *s, long long eull, int een) {
long long gull;
$cat >try.c <<'EOCP'
#include <errno.h>
#include <stdio.h>
-extern unsigned long long int strtouq(char *s, char **, int);
+extern unsigned long long int strtouq(char *s, char **, int);
static int bad = 0;
void check(char *s, unsigned long long eull, int een) {
unsigned long long gull;
set d_tzname
eval $setvar
+: Check if is a multiplatform env
case "$osname" in
next|rhapsody|darwin) multiarch="$define" ;;
esac
;;
esac
+: Checking 32bit aligndness
$cat <<EOM
Checking to see whether you can access character data unalignedly...
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'
set ebcdic
eval $setvar
+: Check how to flush
echo " "
$cat >&4 <<EOM
Checking how to flush all pending stdio output...
EOM
;;
esac
-$rm_try
+$rm_try tryp
: Store the full pathname to the ar program for use in the C program
: Respect a hint or command line value for full_ar.
;;
esac
+: Check the size of GID
echo " "
case "$gidtype" in
*_t) zzz="$gidtype" ;;
*) zzz="gid" ;;
esac
-echo "Checking the size of $zzz..." >&4
+echo "Checking the size of $zzz..." >&4
cat > try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
fi
+: Check if GID is signed
echo " "
case "$gidtype" in
*_t) zzz="$gidtype" ;;
*) zzz="gid" ;;
esac
-echo "Checking the sign of $zzz..." >&4
+echo "Checking the sign of $zzz..." >&4
cat > try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
fi
+: Check 64bit sizes
echo " "
if $test X"$quadtype" != X; then
;;
esac
-
+: Check format strings for internal types
echo " "
$echo "Checking the format strings to be used for Perl's internal types..." >&4
;;
esac
+: Check format string for GID
echo " "
$echo "Checking the format string to be used for gids..." >&4
set setgroups d_setgrps
eval $inlibc
-
: Find type of 2nd arg to 'getgroups()' and 'setgroups()'
echo " "
case "$d_getgrps$d_setgrps" in
*) groupstype="$gidtype";;
esac
+: MAD = Misc Attribute Definition
if $test $patchlevel -lt 9; then
: MAD is not available in 5.8.x or earlier.
fi
$rm -f foo* bar*
-: check for type of arguments to select.
+: check for type of arguments to select.
case "$selecttype" in
'') case "$d_select" in
$define)
Checking to see what type of arguments are accepted by select().
EOM
hdrs="$define sys/types.h
- $i_systime sys/time.h
+ $i_systime sys/time.h
$i_sysselct sys/select.h
$d_socket sys/socket.h"
: The first arg can be int, unsigned, or size_t
else
xxx=`echo '#include <signal.h>' |
$cppstdin $cppminus $cppflags 2>/dev/null |
- $grep '^[ ]*#.*include' |
+ $grep '^[ ]*#.*include' |
$awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
fi
: Check this list of files to be sure we have parsed the cpp output ok.
-: This will also avoid potentially non-existent files, such
+: This will also avoid potentially non-existent files, such
: as ../foo/bar.h
xxxfiles=''
for xx in $xxx /dev/null ; do
if (sig_name[$2]) {
dup_name[ndups] = $1
dup_num[ndups] = $2
- ndups++
+ ndups++
}
else {
sig_name[$2] = $1
sig_num[$2] = $2
}
}
-END {
+END {
if (nsig == 0) {
nsig = maxsig + 1
}
printf("%s %d\n", sig_name[n], sig_num[n])
}
else {
- printf("NUM%d %d\n", n, n)
+ printf("NUM%d %d\n", n, n)
}
}
for (n = 0; n < ndups; n++) {
printf "\n"
}'
sig_size=`echo $sig_name | awk '{print NF}'`
-$rm -f signal signal.c signal.awk signal.lst signal_cmd
+$rm -f signal signal.c signal.awk signal.lst signal_cmd
+: Check size of size
echo " "
case "$sizetype" in
*_t) zzz="$sizetype" ;;
*) zzz="filesize" ;;
esac
-echo "Checking the size of $zzz..." >&4
+echo "Checking the size of $zzz..." >&4
cat > try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
;;
esac
+: Check size of UID
echo " "
case "$uidtype" in
*_t) zzz="$uidtype" ;;
*) zzz="uid" ;;
esac
-echo "Checking the size of $zzz..." >&4
+echo "Checking the size of $zzz..." >&4
cat > try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
echo "(I can't compile the test program--guessing $uidsize.)" >&4
fi
+: Check if UID is signed
echo " "
case "$uidtype" in
*_t) zzz="$uidtype" ;;
fi
-
+: Check format string for UID
echo " "
$echo "Checking the format string to be used for uids..." >&4
;;
esac
-
+: Check if site customization support was requested
case "$usesitecustomize" in
$define|true|[Yy]*)
usesitecustomize="$define"
;;
esac
+: see if this is a assert.h system
+set assert.h i_assert
+eval $inhdr
+
: see if this is a fp.h system
set fp.h i_fp
eval $inhdr
i_machcthr="$undef"
fi
-
-
: see if this is a mntent.h system
set mntent.h i_mntent
eval $inhdr
set prot.h i_prot
eval $inhdr
+: Preprocessor symbols
echo " "
$echo "Guessing which symbols your C compiler and preprocessor define..." >&4
$cat <<'EOSH' > Cppsym.know
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
set i_syssockio
eval $setvar
-
: see if this is a syslog.h system
set syslog.h i_syslog
eval $inhdr
-
: see if this is a sys/mode.h system
set sys/mode.h i_sysmode
eval $inhdr
set sys/un.h i_sysun
eval $inhdr
-
: see if this is a sys/utsname.h system
set sys/utsname.h i_sysutsname
eval $inhdr
;;
esac
+: Check extensions
echo " "
echo "Looking for extensions..." >&4
: If we are using the old config.sh, known_extensions may contain
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'
doublesize='$doublesize'
drand01='$drand01'
drand48_r_proto='$drand48_r_proto'
+dtrace='$dtrace'
dynamic_ext='$dynamic_ext'
eagain='$eagain'
ebcdic='$ebcdic'
i8size='$i8size'
i8type='$i8type'
i_arpainet='$i_arpainet'
+i_assert='$i_assert'
i_bsdioctl='$i_bsdioctl'
i_crypt='$i_crypt'
i_db='$i_db'
use64bitint='$use64bitint'
usecrosscompile='$usecrosscompile'
usedl='$usedl'
+usedtrace='$usedtrace'
usefaststdio='$usefaststdio'
useithreads='$useithreads'
uselargefiles='$uselargefiles'