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