This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Dynamic Loading on MkLinux (osname=linux,archname=ppc-linux)
[perl5.git] / hints / bsdos.sh
1 # hints/bsdos.sh
2 #
3 # hints file for BSD/OS 2.x (adapted from bsd386.sh)
4 # Original by Neil Bowers <neilb@khoros.unm.edu>
5 #     Tue Oct  4 12:01:34 EDT 1994
6 # Updated by Tony Sanders <sanders@bsdi.com>
7 #     Mon Nov 27 17:25:51 CST 1995
8 #
9 # You can override the compiler and loader on the Configure command line:
10 #     ./Configure -Dcc=shlicc2 -Dld=shlicc2
11
12 # filename extension for shared library objects
13 so='o'
14
15 # Don't use this for Perl 5.002, which needs parallel sig_name and sig_num lists
16 #sig_name='ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM URG STOP TSTP CONT CHLD TTIN TTOU IO XCPU XFSZ VTALRM PROF WINCH INFO USR1 USR2 '
17 signal_t='void'
18 d_voidsig='define'
19
20 # we don't want to use -lnm, since exp() is busted (in 1.1 anyway)
21 set `echo X "$libswanted "| sed -e 's/ nm / /'`
22 shift
23 libswanted="$*"
24
25 # BSD/OS X libraries are in their own tree
26 glibpth="$glibpth /usr/X11/lib"
27 ldflags="$ldflags -L/usr/X11/lib"
28
29 # Avoid telldir prototype conflict in pp_sys.c
30 pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
31
32 case "$bsdos_distribution" in
33 defined)
34         d_portable='no'
35         prefix='/usr/contrib'
36         man3dir='/usr/contrib/man/man3'
37         ;;
38 esac
39
40 case "$osvers" in
41 1.0*)
42         # Avoid problems with HUGE_VAL in POSIX in 1.0's cc.
43         POSIX_cflags='ccflags="$ccflags -UHUGE_VAL"' 
44         ;;
45 1.1*)
46         # Use gcc2
47         case "$cc" in
48         '')     cc='gcc2' ;;
49         esac
50         ;;
51 2.0*)
52         # default to GCC 2.X w/shared libraries
53         case "$cc" in
54         '')     cc='shlicc2' ;;
55         esac
56
57         # default ld to shared library linker
58         case "$ld" in
59         '')     ld='shlicc2' ;;
60         esac
61
62         # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS stuff
63         # in 4.4BSD-based systems (including BSD/OS 2.0 and later).
64         # See http://www.bsdi.com/bsdi-man?setuid(2)
65         d_setregid='undef'
66         d_setreuid='undef'
67         d_setrgid='undef'
68         d_setruid='undef'
69         ;;
70 2.1*)
71         # Use 2.1's shlicc2 for dynamic linking
72         # Since cc -o is linking, use it for compiling too.
73         # I'm not sure whether Configure is careful about
74         # distinguishing between the two.
75
76         case "$cc" in
77         '')     cc='shlicc2'
78                 cccdlflags=' ' ;; # Avoid the dreaded -fpic
79         esac
80
81         # Link with shared libraries in 2.1
82         # Turns out that shlicc2 will automatically use the
83         # shared libs, so don't explicitly specify -lc_s.2.1.*
84         case "$ld" in
85         '')     ld='shlicc2'
86                 lddlflags='-r' ;; # this one is necessary
87         esac
88
89         # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS  stuff
90         # in 4.4BSD-based systems (including BSD/OS 2.0 and later).
91         # See http://www.bsdi.com/bsdi-man?setuid(2)
92         # This stuff may or may not be right, but it works.
93         d_setregid='undef'
94         d_setreuid='undef'
95         d_setrgid='undef'
96         d_setruid='undef'
97
98         # based on the 5.001m hints file from BSD/OS source disk
99         # (this is needed for pTk to work)
100
101         # BSD/OS 2.1 doesn't (yet) support true dynamic linking.
102         # So we "preload' the shared libraries by linking against
103         # them, even though we don't pull in any symbols thereby.
104         libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted"
105         libswanted="rpc curses termcap $libswanted"
106
107         ;;
108 3.0*)
109         # adapted from 2.1 entry by Christopher Davis <ckd@kei.com
110         # Use 3.0's shlicc2 for dynamic linking
111         # Since cc -o is linking, use it for compiling too.
112         # I'm not sure whether Configure is careful about
113         # distinguishing between the two.
114
115         case "$cc" in
116         '')     cc='shlicc2'
117                 cccdlflags=' ' ;; # Avoid the dreaded -fpic
118         esac
119
120         # Link with shared libraries in 3.0
121         # Turns out that shlicc2 will automatically use the
122         # shared libs, so don't explicitly specify them
123         case "$ld" in
124         '')     ld='shlicc2'
125                 lddlflags='-r' ;; # this one is necessary
126         esac
127
128         # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS  stuff
129         # in 4.4BSD-based systems (including BSD/OS 2.0 and later).
130         # See http://www.bsdi.com/bsdi-man?setuid(2)
131         # This stuff may or may not be right, but it works.
132         d_setregid='undef'
133         d_setreuid='undef'
134         d_setrgid='undef'
135         d_setruid='undef'
136
137         # this may still be needed for Tk and such
138         # BSD/OS doesn't (yet) support true dynamic linking.
139         # So we "preload' the shared libraries by linking against
140         # them, even though we don't pull in any symbols thereby.
141         libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted"
142         libswanted="rpc curses termcap $libswanted"
143
144         # the IPC stuff doesn't work the way perl expects
145         d_msg='undef'
146         d_msgctl='undef'
147         d_msgget='undef'
148         d_msgrcv='undef'
149         d_msgsnd='undef'
150         d_sem='undef'
151         d_semctl='undef'
152         d_semget='undef'
153         d_semop='undef'
154         d_shm='undef'
155         d_shmat='undef'
156         d_shmatprototype='undef'
157         d_shmctl='undef'
158         d_shmdt='undef'
159         d_shmget='undef'
160
161         # use system malloc instead of perl's
162         d_mymalloc='undef'
163         i_malloc='undef'
164         usemymalloc='n'
165
166         ;;
167 esac