# Jarkko Hietaniemi <jhi@iki.fi>.
# AIX 4.3.x LP64 build by Steven Hirsch <hirschs@btv.ibm.com>
# Merged on Mon Feb 6 10:22:35 EST 1995 by
-# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Andy Dougherty <doughera@lafayette.edu>
#
# Contact dfavor@corridor.com for any of the following:
# Changes for dynamic linking by Wayne Scott <wscott@ichips.intel.com>
#
# Tell perl which symbols to export for dynamic linking.
-cccdlflags='none' # All AIX code is position independent
-cc_type=xlc
+cccdlflags='none' # All AIX code is position independent
+ cc_type=xlc # do not export to config.sh
case "$cc" in
*gcc*)
cc_type=gcc
gccversion=`$cc --version | sed 's/.*(GCC) *//`
fi
;;
-*) ccversion=`lslpp -L | grep 'C for AIX Compiler$' | grep -v '\.msg\.[A-Za-z_]*\.' | awk '{print $2}'`
+*) ccversion=`lslpp -L | grep 'C for AIX Compiler$' | grep -v '\.msg\.[A-Za-z_]*\.' | awk '{print $1,$2}'`
case "$ccversion" in
- '') ccversion=`lslpp -L | grep 'IBM C and C++ Compilers LUM$' | awk '{print $2}'`
+ '') ccversion=`lslpp -L | grep 'IBM C and C++ Compilers LUM$'`
;;
*.*.*.*.*.*.*) # Ahhrgg, more than one C compiler installed
first_cc_path=`which ${cc:-cc}`
fi
;;
esac
- ccversion=`lslpp -L | grep 'C for AIX Compiler$' | grep -i $cc_type | awk '{print $2}' | head -1`
+ ccversion=`lslpp -L | grep 'C for AIX Compiler$' | grep -i $cc_type | head -1`
+ ;;
+ vac*.*.*.*)
+ cc_type=vac
;;
esac
+ ccversion=`echo "$ccversion" | awk '{print $2}'`
case "$ccversion" in
3.6.6.0)
optimize='none'
# the required -bE:$installarchlib/CORE/perl.exp is added by
# libperl.U (Configure) later.
+# The first 3 options would not be needed if dynamic libs. could be linked
+# with the compiler instead of ld.
+# -bI:$(PERL_INC)/perl.exp Read the exported symbols from the perl binary
+# -bE:$(BASEEXT).exp Export these symbols. This file contains only one
+# symbol: boot_$(EXP) can it be auto-generated?
+case "$osvers" in
+ 3*)
+ lddlflags="$lddlflags -H512 -T512 -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -e _nostart -lc"
+ ;;
+ *)
+ lddlflags="$lddlflags -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -bnoentry -lc"
+ ;;
+ esac
+
+case "$use64bitall" in
+ $define|true|[yY]*) use64bitint="$define" ;;
+ esac
+
+case "$usemorebits" in
+ $define|true|[yY]*) use64bitint="$define"; uselongdouble="$define" ;;
+ esac
+
+case $cc_type in
+ vac|xlc)
+ case "$uselongdouble" in
+ $define|true|[yY]*)
+ ccflags="$ccflags -qlongdouble"
+ libswanted="c128 $libswanted"
+ lddlflags=`echo "$lddlflags " | sed -e 's/ -lc / -lc128 -lc /'`
+ ;;
+ esac
+ esac
+
case "$cc" in
*gcc*) ;;
cc*|xlc*) # cc should've been set by line 116 or so if empty.
*) if test ! -x /QOpenSys/usr/bin/$cc; then
# The /QOpenSys/usr/bin/$cc saves us if we are
# building natively in OS/400 PASE.
- cat <<EOF
+ cat >&4 <<EOF
***
*** You either implicitly or explicitly specified an IBM C compiler,
'') ldlibpthname=LIBPATH ;;
esac
-# The first 3 options would not be needed if dynamic libs. could be linked
-# with the compiler instead of ld.
-# -bI:$(PERL_INC)/perl.exp Read the exported symbols from the perl binary
-# -bE:$(BASEEXT).exp Export these symbols. This file contains only one
-# symbol: boot_$(EXP) can it be auto-generated?
-case "$osvers" in
-3*)
- lddlflags="$lddlflags -H512 -T512 -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -e _nostart -lc"
- ;;
-*)
- lddlflags="$lddlflags -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -bnoentry -lc"
- ;;
-esac
# AIX 4.2 (using latest patchlevels on 20001130) has a broken bind
# library (getprotobyname and getprotobynumber are outversioned by
# the same calls in libc, at least for xlc version 3...
ccflags="$ccflags -DNEED_PTHREAD_INIT"
case "$cc" in
*gcc*)
-echo "GCC $gccversion disabling some _r functions" >&4
+ ccflags="-D_THREAD_SAFE $ccflags"
+ echo "GCC $gccversion disabling some _r functions" >&4
case "$gccversion" in
3*) d_drand48_r='undef'
d_endgrent_r='undef'