Commit | Line | Data |
---|---|---|
fc1e34ef | 1 | # sco.sh |
7a6396bb | 2 | # Courtesy of Joel Rosi-Schwartz <j.schwartz@agonet.it> |
3 | ||
a5f75d66 AD |
4 | # Additional SCO version info from |
5 | # Peter Wolfe <wolfe@teloseng.com> | |
fc1e34ef | 6 | # Last revised |
7a6396bb | 7 | # Fri Jul 19 14:54:25 EDT 1996 |
fc1e34ef AD |
8 | # and again Tue Sep 29 16:37:25 EDT 1998 |
9 | # by Andy Dougherty <doughera@lafayette.edu> | |
a5f75d66 | 10 | |
fc1e34ef AD |
11 | # To use gcc, use sh Configure -Dcc=gcc |
12 | # To use icc, use sh Configure -Dcc=icc | |
a5f75d66 | 13 | |
7a6396bb | 14 | # figure out what SCO version we are. The output of uname -X is |
15 | # something like: | |
16 | # System = SCO_SV | |
17 | # Node = xxxxx | |
18 | # Release = 3.2v5.0.0 | |
19 | # KernelID = 95/08/08 | |
fc1e34ef | 20 | # Machine = Pentium |
7a6396bb | 21 | # BusType = ISA |
22 | # Serial = xxxxx | |
23 | # Users = 5-user | |
24 | # OEM# = 0 | |
25 | # Origin# = 1 | |
fc1e34ef AD |
26 | # NumCPU = 1 |
27 | ||
28 | # Use /bin/uname (because GNU uname may be first in $PATH and | |
7a6396bb | 29 | # it does not support -X) to figure out what SCO version we are: |
30 | case `/bin/uname -X | egrep '^Release'` in | |
fc1e34ef | 31 | *3.2v4.*) scorls=3 ;; # I don't know why this is 3 instead of 4. |
a5f75d66 | 32 | *3.2v5.*) scorls=5 ;; |
fc1e34ef | 33 | *) scorls=5 ;; # Hope the future will be compatible. |
a5f75d66 AD |
34 | esac |
35 | ||
a0d0e21e LW |
36 | # Try to use libintl.a since it has strcoll and strxfrm |
37 | libswanted="intl $libswanted" | |
38 | # Try to use libdbm.nfs.a since it has dbmclose. | |
fc1e34ef | 39 | # |
a0d0e21e LW |
40 | if test -f /usr/lib/libdbm.nfs.a ; then |
41 | libswanted=`echo "dbm.nfs $libswanted " | sed -e 's/ dbm / /'` | |
fc1e34ef AD |
42 | set X $libswanted |
43 | shift | |
44 | libswanted="$*" | |
a0d0e21e | 45 | fi |
a5f75d66 | 46 | |
a0d0e21e LW |
47 | # We don't want Xenix cross-development libraries |
48 | glibpth=`echo $glibpth | sed -e 's! /usr/lib/386 ! !' -e 's! /lib/386 ! !'` | |
49 | xlibpth='' | |
a5f75d66 | 50 | |
fc1e34ef AD |
51 | # Common fix for all compilers. |
52 | ccflags="$ccflags -U M_XENIX" | |
53 | ||
54 | # Set flags for optimization and warning levels. | |
a0d0e21e | 55 | case "$cc" in |
fc1e34ef AD |
56 | *gcc*) case "$optimize" in |
57 | '') optimize='-O2' ;; | |
58 | esac | |
a0d0e21e | 59 | ;; |
fc1e34ef AD |
60 | scocc) ;; # Anybody know anything about this? |
61 | *) # icc or cc -- only relevant difference is safe level of | |
62 | # optimization. Apparently. | |
7a6396bb | 63 | case $scorls in |
fc1e34ef | 64 | 3) ccflags="$ccflags -W0 -quiet" ;; |
0a6b11f8 | 65 | *) ccflags="$ccflags -w0 -DPERL_SCO5" ;; |
7a6396bb | 66 | esac |
8a67a0a3 | 67 | case "$optimize" in |
fc1e34ef AD |
68 | '') case "$cc" in |
69 | icc) optimize="-O1" ;; | |
70 | *) optimize="-O0" ;; | |
71 | esac | |
72 | ;; | |
a5f75d66 | 73 | esac |
a0d0e21e LW |
74 | ;; |
75 | esac | |
fc1e34ef AD |
76 | |
77 | # DYNAMIC LOADING: Dynamic loading won't work with scorls=3. | |
78 | # It ought to work with Release = 3.2v5.0.0 or later. | |
79 | if test "$scorls" = "3" -a "X$usedl" = "X"; then | |
80 | usedl=$undef | |
81 | else | |
82 | # I do not know exactly which of these are essential, | |
83 | # but this set has been recommended. --AD | |
84 | # These ought to be patched back into metaconfig, but the | |
85 | # current metaconfig units don't touch ccflags. | |
86 | # Unfortunately, the default on SCO is to produce COFF output, but | |
87 | # ELF is needed for dynamic loading, and the cc man page recommends | |
88 | # "Always specify option -b elf if ELF and COFF files might be mixed." | |
89 | # Therefore, we'll compile everything with -b elf. | |
90 | case "$cc" in | |
91 | *gcc*) ;; | |
92 | *) ccflags="$ccflags -b elf" ;; | |
93 | esac | |
94 | cccdlflags=none | |
95 | ccdlflags='-W l,-Bexport' | |
96 | lddlflags="$lddlflags -b elf -G" | |
97 | ldflags="$ldflags -b elf -W l,-Bexport" | |
0a6b11f8 PW |
98 | dlext='so' |
99 | dlsrc='dl_dlopen.xs' | |
100 | d_dlerror='define' | |
101 | d_dlopen='define' | |
102 | usedl='define' | |
fc1e34ef | 103 | fi |
5d94fbed AD |
104 | |
105 | # I have received one report that nm extraction doesn't work if you're | |
106 | # using the scocc compiler. This system had the following 'myconfig' | |
107 | # uname='xxx xxx 3.2 2 i386 ' | |
108 | # cc='scocc', optimize='-O' | |
fc1e34ef AD |
109 | # You can override this with Configure -Dusenm. |
110 | case "$usenm" in | |
111 | '') usenm='false' ;; | |
112 | esac | |
5d94fbed AD |
113 | |
114 | # If you want to use nm, you'll probably have to use nm -p. The | |
115 | # following does that for you: | |
a0d0e21e | 116 | nm_opt='-p' |
c2960299 AD |
117 | |
118 | # I have received one report that you can't include utime.h in | |
119 | # pp_sys.c. Uncomment the following line if that happens to you: | |
120 | # i_utime=undef | |
cdc1f821 | 121 | |
8e63d77b | 122 | # Perl 5.003_05 and later try to include both <time.h> and <sys/select.h> |
123 | # in pp_sys.c, but that fails due to a redefinition of struct timeval. | |
124 | # This will generate a WHOA THERE. Accept the default. | |
125 | i_sysselct=$undef |