NetBSD hint update
[p5sagit/p5-mst-13.2.git] / hints / hpux.sh
index b103cf5..2e8b16c 100644 (file)
@@ -1,3 +1,4 @@
+#! /local/gnu/bin/bash
 # hints/hpux.sh
 # Perl Configure hints file for Hewlett Packard HP-UX 9.x and 10.x
 # This file is based on 
@@ -8,14 +9,19 @@
 # hints/hpux_10.sh, Perl Configure hints file for Hewlett Packard HP-UX 10.x
 # From: Giles Lean <giles@nemeton.com.au>
 
-# This version: December 27, 1996
+# This version: March 21, 1997
 # Current maintainer: Jeff Okamoto <okamoto@corp.hp.com>
 
+#--------------------------------------------------------------------
 # Use Configure -Dcc=gcc to use gcc.
 # Use Configure -Dprefix=/usr/local to install in /usr/local.
-
+#
 # Some users have reported problems with dynamic loading if the 
 # environment variable LDOPTS='-a archive' .
+#
+# If you get a message about "too much defining", you might have to
+# add the following to your ccflags: '-Wp,-H256000'
+#--------------------------------------------------------------------
 
 # Turn on the _HPUX_SOURCE flag to get many of the HP add-ons
 ccflags="$ccflags -D_HPUX_SOURCE"
@@ -32,7 +38,7 @@ case "$cc" in
     then
        case "$usedl" in
         '') usedl="$undef"
-            cat <<'EOM'
+            cat <<'EOM' >&4
 
 The bundled C compiler can not produce shared libraries, so you will
 not be able to use dynamic loading. 
@@ -48,41 +54,42 @@ EOM
 esac
 
 # Determine the architecture type of this system.
-xxuname=`uname -r`
-if echo $xxuname | $contains '10'
+# Keep leading tab below -- Configure Black Magic -- RAM, 03/02/97
+       xxuname=`uname -r`
+if echo $xxuname | $contains '10' >/dev/null 2>&1
 then
        # This system is running 10.0
        xxcpu1=`getconf CPU_VERSION`
        xxcpu2=`printf %#x ${xxcpu1}`
        xxcontext=`grep "$xxcpu2" /usr/include/sys/unistd.h`
-       if echo "$xxcontext" | $contains 'PA-RISC1.1'
+       if echo "$xxcontext" | $contains 'PA-RISC1.1' >/dev/null 2>&1
        then
                archname='PA-RISC1.1'
-       elif echo "$xxcontext" | $contains 'PA-RISC1.0'
+       elif echo "$xxcontext" | $contains 'PA-RISC1.0' >/dev/null 2>&1
        then
                archname='PA-RISC1.0'
-       elif echo "$xxcontext" | $contains 'PA-RISC2'
+       elif echo "$xxcontext" | $contains 'PA-RISC2' >/dev/null 2>&1
        then
                archname='PA-RISC2'
        else
-               echo "This 10.0 system is of a PA-RISC type I don't recognize."
+               echo "This 10.0 system is of a PA-RISC type I don't recognize." >&2
                echo "Debugging output: $xxcontext"
                archname=''
        fi
 else
        # This system is not running 10.0
        xxcontext=`/bin/getcontext`
-       if echo "$xxcontext" | $contains 'PA-RISC1.1'
+       if echo "$xxcontext" | $contains 'PA-RISC1.1' >/dev/null 2>&1
        then
                archname='PA-RISC1.1'
-       elif echo "$xxcontext" | $contains 'PA-RISC1.0'
+       elif echo "$xxcontext" | $contains 'PA-RISC1.0' >/dev/null 2>&1
        then
                archname='PA-RISC1.0'
-       elif echo "$xxcontext" | $contains 'HP-MC'
+       elif echo "$xxcontext" | $contains 'HP-MC' >/dev/null 2>&1
        then
                archname='HP-MC68K'
        else
-               echo "I cannot recognize what chip set this system is using."
+               echo "I cannot recognize what chip set this system is using." >&2
                echo "Debugging output: $xxcontext"
                archname=''
        fi
@@ -113,6 +120,9 @@ usemymalloc='y'
 alignbytes=8
 selecttype='int *'
 
+# When HP-UX runs a script with "#!", it sets argv[0] to the script name.
+toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
+
 # If your compile complains about FLT_MIN, uncomment the next line
 # POSIX_cflags='ccflags="$ccflags -DFLT_MIN=1.17549435E-38"'