X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Faix.sh;h=2d2468a3371884c550238f9c1cf0930dd6061c29;hb=5b3e00df85f0acd4faa55a140aa762a15b19dca3;hp=f86205102407e1f2fa478648ef8979ec341c2ba3;hpb=72f70c998791c67541198e5d5f4af84d2c32364c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/aix.sh b/hints/aix.sh index f862051..2d2468a 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -137,12 +137,32 @@ d_setreuid='undef' # # Tell perl which symbols to export for dynamic linking. cccdlflags='none' # All AIX code is position independent +cc_type=xlc case "$cc" in -*gcc*) ccdlflags='-Xlinker' ;; +*gcc*) + cc_type=gcc + ccdlflags='-Xlinker' ;; *) ccversion=`lslpp -L | grep 'C for AIX Compiler$' | awk '{print $2}'` case "$ccversion" in '') ccversion=`lslpp -L | grep 'IBM C and C++ Compilers LUM$' | awk '{print $2}'` - ;; + ;; + *.*.*.*.*.*.*) # Ahhrgg, more than one C compiler installed + first_cc_path=`which ${cc:-cc}` + case "$first_cc_path" in + *vac*) + cc_type=vac ;; + /usr/bin/cc) # Check the symlink + if [ -h $first_cc_path ] ; then + ls -l $first_cc_path > reflect + if grep -i vac reflect >/dev/null 2>&1 ; then + cc_type=vac + fi + rm -f reflect + fi + ;; + esac + ccversion=`lslpp -L | grep 'C for AIX Compiler$' | grep -i $cc_type | awk '{print $2}' | head -1` + ;; esac case "$ccversion" in 3.6.6.0) @@ -209,7 +229,7 @@ esac case "`oslevel`" in 4.2.1.*) case "$ccversion" in # Don't know if needed for gcc - 3.1.4.*) # libswanted "bind ... c ..." => "... c bind ..." + 3.1.4.*|5.0.2.*) # libswanted "bind ... c ..." => "... c bind ..." set `echo X "$libswanted "| sed -e 's/ bind\( .*\) \([cC]\) / \1 \2 bind /'` shift libswanted="$*"