# 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 Tue Jan 1 21:34:35 CET 2008 [metaconfig 3.0 PL70]
+# Generated on Wed Jan 9 22:02:14 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
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 ./*
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)
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.
FOO
+: Check what type of C compiler we use
cat <<EOS >trygcc
$startsh
EOS
;;
esac
-
+: Check for Cross-Compilation
case "$usecrosscompile" in
$define|true|[yY]*)
$echo "Cross-compiling..."
rp='Build Perl for SOCKS?'
. ./myread
case "$ans" in
-y|Y) val="$define" ;;
+y|Y) val="$define" ;;
*) val="$undef" ;;
esac
set usesocks
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' ;;
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
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."
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 gcctest.out
+$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
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
+: 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'
set dld.h i_dld
eval $inhdr
-
+: Check if we are using C++
echo " "
echo "Checking for C++..." >&4
$cat >try.c <<'EOCP'
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
val="$undef"; set i_stdarg; eval $setvar
val="$undef"; set i_varargs; eval $setvar
;;
-*)
+*)
set i_varhdr
eval $setvar
case "$i_varhdr" in
}
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 fcntl d_fcntl
eval $inlibc
-echo " "
: See if fcntl-based locking works.
+echo " "
$cat >try.c <<EOCP
#$i_stdlib I_STDLIB
#ifdef I_STDLIB
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
*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 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
eval $setvar
$rm_try
-
+: Check basic sizes
echo " "
$echo "Choosing the C types to be used for Perl's internal types..." >&4
set readlink d_readlink
eval $inlibc
+: Check if exe is symlink to abs path of executing program
echo " "
procselfexe=''
val="$undef"
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
*) 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...
;;
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
*) groupstype="$gidtype";;
esac
+: MAD = Misc Attribute Definition
if $test $patchlevel -lt 9; then
: MAD is not available in 5.8.x or earlier.
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++) {
sig_size=`echo $sig_name | awk '{print NF}'`
$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" ;;
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
;;
esac
+: Check extensions
echo " "
echo "Looking for extensions..." >&4
: If we are using the old config.sh, known_extensions may contain