be defensive about setting {host,group,pass}cat (from Andy Dougherty)
[p5sagit/p5-mst-13.2.git] / hints / bsdos.sh
1 # hints/bsdos.sh
2 #
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
6 #     Added 3.1 with ELF dynamic libraries (NOT in 3.1 yet. Estimated for 4.0)
7 #     SYSV IPC tested Ok so I re-enabled.
8 #
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
14
15 signal_t='void'
16 d_voidsig='define'
17
18 usemymalloc='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)
22 d_setregid='undef'
23 d_setreuid='undef'
24 d_setrgid='undef'
25 d_setruid='undef'
26
27 # we don't want to use -lnm, since exp() is busted (in 1.1 anyway)
28 set `echo X "$libswanted "| sed -e 's/ nm / /'`
29 shift
30 libswanted="$*"
31
32 # X libraries are in their own tree
33 glibpth="$glibpth /usr/X11/lib"
34 ldflags="$ldflags -L/usr/X11/lib"
35
36 case "$optimize" in
37 '')     optimize='-O2' ;;
38 esac
39
40 case "$bsdos_distribution" in
41 ''|undef|false) ;;
42 *)
43         d_dosuid='define'
44         d_portable='undef'
45         prefix='/usr/contrib'
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'
51         man3dir='/usr/contrib/man/man3'
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"
55         ;;
56 esac
57
58 case "$osvers" in
59 1.0*)
60         # Avoid problems with HUGE_VAL in POSIX in 1.0's cc.
61         POSIX_cflags='ccflags="$ccflags -UHUGE_VAL"' 
62         ;;
63 1.1*)
64         # Use gcc2
65         case "$cc" in
66         '')     cc='gcc2' ;;
67         esac
68         ;;
69 2.0*|2.1*|3.0*|3.1*)
70         so='o'
71
72         # default to GCC 2.X w/shared libraries
73         case "$cc" in
74         '')     cc='shlicc2'
75                 cccdlflags=' ' ;; # Avoid the dreaded -fpic
76         esac
77
78         # default ld to shared library linker
79         case "$ld" in
80         '')     ld='shlicc2'
81                 lddlflags='-r' ;; # this one is necessary
82         esac
83
84         # Must preload the static shared libraries.
85         libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted"
86         libswanted="rpc curses termcap $libswanted"
87         ;;
88 4.0*)
89         # ELF dynamic link libraries starting in 4.0 (???)
90         useshrplib='true'
91         so='so'
92         dlext='so'
93
94         case "$cc" in
95         '')     cc='cc'                 # cc is gcc2 in 4.0
96                 cccdlflags="-fPIC"
97                 ccdlflags=" " ;;
98         esac
99
100         case "$ld" in
101         '')     ld='ld'
102                 lddlflags="-shared -x $lddlflags" ;;
103         esac
104         ;;
105 esac
106