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