27513ce196f5eb54d3dc4c0ee66ad0239474aafa
[p5sagit/p5-mst-13.2.git] / hints / hpux.sh
1 # hints/hpux.sh
2 # Perl Configure hints file for Hewlett Packard HP/UX 9.x and 10.x
3 # This file is based on 
4 # hints/hpux_9.sh, Perl Configure hints file for Hewlett Packard HP/UX 9.x
5 # Use Configure -Dcc=gcc to use gcc.
6 # From: Jeff Okamoto <okamoto@hpcc123.corp.hp.com>
7 # Date: Thu, 28 Sep 95 11:06:07 PDT
8 # and
9 # hints/hpux_10.sh, Perl Configure hints file for Hewlett Packard HP/UX 10.x
10 # From: Giles Lean <giles@nemeton.com.au>
11 # Date: Tue, 27 Jun 1995 08:17:45 +1000
12
13 # Use Configure -Dcc=gcc to use gcc.
14 # Use Configure -Dprefix=/usr/local to install in /usr/local.
15
16 # Turn on the _HPUX_SOURCE flag to get many of the HP add-ons
17 ccflags="$ccflags -D_HPUX_SOURCE"
18 ldflags="$ldflags"
19
20 # Check if you're using the bundled C compiler.  This compiler doesn't support
21 # ANSI C (the -Aa flag) nor can it produce shared libraries.  Thus we have
22 # to turn off dynamic loading.
23 case "$cc" in
24 '') if cc $ccflags -Aa 2>&1 | $contains 'Unknown option "A"' >/dev/null
25     then
26         case "$usedl" in
27          '') usedl="$undef"
28              cat <<'EOM'
29
30 The bundled C compiler can not produce shared libraries, so you will
31 not be able to use dynamic loading. 
32
33 EOM
34              ;;
35         esac
36     else
37         ccflags="$ccflags -Aa"  # The add-on compiler supports ANSI C
38     fi
39     optimize='-O'
40     ;;
41 esac
42
43 # Remove bad libraries that will cause problems
44 # (This doesn't remove libraries that don't actually exist)
45 # -lld is unneeded (and I can't figure out what it's used for anyway)
46 # -ldbm is obsolete and should not be used
47 # -lBSD contains BSD-style duplicates of SVR4 routines that cause confusion
48 # -lPW is obsolete and should not be used
49 # Although -lndbm should be included, it will make perl blow up if you should
50 # copy the binary to a system without libndbm.sl.
51 # The libraries crypt, malloc, ndir, and net are empty.
52 set `echo " $libswanted " | sed -e 's@ ndbm @ @' -e 's@ ld @ @' -e 's@ dbm @ @' -e 's@ BSD @ @' -e 's@ PW @ @'`
53 libswanted="$*"
54
55 # If you copy the perl binaries to other systems and the dynamic loader
56 # complains about missing libraries, you can either copy the shared libraries
57 # or switch the comments to recompile perl to use archive libraries
58 # ccdlflags="-Wl,-E -Wl,-a,archive $ccdlflags"
59 ccdlflags="-Wl,-E $ccdlflags"
60
61 usemymalloc='y'
62 alignbytes=8
63 selecttype='int *' 
64
65 # There are some lingering issues about whether g/setpgrp should be a part
66 # of the perl core.  This setting should cause perl to conform to the Principle
67 # of Least Astonishment.  The best thing is to use the g/setpgrp in the POSIX
68 # module.
69 d_bsdpgrp='define'
70
71 # If your compile complains about FLT_MIN, uncomment the next line
72 # POSIX_cflags='ccflags="$ccflags -DFLT_MIN=1.17549435E-38"'
73
74 # Comment these out if you don't want to follow the SVR4 filesystem layout
75 # that HP-UX 10.0 uses
76 case "$prefix" in
77 '') prefix='/opt/perl5'
78     privlib='/opt/perl5/lib'
79     archlib='/opt/perl5/lib/hpux'
80     man3dir='/opt/perl5/man/man3'
81     ;;
82 esac
83