X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Flinux.sh;h=9837ee8031318c57d21cad07a1ebae7446c0a6b0;hb=0fa156b9cc6e57c94350bf8b3486af3d1c7dd41d;hp=82b8703232f34203f01f502c59e95a77e6626619;hpb=c1d22f6b609261e5abd7381bd017773c7ae58346;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/linux.sh b/hints/linux.sh index 82b8703..9837ee8 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -63,7 +63,7 @@ ignore_versioned_solibs='y' # intending to replace /usr/bin/perl (at least just yet). # This change makes linux consistent with most other unix platforms # in having a default of prefix=/usr/local. -# These notes can probably safely be removed in 5.006_50 and beyond. +# These notes can probably safely be removed in 5.005_50 and beyond. # # 9 April 1999 Andy Dougherty # @@ -97,7 +97,19 @@ case "$usemymalloc" in esac case "$optimize" in -'') optimize='-O2' ;; +'') # If we have modern enough gcc and well-supported enough CPU, + # crank up the optimization level. + case "`${cc:-gcc} -v 2>&1`" in + *gcc-2.95*|*gcc-3.*) + case "`arch 2>&1`" in + i?86|ppc) optimize='-O3' ;; + esac + ;; + esac + case "$optimize" in + '') optimize='-O2' ;; + esac + ;; esac # Are we using ELF? Thanks to Kenneth Albanowski @@ -119,7 +131,7 @@ main() { exit(0); /* succeed (yes, it's ELF) */ } EOM -if ${cc:-gcc} try.c >/dev/null 2>&1 && ./a.out; then +if ${cc:-gcc} try.c >/dev/null 2>&1 && $run ./a.out; then cat <<'EOM' >&4 You appear to have ELF support. I'll try to use it for dynamic loading. @@ -189,7 +201,7 @@ fi rm -f try.c a.out -if /bin/bash -c exit; then +if /bin/sh -c exit; then echo '' echo 'You appear to have a working bash. Good.' else @@ -219,21 +231,22 @@ fi # For this reason I suggest using the much bug-fixed tcsh for globbing # where available. -if [ ! "`csh -c 'echo $version' 2>/dev/null`" ] -then - echo 'Real csh found (might break); looking for tcsh ...' - # Use ./UU/loc to find tcsh. (We no longer run in the hints/ directory) +# November 2001: That warning's pretty old now and probably not so +# relevant, especially since perl now uses File::Glob for globbing. +# We'll still look for tcsh, but tone down the warnings. +# Andy Dougherty, Nov. 6, 2001 +if $csh -c 'echo $version' >/dev/null 2>&1; then + echo 'Your csh is really tcsh. Good.' +else if xxx=`./UU/loc tcsh blurfl $pth`; $test -f "$xxx"; then echo "Found tcsh. I'll use it for globbing." # We can't change Configure's setting of $csh, due to the way # Configure handles $d_portable and commands found in $loclist. # We can set the value for CSH in config.h by setting full_csh. full_csh=$xxx - else - echo "Couldn't find tcsh. BEWARE: GLOBBING MIGHT BE BROKEN." + elif [ -f "$csh" ]; then + echo "Couldn't find tcsh. Csh-based globbing might be broken." fi -else - echo 'Your csh is really tcsh. Good.' fi # Shimpei Yamashita @@ -276,3 +289,16 @@ $define|true|[yY]*) ;; esac EOCBU + +cat > UU/uselargefiles.cbu <<'EOCBU' +# This script UU/uselargefiles.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use large files. +case "$uselargefiles" in +''|$define|true|[yY]*) +# Keep this in the left margin. +ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + + ccflags="$ccflags $ccflags_uselargefiles" + ;; +esac +EOCBU