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 # Modified by Boyd Gerber <gerberb@zenez.com>
14 ###############################################################
16 # To use cc, use sh Configure
17 # To use gcc, use sh Configure -Dcc=gcc
19 # Default on 3.2v4 is to use static link (dynamic loading unsupported).
20 # Default on 3.2v5 is to use dynamic loading.
21 # To use static linkink instead, use to sh Configure -Dusedl=n
23 # Warning: - to use dynamic loading with gcc, you need gcc 2.8.0 or later
24 # ******** - to compile with older releases of gcc, use Configure -Dusedl=n
25 # or it wont compile properly
27 ###############################################################
31 # I Have removed inclusion of ODBM_File for OSR5
32 # because it core dumps and make tests fails.
34 # Support for icc compiler has been removed, because it 'breaks'
37 # It's *always* a good idea to first make a static link to be sure to
38 # have all symbols resolved with the current choice of libraries, since
39 # with dynamic linking, unresolved symbols are allowed an will be detected
40 # only at runtime (when you try to load the module or worse, when you call
43 # The best choice of compiler on OSR 5 (3.2v5.*) seems to be gcc >= 2.8.0:
44 # -You cannot optimize with genuine sco cc (miniperl core dumps),
45 # so Perl is faster if compiled with gcc.
46 # -Even optimized for speed, gcc generated code is smaller (!!!)
48 # -I use ld to link which is distributed with the core OS distribution, so you
49 # don't need to buy the developement kit, just find someone kind enough to
50 # give you a binary release of gcc.
54 ###############################################################
55 # figure out what SCO version we are. The output of uname -X is
69 # Use /bin/uname (because GNU uname may be first in $PATH and
70 # it does not support -X) to figure out what SCO version we are:
71 # Matching '^Release' is broken by locale setting:
72 # matching '3.2v' should be enough -- FD
73 case `/bin/uname -X | egrep '3\.2v'` in
74 *3.2v4.*) scorls=3 ;; # OSR 3
75 *3.2v5.*) scorls=5 ;; # OSR 5
77 # Future of SCO OSR is SCO UnixWare: there should not be new OSR releases
78 echo "************************************************************" >&4
80 echo " sco.sh hints file only supports:" >&4
82 echo " - SCO Unix 3.2v4.x (OSR 3)" >&4
83 echo " - SCO Unix 3.2v5.x (OSR 5)" >&4
86 echo " For UnixWare, use svr4.sh hints instead" >&4
87 echo " For UnixWare 7.*, use svr5.sh hints instead" >&4
89 echo "***********************************************************" >&4
94 ###############################################################
95 # Common fixes for all compilers an releases:
97 ###############################################################
98 # What is true for SCO5 is true for SCO3 too today, so let's have a single
100 ccflags="-U M_XENIX -D PERL_SCO"
102 ###############################################################
103 # Compilers options section:
104 if test "$scorls" = "3"
108 *gcc*) optimize='-O2' ;;
109 *) ccflags="$ccflags -W0 -quiet"
113 ###############################################################
114 # Need this in release 5 because of changed fpu exeption rules
115 ccflags="$ccflags -D PERL_SCO5"
117 ###############################################################
118 # In Release 5, always compile ELF objects
121 ccflags="$ccflags -melf"
125 ccflags="$ccflags -w0 -belf"
129 ###############################################################
130 # Dynamic loading section:
132 # We use ld to build shared libraries as it is always available
133 # and seems to work better than GNU's one on SCO
135 # ccdlflags : must tell the linker to export all global symbols
136 # cccdlflags: must tell the compiler to generate relocatable code
137 # lddlflags : must tell the linker to output a shared library
139 # /usr/local/lib is added for convenience, since 'foreign' libraries
140 # are usually put there in sco
142 if test "$usedl" != "n"; then
146 ccdlflags='-Xlinker -Bexport -L/usr/local/lib'
148 lddlflags='-G -L/usr/local/lib'
151 ccdlflags='-Bexport -L/usr/local/lib'
153 lddlflags='-G -L/usr/local/lib'
157 ###############################################################
158 # Use dynamic loading
163 ###############################################################
164 # Force to define those symbols, as they are #defines and not
165 # catched by Configure, and they are useful
172 ###############################################################
173 # Various hints, common to all releases, to have it work better:
175 ###############################################################
176 # We need to remove libdl, as libdl.so exists, but ld complains
177 # it can't find libdl.a ! Bug or feature ? :-)
178 libswanted=`echo " $libswanted " | sed -e 's/ dl / /'`
183 ###############################################################
184 # Remove libbind because it conflicts with libsocket.
185 libswanted=`echo " $libswanted " | sed -e 's/ bind / /'`
190 ###############################################################
191 # Try to use libintl.a since it has strcoll and strxfrm
192 libswanted="intl $libswanted"
194 ###############################################################
195 # Try to use libdbm.nfs.a since it has dbmclose.
196 if test -f /usr/lib/libdbm.nfs.a ; then
197 libswanted=`echo "dbm.nfs $libswanted " | sed -e 's/ dbm / /'`
203 ###############################################################
204 # We disable ODBM_File if OSR5 because it's mostly broken
205 # but keep it for ODT3 as it seems to work.
206 if test "$scorls" = "5"; then
210 ###############################################################
211 # We don't want Xenix cross-development libraries
212 glibpth=`echo $glibpth | sed -e 's! /usr/lib/386 ! !' -e 's! /lib/386 ! !'`
215 ###############################################################
216 # I have received one report that nm extraction doesn't work if you're
217 # using the scocc compiler. This system had the following 'myconfig'
218 # uname='xxx xxx 3.2 2 i386 '
219 # cc='scocc', optimize='-O'
220 # You can override this with Configure -Dusenm.
225 ###############################################################
226 # If you want to use nm, you'll probably have to use nm -p. The
227 # following does that for you:
230 ###############################################################
231 # I have received one report that you can't include utime.h in
232 # pp_sys.c. Uncomment the following line if that happens to you:
235 ###############################################################
236 # Perl 5.003_05 and later try to include both <time.h> and <sys/select.h>
237 # in pp_sys.c, but that fails due to a redefinition of struct timeval.
238 # This will generate a WHOA THERE. Accept the default.
242 ###############################################################