Re: [PATCH 5.6.1] OS2 linking
[p5sagit/p5-mst-13.2.git] / hints / linux.sh
index c1172ca..3234aea 100644 (file)
@@ -63,14 +63,11 @@ 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  <doughera@lafayette.edu>
 #
 
-# gcc-2.6.3 defines _G_HAVE_BOOL to 1, but doesn't actually supply bool.
-ccflags="-Dbool=char -DHAS_BOOL $ccflags"
-
 # BSD compatability library no longer needed
 # 'kaffe' has a /usr/lib/libnet.so which is not at all relevent for perl.
 set `echo X "$libswanted "| sed -e 's/ bsd / /' -e 's/ net / /'`
@@ -122,7 +119,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.
@@ -192,7 +189,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
@@ -258,6 +255,15 @@ fi
 #'osfmach3ppc') ccdlflags='-Wl,-E' ;;
 #esac
 
+case "`uname -r`" in
+sparc-linux)
+       case "$cccdlflags" in
+       *-fpic*) cccdlflags="`echo $cccdlflags|sed 's/-fpic/-fPIC/'`" ;;
+       *)       cccdlflags="$cccdlflags -fPIC" ;;
+       esac
+       ;;
+esac
+
 # This script UU/usethreads.cbu will get 'called-back' by Configure 
 # after it has prompted the user for whether to use threads.
 cat > UU/usethreads.cbu <<'EOCBU'
@@ -270,3 +276,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