Continue cpp symbol update.
[p5sagit/p5-mst-13.2.git] / hints / solaris_2.sh
index 9b4f5e2..8c280e3 100644 (file)
@@ -333,6 +333,30 @@ EOM
 esac
 EOCBU
 
+# This script UU/uselfs.cbu will get 'called-back' by Configure 
+# after it has prompted the user for whether to use large files.
+cat > UU/uselfs.cbu <<'EOCBU'
+case "$uselargefiles" in
+$define|true|[yY]*)
+       lfcflags="`getconf LFS_CFLAGS 2>/dev/null`"
+       lfldflags="`getconf LFS_LDFLAGS 2>/dev/null`"
+       lflibs="`getconf LFS_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`"
+       case "$lfcflags$lfldflags$lflibs" in
+       '');;
+       *) uselonglong="$define"
+           echo "(Large files in Solaris require also long longs, using long longs...)"
+          ccflags="$ccflags -DUSE_LONG_LONG $lfcflags"
+          ldflags="$ldflags $ldldflags"
+          libswanted="$libswanted $lflibs"
+          ;;
+       esac
+       lfcflags=''
+       lfldflags=''
+       lflibs=''
+       ;;
+esac
+EOCBU
+
 # This script UU/use64bits.cbu will get 'called-back' by Configure 
 # after it has prompted the user for whether to use 64 bits.
 cat > UU/use64bits.cbu <<'EOCBU'
@@ -347,10 +371,10 @@ EOM
                exit 1
                ;;
            esac
-           ccflags="$ccflags `getconf LFS_CFLAGS`"
-           ldflags="$ldflags `getconf LFS_LDFLAGS`"
-           libswanted="$libswanted `getconf LFS_LIBS`"
-           ccflags="$ccflags -DUSE_LONG_LONG"
+           case "$ccflags" in
+           *-DUSE_LONG_LONG*) ;;
+           *) ccflags="$ccflags -DUSE_LONG_LONG" ;;
+           esac
            # When a 64-bit cc becomes available $archname64
            # may need setting so that $archname gets it attached.
            ;;