+ ;;
+esac
+EOCBU
+
+cat > UU/use64bitall.cbu <<'EOCBU'
+# This script UU/use64bitall.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to be maximally 64-bitty.
+case "$use64bitall" in
+$define|true|[yY]*)
+ case "`oslevel`" in
+ 3.*|4.[012].*)
+ cat >&4 <<EOM
+AIX `oslevel` does not support 64-bit interfaces.
+You should upgrade to at least AIX 4.3.
+EOM
+ exit 1
+ ;;
+ esac
+ echo " "
+ echo "Checking the CPU width of your hardware..." >&4
+ $cat >size.c <<EOCP
+#include <stdio.h>
+#include <sys/systemcfg.h>
+int main (void)
+{
+ printf("%d\n",_system_configuration.width);
+ return(0);
+}
+EOCP
+ set size
+ if eval $compile_ok; then
+ qacpuwidth=`./size`
+ echo "You are running on $qacpuwidth bit hardware."
+ else
+ dflt="32"
+ echo " "
+ echo "(I can't seem to compile the test program. Guessing...)"
+ rp="What is the width of your CPU (in bits)?"
+ . ./myread
+ qacpuwidth="$ans"
+ fi
+ $rm -f size.c size
+ case "$qacpuwidth" in
+ 32*)
+ cat >&4 <<EOM
+Bzzzt! At present, you can only perform a
+full 64-bit build on a 64-bit machine.
+EOM
+ exit 1
+ ;;
+ esac
+ qacflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
+ qaldflags="`getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`"
+ # See jhi's comments above regarding this re-eval. I've
+ # seen similar weirdness in the form of:
+ #
+# 1506-173 (W) Option lm is not valid. Enter xlc for list of valid options.
+ #
+ # error messages from 'cc -E' invocation. Again, the offending
+ # string is simply not detectable by any means. Since it doesn't
+ # do any harm, I didn't pursue it. -- sh
+ qaldflags="`echo $qaldflags`"
+ qalibs="`getconf XBS5_LP64_OFF64_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`"
+ # -q32 and -b32 may have been set by uselargefiles or user.
+ # Remove them.
+ ccflags="`echo $ccflags | sed -e 's@-q32@@'`"
+ ldflags="`echo $ldflags | sed -e 's@-b32@@'`"
+ # Tell archiver to use large format. Unless we remove 'ar'
+ # from 'trylist', the Configure script will just reset it to 'ar'
+ # immediately prior to writing config.sh. This took me hours
+ # to figure out.
+ trylist="`echo $trylist | sed -e 's@^ar @@' -e 's@ ar @ @g' -e 's@ ar$@@'`"
+ ar="ar -X64"
+ nm_opt="-X64 $nm_opt"
+ # Note: Placing the 'qacflags' variable into the 'ldflags' string
+ # is NOT a typo. ldqalags is passed to the C compiler for final
+ # linking, and it wants -q64 (-b64 is for ld only!).
+ case "$qacflags$qaldflags$qalibs" in
+ '');;
+ *) ccflags="$ccflags $qacflags"
+ ldflags="$ldflags $qacflags"
+ lddqalags="$qaldflags $lddqalags"
+ libswanted="$libswanted $qalibs"
+ ;;
+ esac