2 # Courtesy of Joel Rosi-Schwartz <j.schwartz@agonet.it>
3 ###############################################################
4 # Additional SCO version info from
5 # Peter Wolfe <wolfe@teloseng.com>
6 # Fri Jul 19 14:54:25 EDT 1996
7 # and again Tue Sep 29 16:37:25 EDT 1998
8 # by Andy Dougherty <doughera@lafayette.edu>
10 # Tue Jan 19 23:00:00 CET 1999
11 # by Francois Desarmenien <desar@club-internet.fr>
12 ###############################################################
14 # To use cc, use sh Configure
15 # To use gcc, use sh Configure -Dcc=gcc
17 # Default on 3.2v4 is to use static link (dynamic loading unsupported).
18 # Default on 3.2v5 is to use dynamic loading.
19 # To use static linkink instead, use to sh Configure -Dusedl=n
21 # Warning: - to use dynamic loading with gcc, you need gcc 2.8.0 or later
22 # ******** - to compile with older releases of gcc, use Configure -Dusedl=n
23 # or it wont compile properly
25 ###############################################################
29 # I Have removed inclusion of ODBM_File for OSR5
30 # because it core dumps and make tests fails.
32 # Support for icc compiler has been removed, because it 'breaks'
35 # It's *always* a good idea to first make a static link to be sure to
36 # have all symbols resolved with the current choice of libraries, since
37 # with dynamic linking, unresolved symbols are allowed an will be detected
38 # only at runtime (when you try to load the module or worse, when you call
41 # The best choice of compiler on OSR 5 (3.2v5.*) seems to be gcc >= 2.8.0:
42 # -You cannot optimize with genuine sco cc (miniperl core dumps),
43 # so Perl is faster if compiled with gcc.
44 # -Even optimized for speed, gcc generated code is smaller (!!!)
46 # -I use ld to link which is distributed with the core OS distribution, so you
47 # don't need to buy the developement kit, just find someone kind enough to
48 # give you a binary release of gcc.
52 ###############################################################
53 # figure out what SCO version we are. The output of uname -X is
67 # Use /bin/uname (because GNU uname may be first in $PATH and
68 # it does not support -X) to figure out what SCO version we are:
69 # Matching '^Release' is broken by locale setting:
70 # matching '3.2v' should be enough -- FD
71 case `/bin/uname -X | egrep '3\.2v'` in
72 *3.2v4.*) scorls=3 ;; # OSR 3
73 *3.2v5.*) scorls=5 ;; # OSR 5
75 # Future of SCO OSR is SCO UnixWare: there should not be new OSR releases
76 echo "************************************************************" >&4
78 echo " sco.sh hints file only supports:" >&4
80 echo " - SCO Unix 3.2v4.x (OSR 3)" >&4
81 echo " - SCO Unix 3.2v5.x (OSR 5)" >&4
84 echo " For UnixWare, use svr4.sh hints instead" >&4
86 echo "***********************************************************" >&4
91 ###############################################################
92 # Common fixes for all compilers an releases:
94 ###############################################################
95 # What is true for SCO5 is true for SCO3 too today, so let's have a single
97 ccflags="-U M_XENIX -D PERL_SCO"
99 ###############################################################
100 # Compilers options section:
101 if test "$scorls" = "3"
105 gcc) optimize='-O2' ;;
106 *) ccflags="$ccflags -W0 -quiet"
110 ###############################################################
111 # Need this in release 5 because of changed fpu exeption rules
112 ccflags="$ccflags -D PERL_SCO5"
114 ###############################################################
115 # In Release 5, always compile ELF objects
118 ccflags="$ccflags -melf"
122 ccflags="$ccflags -w0 -belf"
126 ###############################################################
127 # Dynamic loading section:
129 # We use ld to build shared libraries as it is always available
130 # and seems to work better than GNU's one on SCO
132 # ccdlflags : must tell the linker to export all global symbols
133 # cccdlflags: must tell the compiler to generate relocatable code
134 # lddlflags : must tell the linker to output a shared library
136 # /usr/local/lib is added for convenience, since 'foreign' libraries
137 # are usually put there in sco
139 if test "$usedl" != "n"; then
143 ccdlflags='-Xlinker -Bexport -L/usr/local/lib'
145 lddlflags='-G -L/usr/local/lib'
148 ccdlflags='-Bexport -L/usr/local/lib'
150 lddlflags='-G -L/usr/local/lib'
154 ###############################################################
155 # Use dynamic loading
160 ###############################################################
161 # Force to define those symbols, as they are #defines and not
162 # catched by Configure, and they are useful
169 ###############################################################
170 # Various hints, common to all releases, to have it work better:
172 ###############################################################
173 # We need to remove libdl, as libdl.so exists, but ld complains
174 # it can't find libdl.a ! Bug or feature ? :-)
175 libswanted=`echo " $libswanted " | sed -e 's/ dl / /'`
180 ###############################################################
181 # Try to use libintl.a since it has strcoll and strxfrm
182 libswanted="intl $libswanted"
184 ###############################################################
185 # Try to use libdbm.nfs.a since it has dbmclose.
186 if test -f /usr/lib/libdbm.nfs.a ; then
187 libswanted=`echo "dbm.nfs $libswanted " | sed -e 's/ dbm / /'`
193 ###############################################################
194 # We disable ODBM_File if OSR5 because it's mostly broken
195 # but keep it for ODT3 as it seems to work.
196 if test "$scorls" = "5"; then
200 ###############################################################
201 # We don't want Xenix cross-development libraries
202 glibpth=`echo $glibpth | sed -e 's! /usr/lib/386 ! !' -e 's! /lib/386 ! !'`
205 ###############################################################
206 # I have received one report that nm extraction doesn't work if you're
207 # using the scocc compiler. This system had the following 'myconfig'
208 # uname='xxx xxx 3.2 2 i386 '
209 # cc='scocc', optimize='-O'
210 # You can override this with Configure -Dusenm.
215 ###############################################################
216 # If you want to use nm, you'll probably have to use nm -p. The
217 # following does that for you:
220 ###############################################################
221 # I have received one report that you can't include utime.h in
222 # pp_sys.c. Uncomment the following line if that happens to you:
225 ###############################################################
226 # Perl 5.003_05 and later try to include both <time.h> and <sys/select.h>
227 # in pp_sys.c, but that fails due to a redefinition of struct timeval.
228 # This will generate a WHOA THERE. Accept the default.
232 ###############################################################