# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Thu Feb 24 20:37:06 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Fri Feb 25 07:45:17 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
longdblsize=''
d_longlong=''
longlongsize=''
+d_lseekproto=''
d_lstat=''
d_mblen=''
d_mbstowcs=''
api_version=''
api_versionstring=''
patchlevel=''
+revision=''
subversion=''
version=''
+perl5=''
perladmin=''
perlpath=''
d_nv_preserves_uv=''
uidtype=''
archname64=''
use64bits=''
+usefull64bits=''
uselargefiles=''
uselongdouble=''
usemorebits=''
more
nm
nroff
-perl
pg
test
uname
$define|true|[yY]*) dflt='y';;
*) dflt='n';;
esac
+ echo " "
echo "If this doesn't make any sense to you, just accept the default '$dflt'."
rp='Build Perl for multiplicity?'
. ./myread
eval $typedef_ask
echo " "
-$echo $n "Checking to see how big your file offsets are...$c" >&4
+echo "Checking to see how big your file offsets are..." >&4
$cat >try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
set try
if eval $compile_ok; then
lseeksize=`./try`
- $echo " $lseeksize bytes." >&4
+ echo "Your file offsets are $lseeksize bytes long."
else
dflt=$longsize
echo " "
*_t) zzz="$fpostype" ;;
*) zzz="fpos_t" ;;
esac
-$echo $n "Checking the size of $zzz...$c" >&4
+echo "Checking the size of $zzz..." >&4
cat > try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
yyy=`./try`
case "$yyy" in
'') fpossize=4
- echo " " >&4
echo "(I can't execute the test program--guessing $fpossize.)" >&4
;;
*) fpossize=$yyy
- echo " $fpossize bytes." >&4
+ echo "Your $zzz is bytes long." >&4
;;
esac
else
echo "Your platform has some specific hints for large file builds, using them..."
. ./uselfs.cbu
echo " "
- $echo $n "Rechecking to see how big your file offsets are...$c" >&4
+ echo "Rechecking to see how big your file offsets are..." >&4
$cat >try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
set try
if eval $compile_ok; then
lseeksize=`./try`
- $echo " $lseeksize bytes." >&4
+ $echo "Your file offsets are now $lseeksize bytes long."
else
dflt="$lseeksize"
echo " "
echo "(I can't execute the test program--guessing $fpossize.)" >&4
;;
*) fpossize=$yyy
- echo " $fpossize bytes."
+ echo " $fpossize bytes." >&4
;;
esac
else
esac
-case "$intsize:$longsize" in
-8:*|*:8) cat <<EOM
+# Backward compatibility (uselonglong is deprecated).
+case "$uselonglong" in
+"$define"|true|[yY]*)
+ cat <<EOM >&4
+
+*** Configure -Duselonglong is deprecated, using the -Duse64bits instead.
-You have natively 64-bit integers.
+EOM
+ use64bits="$define"
+ ;;
+esac
+case "$ccflags" in
+*-DUSE_LONG_LONG*|*-DUSE_64_BITS*|*-DUSE_FULL_64_BITS*) use64bits="$define";;
+esac
+case "$usefull64bits" in
+"$define"|true|[yY]*) use64bits="$define" ;;
+esac
+
+case "$longsize" in
+8) cat <<EOM
+
+You have natively 64-bit long integers.
EOM
val="$define"
;;
-*) case "$ccflags" in
- *-DUSE_64_BITS*|*-DUSE_LONG_LONG*) use64bits="$define";;
- *) case "$uselonglong" in
- $define|true|[yY]*) use64bits="$define";;
- esac
- ;;
- esac
- case "$use64bits" in
- $define|true|[yY]*) dflt='y';;
+*) case "$use64bits" in
+ "$define"|true|[yY]*) dflt='y';;
*) dflt='n';;
esac
-cat <<EOM
+ cat <<EOM
Perl can be built to take advantage of 64-bit integer types
on some systems. To do so, Configure can be run with -Duse64bits.
+Choosing this option will most probably introduce binary incompatibilities.
If this doesn't make any sense to you, just accept the default '$dflt'.
EOM
set use64bits
eval $setvar
-case "$archname64" in
-'') archname64='' ;; # not a typo
-esac
+case "$usefull64bits" in
+"$define"|true|[yY]*) val="$define" ;;
+*) case "$use64bits" in
+ "$define") case "$longsize" in
+ 4) dflt='n'
+ cat <<EOM
+
+Since you chose 64-bitness you may want to try maximal 64-bitness.
+What you have chosen is minimal 64-bitness which means just enough
+to get 64-bit integers. The maximal means using as much 64-bitness
+as is possible on the platform. This in turn means even more binary
+incompatibilities. On the other hand, your platform may not have
+any more maximal 64-bitness than what you already have chosen.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+ rp='Try to use full 64-bit support, if available?'
+ . ./myread
+ case "$ans" in
+ [yY]*) val="$define" ;;
+ *) val="$undef" ;;
+ esac
+ ;;
+ 8) val="$define" ;;
+ *) val="$undef" ;;
+ esac
+ ;;
+ *) val="$undef" ;;
+ esac
+ ;;
+esac
+set usefull64bits
+eval $setvar
case "$use64bits" in
"$define"|true|[yY]*)
if $test -f use64bits.cbu; then
echo "Your platform has some specific hints for 64-bit builds, using them..."
. ./use64bits.cbu
- else
- $cat <<EOM
-(Your platform doesn't have any specific hints for 64-bit builds.)
-EOM
- case "$intsize:$longsize" in
-8:*|*:8) cat <<EOM
-(This is probably okay, as your system is a natively 64-bit system.)
-EOM
- ;;
- esac
- case "$gccversion" in
- '') ;;
- *) case "$ccflags" in
- *-DUSE_64_BITS*) ;;
- *) $cat <<EOM
-But since you seem to be using gcc, I will now add -DUSE_64_BITS
-to the compilation flags to get long longs.
-EOM
- ccflags="$ccflags -DUSE_64_BITS"
- ;;
- esac
- ;;
- esac
fi
+ case "$longsize" in
+ 4) case "$ccflags" in
+ *-DUSE_64_BITS*) ;;
+ *) ccflags="$ccflags -DUSE_64_BITS";;
+ esac
+ case "$archname64" in
+ '') archname64=64 ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
+case "$usefull64bits" in
+"$define"|true|[yY]*)
+: Look for a hint-file generated 'call-back-unit'. If the
+: user has specified that a full 64-bit perl is to be built,
+: we may need to set or change some other defaults.
+ if $test -f usefull64bits.cbu; then
+ echo "Your platform has some specific hints for full 64-bit builds, using them..."
+ . ./usefull64bits.cbu
+ fi
+ case "$longsize" in
+ 4) case "$ccflags" in
+ *-DUSE_FULL_64_BITS*) ;;
+ *) ccflags="$ccflags -DUSE_FULL_64_BITS";;
+ esac
+ case "$archname64" in
+ ''|64) archname64=full64 ;;
+ esac
+ ;;
+ esac
;;
esac
esac;;
esac'
-: set the base revision
-baserev=5.0
-
: get the patchlevel
echo " "
echo "Getting the current patchlevel..." >&4
if $test -r $rsrc/patchlevel.h;then
+ revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
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`
else
+ revision=0
patchlevel=0
subversion=0
api_revision=0
api_version=0
api_subversion=0
fi
-$echo $n "(You have $package" $c
-case "$package" in
-"*$baserev") ;;
-*) $echo $n " $baserev" $c ;;
-esac
+$echo $n "(You have $package revision $revision" $c
$echo $n " patchlevel $patchlevel" $c
test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c
echo ".)"
case "$osname" in
dos|vms)
: XXX Should be a Configure test for double-dots in filenames.
- version=`echo $baserev $patchlevel $subversion | \
+ version=`echo $revision $patchlevel $subversion | \
$awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
api_versionstring=`echo $api_revision $api_version $api_subversion | \
$awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
;;
*)
- version=`echo $baserev $patchlevel $subversion | \
+ version=`echo $revision $patchlevel $subversion | \
$awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
api_versionstring=`echo $api_revision $api_version $api_subversion | \
$awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
rp='Do you want to configure vendor-specific add-on directories?'
case "$usevendorprefix" in
define|true|[yY]*) dflt=y ;;
-*) dflt=n ;;
+*) : User may have set vendorprefix directly on Configure command line.
+ case "$vendorprefix" in
+ ''|' ') dflt=n ;;
+ *) dflt=y ;;
+ esac
+ ;;
esac
. ./myread
case "$ans" in
*) dflt=$vendorprefix ;;
esac
. ./getfile
+ : XXX Prefixit unit does not yet support siteprefix and vendorprefix
oldvendorprefix=''
case "$vendorprefix" in
'') ;;
*) d_vendorlib="$define"
: determine where vendor-supplied modules go.
: Usual default is /usr/local/lib/perl5/vendor_perl/$version
- prog=`echo $package | $sed 's/-*[0-9.]*$//'`
- case "$installstyle" in
- *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
- *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
+ case "$vendorlib" in
+ '')
+ prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+ case "$installstyle" in
+ *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
+ *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
+ esac
+ ;;
+ *) dflt="$vendorlib"
+ ;;
esac
fn=d~+
rp='Pathname for the vendor-supplied library files?'
. ./getfile
vendorlib="$ans"
vendorlibexp="$ansexp"
- : Change installation prefix, if necessary.
- if $test X"$prefix" != X"$installprefix"; then
- installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
- else
- installvendorlib="$vendorlibexp"
- fi
;;
esac
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+ installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
+else
+ installvendorlib="$vendorlibexp"
+fi
: Cruising for prototypes
echo " "
installbin="$binexp"
fi
+: Find perl5.005 or later.
+echo "Looking for a previously installed perl5.005 or later... "
+case "$perl5" in
+'') for tdir in `echo "$binexp:$PATH" | $sed "s/$path_sep/ /g"`; do
+ : Check if this perl is recent and can load a simple module
+ if $test -x $tdir/perl && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
+ perl5=$tdir/perl
+ break;
+ elif $test -x $tdir/perl5 && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
+ perl5=$tdir/perl
+ break;
+ fi
+ done
+ ;;
+*) perl5="$perl5"
+ ;;
+esac
+case "$perl5" in
+'') echo "None found. That's ok.";;
+*) echo "Using $perl5." ;;
+esac
+
$cat <<EOM
After $package is installed, you may wish to install various
*) dflt=$siteprefix ;;
esac
. ./getfile
+: XXX Prefixit unit does not yet support siteprefix and vendorprefix
oldsiteprefix=''
case "$siteprefix" in
'') ;;
-*)
- case "$ans" in
+*) case "$ans" in
"$prefix") ;;
*) oldsiteprefix="$prefix";;
esac
: The default "style" setting is made in installstyle.U
: XXX No longer works with Prefixit stuff.
prog=`echo $package | $sed 's/-*[0-9.]*$//'`
-case "$installstyle" in
-*lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
-*) dflt=$siteprefix/lib/site_$prog/$version ;;
+case "$sitelib" in
+'') case "$installstyle" in
+ *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
+ *) dflt=$siteprefix/lib/site_$prog/$version ;;
+ esac
+ ;;
+*) dflt="$sitelib"
+ ;;
esac
$cat <<EOM
sitelibexp="$ansexp"
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installsitelib=`echo $sitelibexp | sed "s#^$prefix#$installprefix#"`
+ installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
else
installsitelib="$sitelibexp"
fi
: Determine list of previous versions to include in @INC
$cat > getverlist <<EOPL
-#!$perl -w
+#!$perl5 -w
use File::Basename;
\$api_versionstring = "$api_versionstring";
\$version = "$version";
# Can't have leading @ because metaconfig interprets it as a command!
;@inc_version_list=();
$stem=dirname($sitelib);
-# Redo to do opendir/readdir?
+# XXX Redo to do opendir/readdir?
if (-d $stem) {
chdir($stem);
;@candidates = glob("5.*");
EOPL
chmod +x getverlist
case "$inc_version_list" in
-'') if test -x $perl; then
- dflt=`$perl getverlist`
+'') if test -x "$perl5"; then
+ dflt=`$perl5 getverlist`
else
dflt='none'
fi
$undef) dflt='none' ;;
*) dflt="$inc_version_list" ;;
esac
+case "$dflt" in
+''|' ') dflt=none ;;
+esac
$cat <<'EOM'
In order to ease the process of upgrading, this version of perl
rp='List of earlier versions to include in @INC?'
. ./myread
case "$ans" in
-[Nn]one) inc_version_list=' ' ;;
+[Nn]one|''|' ') inc_version_list=' ' ;;
*) inc_version_list="$ans" ;;
esac
case "$inc_version_list" in
: sitelib default is /usr/local/lib/perl5/site_perl/$version
: sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
: sitelib may have an optional trailing /share.
-tdflt=`echo $sitelib | $sed 's,/share$,,'`
-tdflt="$tdflt/$archname"
-set sitearch sitearch none
-eval $prefixit
case "$sitearch" in
-'') dflt="$tdflt" ;;
-*) dflt="$sitearch" ;;
+'') dflt=`echo $sitelib | $sed 's,/share$,,'`
+ dflt="$dflt/$archname"
+ ;;
+*) dflt="$sitearch"
+ ;;
esac
+set sitearch sitearch none
+eval $prefixit
$cat <<EOM
The installation process will also create a directory for
architecture-dependent site-specific extensions and modules.
EOM
-fn=nd~+
+fn=d~+
rp='Pathname for the site-specific architecture-dependent library files?'
. ./getfile
sitearch="$ans"
: determine where add-on public executables go
case "$sitebin" in
'') dflt=$siteprefix/bin ;;
-*) dflt=$sitebin ;;
+*) dflt=$sitebin ;;
esac
fn=d~
rp='Pathname where the add-on public executables should be installed?'
;;
*) d_vendorbin="$define"
: determine where vendor-supplied executables go.
- dflt=$vendorprefix/bin
+ case "$vendorbin" in
+ '') dflt=$vendorprefix/bin ;;
+ *) dflt="$vendorbin" ;;
+ esac
fn=d~+
rp='Pathname for the vendor-supplied executables directory?'
. ./getfile
vendorbin="$ans"
vendorbinexp="$ansexp"
- : Change installation prefix, if necessary.
- if $test X"$prefix" != X"$installprefix"; then
- installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
- else
- installvendorbin="$vendorbinexp"
- fi
;;
esac
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+ installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
+else
+ installvendorbin="$vendorbinexp"
+fi
: check for length of double
echo " "
case "$doublesize" in
'')
- $echo $n "Checking to see how big your double precision numbers are...$c" >&4
+ echo "Checking to see how big your double precision numbers are..." >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
int main()
set try
if eval $compile_ok; then
doublesize=`./try`
- $echo " $doublesize bytes." >&4
+ echo "Your double is $doublesize bytes long."
else
dflt='8'
echo "(I can't seem to compile the test program. Guessing...)"
case "${d_longdbl}${longdblsize}" in
$define)
echo " "
- $echo $n "Checking to see how big your long doubles are..." $c >&4
+ echo "Checking to see how big your long doubles are..." >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
int main()
set try
if eval $compile; then
longdblsize=`./try$exe_ext`
- $echo " $longdblsize bytes." >&4
+ echo "Your long doubles are $longdblsize bytes long."
else
dflt='8'
echo " "
case "${d_longlong}${longlongsize}" in
$define)
echo " "
- $echo $n "Checking to see how big your long longs are..." $c >&4
+ echo "Checking to see how big your long longs are..." >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
int main()
set try
if eval $compile_ok; then
longlongsize=`./try$exe_ext`
- $echo " $longlongsize bytes." >&4
+ echo "Your long longs are $longlongsize bytes long."
else
dflt='8'
echo " "
esac
$rm -f try.* try
+: see if prototype for lseek is available
+echo " "
+set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
+eval $hasproto
+
: see if lstat exists
set lstat d_lstat
eval $inlibc
esac
+: set the base revision
+baserev=5.0
+
: check for ordering of bytes in a long
echo " "
case "$crosscompile$multiarch" in
echo "(I can't execute the test program--guessing $gidsize.)" >&4
;;
*) gidsize=$yyy
- echo "Your $zzz size is $gidsize bytes."
+ echo "Your $zzz is $gidsize bytes long."
;;
esac
else
echo " "
case "$ptrsize" in
'')
- $echo $n "Checking to see how big your pointers are...$c" >&4
+ echo "Checking to see how big your pointers are..." >&4
if test "$voidflags" -gt 7; then
echo '#define VOID_PTR char *' > try.c
else
set try
if eval $compile_ok; then
ptrsize=`./try`
- $echo " $ptrsize bytes." >&4
+ echo "Your pointers are $ptrsize bytes long."
else
dflt='4'
echo "(I can't seem to compile the test program. Guessing...)" >&4
echo "(I can't execute the test program--guessing $uidsize.)" >&4
;;
*) uidsize=$yyy
- echo "Your $zzz size is $uidsize bytes."
+ echo "Your $zzz is $uidsize bytes long."
;;
esac
else
d_lockf='$d_lockf'
d_longdbl='$d_longdbl'
d_longlong='$d_longlong'
+d_lseekproto='$d_lseekproto'
d_lstat='$d_lstat'
d_mblen='$d_mblen'
d_mbstowcs='$d_mbstowcs'
passcat='$passcat'
patchlevel='$patchlevel'
path_sep='$path_sep'
+perl5='$perl5'
perl='$perl'
perladmin='$perladmin'
perlpath='$perlpath'
randseedtype='$randseedtype'
ranlib='$ranlib'
rd_nodata='$rd_nodata'
+revision='$revision'
rm='$rm'
rmail='$rmail'
runnm='$runnm'
use5005threads='$use5005threads'
use64bits='$use64bits'
usedl='$usedl'
+usefull64bits='$usefull64bits'
useithreads='$useithreads'
uselargefiles='$uselargefiles'
uselongdouble='$uselongdouble'