diff options
author | H.Merijn Brand <h.m.brand@xs4all.nl> | 2002-01-11 14:04:15 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-11 14:14:12 +0000 |
commit | 851f49a849a679759595bd28f6015f99357a2ec6 (patch) | |
tree | 13b5d6ccec8afc1d4f727e1fa694fe230f67d44b /hints/aix.sh | |
parent | 408a2300b0e8e9fcc061b7d3266d60359fab2892 (diff) | |
download | perl-851f49a849a679759595bd28f6015f99357a2ec6.tar.gz |
[ PATCH ] AIX to pick the correct CC if more than one installed
Message-Id: <20020111125951.BD84.H.M.BRAND@hccnet.nl>
p4raw-id: //depot/perl@14187
Diffstat (limited to 'hints/aix.sh')
-rw-r--r-- | hints/aix.sh | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/hints/aix.sh b/hints/aix.sh index f862051024..2d2468a337 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="$*" |