NetBSD hint update
[p5sagit/p5-mst-13.2.git] / hints / hpux.sh
CommitLineData
68dc0745 1#! /local/gnu/bin/bash
8e07c86e 2# hints/hpux.sh
023707f0 3# Perl Configure hints file for Hewlett Packard HP-UX 9.x and 10.x
8e07c86e 4# This file is based on
023707f0 5# hints/hpux_9.sh, Perl Configure hints file for Hewlett Packard HP-UX 9.x
8e07c86e 6# Use Configure -Dcc=gcc to use gcc.
8ebc5c01 7# From: Jeff Okamoto <okamoto@corp.hp.com>
8e07c86e 8# and
023707f0 9# hints/hpux_10.sh, Perl Configure hints file for Hewlett Packard HP-UX 10.x
8e07c86e 10# From: Giles Lean <giles@nemeton.com.au>
023707f0 11
68dc0745 12# This version: March 21, 1997
8ebc5c01 13# Current maintainer: Jeff Okamoto <okamoto@corp.hp.com>
8e07c86e 14
68dc0745 15#--------------------------------------------------------------------
8e07c86e 16# Use Configure -Dcc=gcc to use gcc.
17# Use Configure -Dprefix=/usr/local to install in /usr/local.
68dc0745 18#
4633a7c4 19# Some users have reported problems with dynamic loading if the
20# environment variable LDOPTS='-a archive' .
68dc0745 21#
22# If you get a message about "too much defining", you might have to
23# add the following to your ccflags: '-Wp,-H256000'
24#--------------------------------------------------------------------
4633a7c4 25
8e07c86e 26# Turn on the _HPUX_SOURCE flag to get many of the HP add-ons
27ccflags="$ccflags -D_HPUX_SOURCE"
023707f0 28
29# If you plan to use gcc, then you should uncomment the following line
30# so you get the HP math library and not the GCC math library.
31# ccflags="$ccflags -L/lib/pa1.1"
8e07c86e 32
33# Check if you're using the bundled C compiler. This compiler doesn't support
34# ANSI C (the -Aa flag) nor can it produce shared libraries. Thus we have
35# to turn off dynamic loading.
36case "$cc" in
a5f75d66 37'') if cc $ccflags -Aa 2>&1 | $contains 'option' >/dev/null
8e07c86e 38 then
39 case "$usedl" in
40 '') usedl="$undef"
68dc0745 41 cat <<'EOM' >&4
8e07c86e 42
43The bundled C compiler can not produce shared libraries, so you will
44not be able to use dynamic loading.
45
46EOM
47 ;;
48 esac
49 else
50 ccflags="$ccflags -Aa" # The add-on compiler supports ANSI C
51 fi
52 optimize='-O'
53 ;;
54esac
55
4633a7c4 56# Determine the architecture type of this system.
fa89f053 57# Keep leading tab below -- Configure Black Magic -- RAM, 03/02/97
58 xxuname=`uname -r`
59if echo $xxuname | $contains '10' >/dev/null 2>&1
4633a7c4 60then
61 # This system is running 10.0
8ebc5c01 62 xxcpu1=`getconf CPU_VERSION`
63 xxcpu2=`printf %#x ${xxcpu1}`
64 xxcontext=`grep "$xxcpu2" /usr/include/sys/unistd.h`
fa89f053 65 if echo "$xxcontext" | $contains 'PA-RISC1.1' >/dev/null 2>&1
4633a7c4 66 then
67 archname='PA-RISC1.1'
fa89f053 68 elif echo "$xxcontext" | $contains 'PA-RISC1.0' >/dev/null 2>&1
4633a7c4 69 then
70 archname='PA-RISC1.0'
fa89f053 71 elif echo "$xxcontext" | $contains 'PA-RISC2' >/dev/null 2>&1
4633a7c4 72 then
73 archname='PA-RISC2'
74 else
68dc0745 75 echo "This 10.0 system is of a PA-RISC type I don't recognize." >&2
4633a7c4 76 echo "Debugging output: $xxcontext"
77 archname=''
78 fi
79else
80 # This system is not running 10.0
81 xxcontext=`/bin/getcontext`
fa89f053 82 if echo "$xxcontext" | $contains 'PA-RISC1.1' >/dev/null 2>&1
4633a7c4 83 then
84 archname='PA-RISC1.1'
fa89f053 85 elif echo "$xxcontext" | $contains 'PA-RISC1.0' >/dev/null 2>&1
4633a7c4 86 then
87 archname='PA-RISC1.0'
fa89f053 88 elif echo "$xxcontext" | $contains 'HP-MC' >/dev/null 2>&1
4633a7c4 89 then
90 archname='HP-MC68K'
91 else
68dc0745 92 echo "I cannot recognize what chip set this system is using." >&2
4633a7c4 93 echo "Debugging output: $xxcontext"
94 archname=''
95 fi
96fi
97
8e07c86e 98# Remove bad libraries that will cause problems
99# (This doesn't remove libraries that don't actually exist)
100# -lld is unneeded (and I can't figure out what it's used for anyway)
101# -ldbm is obsolete and should not be used
102# -lBSD contains BSD-style duplicates of SVR4 routines that cause confusion
103# -lPW is obsolete and should not be used
8e07c86e 104# The libraries crypt, malloc, ndir, and net are empty.
0ca047c2 105# Although -lndbm should be included, it will make perl blow up if you should
106# copy the binary to a system without libndbm.sl. See ccdlflags below.
107set `echo " $libswanted " | sed -e 's@ ld @ @' -e 's@ dbm @ @' -e 's@ BSD @ @' -e 's@ PW @ @'`
8e07c86e 108libswanted="$*"
109
214989af 110# By setting the deferred flag below, this means that if you run perl on a
111# system that does not have the required shared library that you linked it
112# with, it will die when you try to access a symbol in the (missing) shared
113# library. If you would rather know at perl startup time that you are
114# missing an important shared library, switch the comments so that immediate,
115# rather than deferred loading is performed.
116# ccdlflags="-Wl,-E $ccdlflags"
117ccdlflags="-Wl,-E -Wl,-B,deferred $ccdlflags"
8e07c86e 118
119usemymalloc='y'
120alignbytes=8
8ebc5c01 121selecttype='int *'
122
774d564b 123# When HP-UX runs a script with "#!", it sets argv[0] to the script name.
124toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
125
8e07c86e 126# If your compile complains about FLT_MIN, uncomment the next line
127# POSIX_cflags='ccflags="$ccflags -DFLT_MIN=1.17549435E-38"'
128
4633a7c4 129# Comment this out if you don't want to follow the SVR4 filesystem layout
8e07c86e 130# that HP-UX 10.0 uses
131case "$prefix" in
8ebc5c01 132'') prefix='/opt/perl5.003' ;;
8e07c86e 133esac
4137488c 134
135# Date: Fri, 6 Sep 96 23:15:31 CDT
136# From: "Daniel S. Lewart" <d-lewart@uiuc.edu>
137# I looked through the gcc.info and found this:
138# * GNU CC compiled code sometimes emits warnings from the HP-UX
139# assembler of the form:
140# (warning) Use of GR3 when frame >= 8192 may cause conflict.
141# These warnings are harmless and can be safely ignored.