diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-02-25 05:57:59 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-02-25 05:57:59 +0000 |
commit | 49c10eea37fecdc3f701b564ab530e9176f545c4 (patch) | |
tree | 41856d01989a7712edb8c97692b1587e187fff02 /Configure | |
parent | e2bade80ab299fb4a9c08fa52e9a2dca32adff84 (diff) | |
download | perl-49c10eea37fecdc3f701b564ab530e9176f545c4.tar.gz |
Megalopatch for Configure: Andy's new installation schemes;
introduce usefull64bits, beautify and regularize the various
type probes; introduce d_lseekproto.
p4raw-id: //depot/cfgperl@5253
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 319 |
1 files changed, 213 insertions, 106 deletions
@@ -20,7 +20,7 @@ # $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 @@ -415,6 +415,7 @@ d_longdbl='' longdblsize='' d_longlong='' longlongsize='' +d_lseekproto='' d_lstat='' d_mblen='' d_mbstowcs='' @@ -777,8 +778,10 @@ api_subversion='' api_version='' api_versionstring='' patchlevel='' +revision='' subversion='' version='' +perl5='' perladmin='' perlpath='' d_nv_preserves_uv='' @@ -879,6 +882,7 @@ uidsize='' uidtype='' archname64='' use64bits='' +usefull64bits='' uselargefiles='' uselongdouble='' usemorebits='' @@ -1879,7 +1883,6 @@ ln more nm nroff -perl pg test uname @@ -2727,6 +2730,7 @@ EOM $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 @@ -4221,7 +4225,7 @@ set off_t lseektype long stdio.h sys/types.h 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> @@ -4234,7 +4238,7 @@ EOCP 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 " " @@ -4255,7 +4259,7 @@ case "$fpostype" in *_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> @@ -4269,11 +4273,10 @@ if eval $compile_ok; then 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 @@ -4323,7 +4326,7 @@ case "$uselargefiles" in 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> @@ -4336,7 +4339,7 @@ EOCP 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 " " @@ -4367,7 +4370,7 @@ EOCP echo "(I can't execute the test program--guessing $fpossize.)" >&4 ;; *) fpossize=$yyy - echo " $fpossize bytes." + echo " $fpossize bytes." >&4 ;; esac else @@ -4395,28 +4398,40 @@ case "$usemorebits" in 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 @@ -4431,9 +4446,39 @@ esac 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]*) @@ -4443,30 +4488,39 @@ case "$use64bits" in 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 @@ -4654,44 +4708,39 @@ prefixit='case "$3" in 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 }'` @@ -5146,7 +5195,12 @@ EOM 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 @@ -5157,6 +5211,7 @@ case "$ans" in *) dflt=$vendorprefix ;; esac . ./getfile + : XXX Prefixit unit does not yet support siteprefix and vendorprefix oldvendorprefix='' case "$vendorprefix" in '') ;; @@ -5184,24 +5239,30 @@ 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 " " @@ -5264,6 +5325,28 @@ else 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 @@ -5287,11 +5370,11 @@ case "$siteprefix" in *) 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 @@ -5305,9 +5388,14 @@ siteprefixexp="$ansexp" : 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 @@ -5324,14 +5412,14 @@ sitelib="$ans" 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"; @@ -5342,7 +5430,7 @@ EOPL # 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.*"); @@ -5382,8 +5470,8 @@ else { 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 @@ -5391,6 +5479,9 @@ case "$inc_version_list" in $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 @@ -5408,7 +5499,7 @@ EOM 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 @@ -6974,21 +7065,22 @@ fi : 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" @@ -7003,7 +7095,7 @@ fi : 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?' @@ -7114,26 +7206,29 @@ case "$vendorprefix" in ;; *) 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() @@ -7145,7 +7240,7 @@ EOCP 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...)" @@ -7177,7 +7272,7 @@ eval $setvar 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() @@ -7189,7 +7284,7 @@ EOCP 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 " " @@ -9416,7 +9511,7 @@ eval $setvar 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() @@ -9428,7 +9523,7 @@ EOCP 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 " " @@ -9444,6 +9539,11 @@ EOCP 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 @@ -11595,6 +11695,9 @@ EOCP esac +: set the base revision +baserev=5.0 + : check for ordering of bytes in a long echo " " case "$crosscompile$multiarch" in @@ -12371,7 +12474,7 @@ if eval $compile_ok; then 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 @@ -12916,7 +13019,7 @@ pm_apiversion='5.005' 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 @@ -12933,7 +13036,7 @@ EOCP 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 @@ -13512,7 +13615,7 @@ if eval $compile_ok; then 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 @@ -14739,6 +14842,7 @@ d_locconv='$d_locconv' 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' @@ -15136,6 +15240,7 @@ pager='$pager' passcat='$passcat' patchlevel='$patchlevel' path_sep='$path_sep' +perl5='$perl5' perl='$perl' perladmin='$perladmin' perlpath='$perlpath' @@ -15159,6 +15264,7 @@ randfunc='$randfunc' randseedtype='$randseedtype' ranlib='$ranlib' rd_nodata='$rd_nodata' +revision='$revision' rm='$rm' rmail='$rmail' runnm='$runnm' @@ -15259,6 +15365,7 @@ uquadtype='$uquadtype' use5005threads='$use5005threads' use64bits='$use64bits' usedl='$usedl' +usefull64bits='$usefull64bits' useithreads='$useithreads' uselargefiles='$uselargefiles' uselongdouble='$uselongdouble' |