;;
esac
-# Even if you use gcc, prefer the HP math library over the GNU one.
-
-case "`$cc -v 2>&1`" in
-"*gcc*" ) test -d /lib/pa1.1 && ccflags="$ccflags -L/lib/pa1.1" ;;
-esac
-
# Determine the architecture type of this system.
# Keep leading tab below -- Configure Black Magic -- RAM, 03/02/97
xxOsRevMajor=`uname -r | sed -e 's/^[^0-9]*//' | cut -d. -f1`;
selecttype='int *'
fi
+case "$use64bitint" in
+$define|true|[yY]*)
+ if [ "$xxOsRevMajor" -lt 11 ]; then
+ cat <<EOM >&4
+
+64-bit compilation is not supported on HP-UX $xxOsRevMajor.
+You need at least HP-UX 11.0.
+Cannot continue, aborting.
+
+EOM
+ exit 1
+ fi
+
+ # Without the 64-bit libc we cannot do much.
+ if [ ! -f /lib/pa20_64/libc.sl ]; then
+ cat <<EOM >&4
+
+You do not seem to have the 64-bit libraries in /lib/pa20_64.
+Most importantly, I cannot find /lib/pa20_64/libc.sl.
+Cannot continue, aborting.
+
+EOM
+ exit 1
+ fi
+
+ ccflags="$ccflags +DD64"
+ ldflags="$ldflags +DD64"
+ loclibpth="$loclibpth /lib/pa20_64"
+ libscheck='case "`file $xxx`" in
+*LP64*|*PA-RISC2.0*) ;;
+*) xxx=/no/64-bit$xxx ;;
+esac'
+ ld=/usr/bin/ld
+ ar=/usr/bin/ar
+ full_ar=$ar
+
+ # The strict ANSI mode (-Aa) doesn't like the LL suffixes.
+ case "$ccflags" in
+ *-Aa*)
+ echo "(Changing from strict ANSI compilation to extended because of 64-bitness)"
+ ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'`
+ ;;
+ esac
+
+ set `echo " $libswanted " | sed -e 's@ dl @ @'`
+ libswanted="$*"
+
+ case "`$cc -v 2>&1`" in
+ *gcc*) ccflags="$ccflags -L/lib/pa20_64" ;;
+ esac
+ ;;
+*) loclibpth="$loclibpth /lib/pa1.1"
+ case "`$cc -v 2>&1`" in
+ *gcc*) ccflags="$ccflags -L/lib/pa20_64" ;;
+ esac
+ ;;
+esac
+
+case "`getconf KERNEL_BITS 2>/dev/null`" in
+*64*) ldflags="$ldflags -Wl,+vnocompatwarnings" ;;
+esac
+
# Remove bad libraries that will cause problems
# (This doesn't remove libraries that don't actually exist)
# -lld is unneeded (and I can't figure out what it's used for anyway)
*gcc*) ccflags="$ccflags -DUINT32_MAX_BROKEN" ;;
esac
+cat > UU/cc.cbu <<'EOSH'
+# XXX This script UU/cc.cbu will get 'called-back' by Configure after it
+# XXX has prompted the user for the C compiler to use.
+# Get gcc to share its secrets.
+echo 'main() { return 0; }' > try.c
+ # Indent to avoid propagation to config.sh
+ verbose=`${cc:-cc} -v -o try try.c 2>&1`
+if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then
+ # Using gcc.
+ : nothing to see here, move on.
+else
+ # Using cc.
+ ar=${ar:-ar}
+ case "`$ar -V 2>&1`" in
+ *GNU*)
+ if test -x /usr/bin/ar; then
+ cat <<END >&2
+
+NOTE: You are using HP cc(1) but GNU ar(1). This might lead into trouble
+later on, I'm switching to HP ar to play safe.
+END
+ ar=/usr/bin/ar
+ fi
+ ;;
+ esac
+fi
+
+EOSH
+
# Date: Fri, 6 Sep 96 23:15:31 CDT
# From: "Daniel S. Lewart" <d-lewart@uiuc.edu>
# I looked through the gcc.info and found this:
esac
EOCBU
-# This script UU/use64bits.cbu will get 'called-back' by Configure
+# This script UU/uselfs.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use 64 bits.
-cat > UU/use64bits.cbu <<'EOCBU'
-case "$use64bits" in
-$define|true|[yY]*)
- if [ "$xxOsRevMajor" -lt 11 ]; then
- cat <<EOM >&4
-64-bit compilation is not supported on HP-UX $xxOsRevMajor.
-You need at least HP-UX 11.0.
-Cannot continue, aborting.
-EOM
- exit 1
- fi
- if [ ! -f /lib/pa20_64/libc.sl ]; then
- cat <<EOM >&4
-You do not seem to have the 64-bit libraries in /lib/pa20_64.
-Most importantly, I cannot find /lib/pa20_64/libc.sl.
-Cannot continue, aborting.
-EOM
- exit 1
- fi
- ccflags="$ccflags +DD64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
- ldflags="$ldflags +DD64"
- ld=/usr/bin/ld
- set `echo " $libswanted " | sed -e 's@ dl @ @'`
- libswanted="$*"
- glibpth="/lib/pa20_64"
+cat > UU/uselfs.cbu <<'EOCBU'
+case "$uselargefiles" in
+''|$define|true|[yY]*)
+ # there are largefile flags available via getconf(1)
+ # but we cheat for now.
+ ccflags="$ccflags -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
+ # The strict ANSI mode (-Aa) doesn't like large files.
+ case "$ccflags" in
+ *-Aa*)
+ echo "(Changing from strict ANSI compilation to extended because of large files)"
+ ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'`
+ ;;
+ esac
+ ;;
esac
EOCBU
+
+