This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
applied new parts of suggested patch
[perl5.git] / hints / bsdos.sh
CommitLineData
0e9bad51 1# hints/bsdos.sh
25f94b33 2#
0806a92f
TS
3# hints file for BSD/OS (adapted from bsd386.sh)
4# Original by Neil Bowers <neilb@khoros.unm.edu>; Tue Oct 4 12:01:34 EDT 1994
5# Updated by Tony Sanders <sanders@bsdi.com>; Sat Aug 23 12:47:45 MDT 1997
491527d0 6# Added 3.1 with ELF dynamic libraries (NOT in 3.1 yet. Estimated for 4.0)
0806a92f 7# SYSV IPC tested Ok so I re-enabled.
25f94b33 8#
0806a92f
TS
9# To override the compiler on the command line:
10# ./Configure -Dcc=gcc2
11#
12# The BSD/OS distribution is built with:
13# ./Configure -des -Dbsdos_distribution=defined
25f94b33 14
25f94b33 15signal_t='void'
0e9bad51 16d_voidsig='define'
25f94b33 17
0806a92f
TS
18usemymalloc='n'
19
20# setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions.
21# See http://www.bsdi.com/bsdi-man?setuid(2)
22d_setregid='undef'
23d_setreuid='undef'
24d_setrgid='undef'
25d_setruid='undef'
26
0e9bad51 27# we don't want to use -lnm, since exp() is busted (in 1.1 anyway)
25f94b33
AD
28set `echo X "$libswanted "| sed -e 's/ nm / /'`
29shift
30libswanted="$*"
31
0806a92f 32# X libraries are in their own tree
0e9bad51 33glibpth="$glibpth /usr/X11/lib"
34ldflags="$ldflags -L/usr/X11/lib"
35
0806a92f
TS
36case "$optimize" in
37'') optimize='-O2' ;;
38esac
39
0e9bad51 40case "$bsdos_distribution" in
0806a92f
TS
41''|undef|false) ;;
42*)
43 d_dosuid='define'
44 d_portable='undef'
0e9bad51 45 prefix='/usr/contrib'
0806a92f
TS
46 perlpath='/usr/bin/perl5'
47 startperl='#!/usr/bin/perl5'
48 scriptdir='/usr/contrib/bin'
49 privlib='/usr/libdata/perl5'
50 man1dir='/usr/contrib/man/man1'
0e9bad51 51 man3dir='/usr/contrib/man/man3'
0806a92f
TS
52 # phlib added by BSDI -- we share the *.ph include dir with perl4
53 phlib="/usr/libdata/perl5/site_perl/$(arch)-$osname/include"
54 phlibexp="/usr/libdata/perl5/site_perl/$(arch)-$osname/include"
0e9bad51 55 ;;
56esac
57
25f94b33
AD
58case "$osvers" in
591.0*)
60 # Avoid problems with HUGE_VAL in POSIX in 1.0's cc.
61 POSIX_cflags='ccflags="$ccflags -UHUGE_VAL"'
62 ;;
631.1*)
0e9bad51 64 # Use gcc2
25f94b33 65 case "$cc" in
0e9bad51 66 '') cc='gcc2' ;;
25f94b33
AD
67 esac
68 ;;
a2588af8 692.0*|2.1*|3.0*|3.1*)
0806a92f 70 so='o'
d84bea6a 71
0806a92f 72 # default to GCC 2.X w/shared libraries
d84bea6a 73 case "$cc" in
74 '') cc='shlicc2'
75 cccdlflags=' ' ;; # Avoid the dreaded -fpic
76 esac
77
0806a92f 78 # default ld to shared library linker
d84bea6a 79 case "$ld" in
80 '') ld='shlicc2'
81 lddlflags='-r' ;; # this one is necessary
82 esac
83
0806a92f 84 # Must preload the static shared libraries.
c20f90ab
CD
85 libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted"
86 libswanted="rpc curses termcap $libswanted"
d84bea6a 87 ;;
491527d0 884.0*)
10ca4047 89 POSIX_cflags='ccflags="$ccflags -DSTRUCT_TM_HASZONE"'
491527d0
GS
90 # ELF dynamic link libraries starting in 4.0 (???)
91 useshrplib='true'
92 so='so'
93 dlext='so'
94
95 case "$cc" in
96 '') cc='cc' # cc is gcc2 in 4.0
97 cccdlflags="-fPIC"
98 ccdlflags=" " ;;
99 esac
100
101 case "$ld" in
102 '') ld='ld'
103 lddlflags="-shared -x $lddlflags" ;;
104 esac
105 ;;
25f94b33 106esac
491527d0 107