Chip noticed that the intended optionality of the 'IV' was
[p5sagit/p5-mst-13.2.git] / hints / bsdos.sh
CommitLineData
0e9bad51 1# hints/bsdos.sh
25f94b33 2#
0806a92f 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 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 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 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 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 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 40case "$optimize" in
41'') optimize='-O2' ;;
42esac
43
0e9bad51 44case "$bsdos_distribution" in
0806a92f 45''|undef|false) ;;
46*)
47 d_dosuid='define'
48 d_portable='undef'
0e9bad51 49 prefix='/usr/contrib'
0806a92f 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 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 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 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 89 libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted"
90 libswanted="rpc curses termcap $libswanted"
d84bea6a 91 ;;
572149b7 924.*)
93 # ELF dynamic link libraries starting in 4.0
491527d0 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 101 ;;
491527d0 102 esac
103
104 case "$ld" in
105 '') ld='ld'
106 lddlflags="-shared -x $lddlflags" ;;
107 esac
572149b7 108 # Due usage of static pointer from crt.o
109 libswanted="util $libswanted" ;;
25f94b33 110esac
491527d0 111
572149b7 112# This script UU/usethreads.cbu will get 'called-back' by Configure
113# after it has prompted the user for whether to use threads.
114cat > UU/usethreads.cbu <<'EOCBU'
115case "$usethreads" in
116$define|true|[yY]*)
117 case "$osvers" in
118 3.*|4.*) ccflags="-D_REENTRANT $ccflags"
119 ;;
120 *) cat <<EOM >&4
121I did not know that BSD/OS $osvers supports POSIX threads.
122
7f2de2d2 123Feel free to tell perlbug@perl.org otherwise.
572149b7 124EOM
125 exit 1
126 ;;
127 esac
128 ;;
129esac
130EOCBU