summaryrefslogtreecommitdiff
path: root/hints/hpux.sh
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2005-02-10 15:56:04 +0000
committerH.Merijn Brand <h.m.brand@xs4all.nl>2005-02-10 15:56:04 +0000
commitbd7dcc1560fe205bfdd287ecf78da4eb59a80bf9 (patch)
tree33731a304b63f22f5116cf45fd5050b8d1b664b1 /hints/hpux.sh
parentced0984df55ae722e218b1b2dfc5f53d6b3a8473 (diff)
downloadperl-bd7dcc1560fe205bfdd287ecf78da4eb59a80bf9.tar.gz
'what' cannot find ccversion if `which cc` is a symlink to ccache
ccversion is important enough to jump through some hoops to get it p4raw-id: //depot/perl@23958
Diffstat (limited to 'hints/hpux.sh')
-rw-r--r--hints/hpux.sh23
1 files changed, 22 insertions, 1 deletions
diff --git a/hints/hpux.sh b/hints/hpux.sh
index 8fe709284f..c74b66a34e 100644
--- a/hints/hpux.sh
+++ b/hints/hpux.sh
@@ -136,7 +136,28 @@ case `$cc -v 2>&1`"" in
esac
;;
*) ccisgcc=''
- ccversion=`which cc | xargs what | awk '/Compiler/{print $2}/Itanium/{print $6,$7}'`
+ # What cannot be use in combination with ccache links :(
+ cc_found=""
+ for p in `echo $PATH | tr : ' ''` ; do
+ x="$p/cc"
+ if [ -f $x ] && [ -x $x ]; then
+ if [ -h $x ]; then
+ l=`ls -l $x | sed 's,.*-> ,,'`
+ case $l in
+ /*) x=$l ;;
+ *) x="$p/$l" ;;
+ esac
+ fi
+ x=`echo $x | sed 's,/\./,/,g'`
+ case $x in
+ *ccache*) ;;
+ *) [ -z "$cc_found" ] && cc_found=$x ;;
+ esac
+ fi
+ done
+ [ -z "$cc_found" ] && cc_found=`which cc`
+ what $cc_found >&4
+ ccversion=`which $cc_found | xargs what | awk '/Compiler/{print $2}/Itanium/{print $6,$7}'`
case "$ccflags" in
"-Ae "*) ;;
*) ccflags="-Ae $cc_cppflags"