summaryrefslogtreecommitdiff
path: root/hints/hpux.sh
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-04-25 03:39:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-04-25 03:39:45 +0000
commitdf7a47fef03171c2ce921db39991ee856d8d0859 (patch)
treeebef16121979fb01ef663548a84eaeca77a43e69 /hints/hpux.sh
parente2465f50f6c5b07bc73c22766f9c58b92c0e8a1e (diff)
downloadperl-df7a47fef03171c2ce921db39991ee856d8d0859.tar.gz
Reintroduce the avoidance of mixing HP-UX cc and GNU ar.
p4raw-id: //depot/perl@9831
Diffstat (limited to 'hints/hpux.sh')
-rw-r--r--hints/hpux.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/hints/hpux.sh b/hints/hpux.sh
index 5f28e79c0b..c7bc695133 100644
--- a/hints/hpux.sh
+++ b/hints/hpux.sh
@@ -160,6 +160,34 @@ case "$ccisgcc" in
;;
esac
+cat > UU/cc.cbu <<'EOCBU'
+# XXX This script UU/cc.cbu will get 'called-back' by Configure after it
+# XXX has prompted the user for the C compiler to use.
+# Get gcc to share its secrets.
+echo 'main() { return 0; }' > try.c
+ # Indent to avoid propagation to config.sh
+ verbose=`${cc:-cc} -v -o try try.c 2>&1`
+ if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then
+ # Using gcc.
+ : nothing to see here, move on.
+ else
+ # Using cc.
+ ar=${ar:-ar}
+ case "`$ar -V 2>&1`" in
+ *GNU*)
+ if test -x /usr/bin/ar; then
+ cat <<END >&2
+
+*** You are using HP cc(1) but GNU ar(1). This might lead into trouble
+*** later on, I'm switching to HP ar to play safe.
+
+END
+ ar=/usr/bin/ar
+ fi
+ ;;
+ esac
+ fi
+EOCBU
## LARGEFILES