This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
OS/2 improvements
[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
572149b7
JH
6# Added 3.1 with ELF dynamic libraries (NOT in 3.1 yet.
7# Estimated for 4.0) SYSV IPC tested Ok so I re-enabled.
8#
9# Updated to work in post-4.0 by Todd C. Miller <millert@openbsd.org>
10#
11# Updated for threads by "Timur I. Bakeyev" <bsdi@listserv.bat.ru>
25f94b33 12#
0806a92f
TS
13# To override the compiler on the command line:
14# ./Configure -Dcc=gcc2
15#
16# The BSD/OS distribution is built with:
17# ./Configure -des -Dbsdos_distribution=defined
25f94b33 18
25f94b33 19signal_t='void'
0e9bad51 20d_voidsig='define'
25f94b33 21
0806a92f
TS
22usemymalloc='n'
23
24# setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions.
572149b7 25# See <A HREF="http://www.bsdi.com/bsdi-man?setuid">http://www.bsdi.com/bsdi-man?setuid</A>(2)
0806a92f
TS
26d_setregid='undef'
27d_setreuid='undef'
28d_setrgid='undef'
29d_setruid='undef'
30
0e9bad51 31# we don't want to use -lnm, since exp() is busted (in 1.1 anyway)
25f94b33
AD
32set `echo X "$libswanted "| sed -e 's/ nm / /'`
33shift
34libswanted="$*"
35
0806a92f 36# X libraries are in their own tree
0e9bad51 37glibpth="$glibpth /usr/X11/lib"
38ldflags="$ldflags -L/usr/X11/lib"
39
0806a92f
TS
40case "$optimize" in
41'') optimize='-O2' ;;
42esac
43
0e9bad51 44case "$bsdos_distribution" in
0806a92f
TS
45''|undef|false) ;;
46*)
47 d_dosuid='define'
48 d_portable='undef'
0e9bad51 49 prefix='/usr/contrib'
0806a92f
TS
50 perlpath='/usr/bin/perl5'
51 startperl='#!/usr/bin/perl5'
52 scriptdir='/usr/contrib/bin'
53 privlib='/usr/libdata/perl5'
54 man1dir='/usr/contrib/man/man1'
0e9bad51 55 man3dir='/usr/contrib/man/man3'
0806a92f
TS
56 # phlib added by BSDI -- we share the *.ph include dir with perl4
57 phlib="/usr/libdata/perl5/site_perl/$(arch)-$osname/include"
58 phlibexp="/usr/libdata/perl5/site_perl/$(arch)-$osname/include"
0e9bad51 59 ;;
60esac
61
25f94b33
AD
62case "$osvers" in
631.0*)
64 # Avoid problems with HUGE_VAL in POSIX in 1.0's cc.
65 POSIX_cflags='ccflags="$ccflags -UHUGE_VAL"'
66 ;;
671.1*)
0e9bad51 68 # Use gcc2
25f94b33 69 case "$cc" in
0e9bad51 70 '') cc='gcc2' ;;
25f94b33
AD
71 esac
72 ;;
a2588af8 732.0*|2.1*|3.0*|3.1*)
0806a92f 74 so='o'
d84bea6a 75
0806a92f 76 # default to GCC 2.X w/shared libraries
d84bea6a 77 case "$cc" in
78 '') cc='shlicc2'
79 cccdlflags=' ' ;; # Avoid the dreaded -fpic
80 esac
81
0806a92f 82 # default ld to shared library linker
d84bea6a 83 case "$ld" in
84 '') ld='shlicc2'
85 lddlflags='-r' ;; # this one is necessary
86 esac
87
0806a92f 88 # Must preload the static shared libraries.
c20f90ab
CD
89 libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted"
90 libswanted="rpc curses termcap $libswanted"
d84bea6a 91 ;;
572149b7
JH
924.*)
93 # ELF dynamic link libraries starting in 4.0
491527d0
GS
94 useshrplib='true'
95 so='so'
96 dlext='so'
97
98 case "$cc" in
99 '') cc='cc' # cc is gcc2 in 4.0
100 cccdlflags="-fPIC"
b250498f
GS
101 ccdlflags="-rdynamic -Wl,-rpath,$privlib/$archname/CORE"
102 ;;
491527d0
GS
103 esac
104
105 case "$ld" in
106 '') ld='ld'
107 lddlflags="-shared -x $lddlflags" ;;
108 esac
572149b7
JH
109 # Due usage of static pointer from crt.o
110 libswanted="util $libswanted" ;;
25f94b33 111esac
491527d0 112
572149b7
JH
113# This script UU/usethreads.cbu will get 'called-back' by Configure
114# after it has prompted the user for whether to use threads.
115cat > UU/usethreads.cbu <<'EOCBU'
116case "$usethreads" in
117$define|true|[yY]*)
118 case "$osvers" in
119 3.*|4.*) ccflags="-D_REENTRANT $ccflags"
120 ;;
121 *) cat <<EOM >&4
122I did not know that BSD/OS $osvers supports POSIX threads.
123
7f2de2d2 124Feel free to tell perlbug@perl.org otherwise.
572149b7
JH
125EOM
126 exit 1
127 ;;
128 esac
129 ;;
130esac
131EOCBU