Commit | Line | Data |
---|---|---|
7a6396bb | 1 | # sco.sh |
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> | |
6 | # Last revised | |
7a6396bb | 7 | # Fri Jul 19 14:54:25 EDT 1996 |
8 | # by Andy Dougherty <doughera@lafcol.lafayette.edu> | |
a5f75d66 AD |
9 | |
10 | # To use gcc, use sh Configure -Dcc=gcc | |
7a6396bb | 11 | # But gcc will *not* do dynamic laoding on 3.2.5, |
12 | # for that use sh Configure -Dcc=icc | |
13 | # See below for more details. | |
a5f75d66 | 14 | |
7a6396bb | 15 | # figure out what SCO version we are. The output of uname -X is |
16 | # something like: | |
17 | # System = SCO_SV | |
18 | # Node = xxxxx | |
19 | # Release = 3.2v5.0.0 | |
20 | # KernelID = 95/08/08 | |
21 | # Machine = Pentium | |
22 | # BusType = ISA | |
23 | # Serial = xxxxx | |
24 | # Users = 5-user | |
25 | # OEM# = 0 | |
26 | # Origin# = 1 | |
27 | # NumCPU = 1 | |
28 | ||
29 | # Use /bin/uname (because Gnu may be first on the path and | |
30 | # it does not support -X) to figure out what SCO version we are: | |
31 | case `/bin/uname -X | egrep '^Release'` in | |
32 | *3.2v4.*) scorls=3 ;; # I don't know why this is 3 instead of 4 :-) | |
a5f75d66 AD |
33 | *3.2v5.*) scorls=5 ;; |
34 | *) scorls=3 ;; # this probabaly shouldn't happen | |
35 | esac | |
36 | ||
a0d0e21e LW |
37 | # Try to use libintl.a since it has strcoll and strxfrm |
38 | libswanted="intl $libswanted" | |
39 | # Try to use libdbm.nfs.a since it has dbmclose. | |
40 | # | |
41 | if test -f /usr/lib/libdbm.nfs.a ; then | |
42 | libswanted=`echo "dbm.nfs $libswanted " | sed -e 's/ dbm / /'` | |
43 | fi | |
44 | set X $libswanted | |
45 | shift | |
46 | libswanted="$*" | |
a5f75d66 | 47 | |
a0d0e21e LW |
48 | # We don't want Xenix cross-development libraries |
49 | glibpth=`echo $glibpth | sed -e 's! /usr/lib/386 ! !' -e 's! /lib/386 ! !'` | |
50 | xlibpth='' | |
a5f75d66 | 51 | |
a0d0e21e | 52 | case "$cc" in |
7a6396bb | 53 | *gcc*) ccflags="$ccflags -U M_XENIX" |
a0d0e21e LW |
54 | optimize="$optimize -O2" |
55 | ;; | |
5d94fbed AD |
56 | scocc) ;; |
57 | ||
7a6396bb | 58 | # On SCO 3.2v5 both cc and icc can build dynamic load, but cc core |
59 | # dumps if optimised, so I am only setting this up for icc. | |
60 | # It is possible that some 3.2v4.2 system have icc, I seem to | |
61 | # recall it was available as a seperate product but I have no | |
62 | # knowledge if it can do dynamic loading and if so how. | |
63 | # Joel Rosi-Schwartz | |
64 | icc)# Apparently, SCO's cc gives rather verbose warnings | |
65 | # Set -w0 to turn them off. | |
66 | case $scorls in | |
67 | 3) ccflags="$ccflags -W0 -quiet -U M_XENIX" ;; | |
68 | 5) ccflags="$ccflags -belf -w0 -U M_XENIX" | |
69 | optimize="-O1" # -g -O1 will not work | |
70 | lddlflags='-G -L/usr/local/lib' | |
71 | ldflags=' -W l,-Bexport -L/usr/local/lib' | |
72 | dlext='so' | |
73 | dlsrc='dl_dlopen.xs' | |
74 | usedl='define' | |
75 | ;; | |
76 | esac | |
77 | ;; | |
78 | ||
8a67a0a3 | 79 | *) # Apparently, miniperl core dumps if -O is used. |
80 | case "$optimize" in | |
81 | '') optimize=none ;; | |
82 | esac | |
83 | # Apparently, SCO's cc gives rather verbose warnings | |
cdc1f821 | 84 | # Set -w0 to turn them off. |
a5f75d66 AD |
85 | case $scorls in |
86 | 3) ccflags="$ccflags -W0 -quiet -U M_XENIX" ;; | |
87 | 5) ccflags="$ccflags -w0 -U M_XENIX" ;; | |
88 | esac | |
a0d0e21e LW |
89 | ;; |
90 | esac | |
988174c1 | 91 | i_varargs=undef |
5d94fbed AD |
92 | |
93 | # I have received one report that nm extraction doesn't work if you're | |
94 | # using the scocc compiler. This system had the following 'myconfig' | |
95 | # uname='xxx xxx 3.2 2 i386 ' | |
96 | # cc='scocc', optimize='-O' | |
97 | usenm='false' | |
98 | ||
99 | # If you want to use nm, you'll probably have to use nm -p. The | |
100 | # following does that for you: | |
a0d0e21e | 101 | nm_opt='-p' |
c2960299 AD |
102 | |
103 | # I have received one report that you can't include utime.h in | |
104 | # pp_sys.c. Uncomment the following line if that happens to you: | |
105 | # i_utime=undef | |
cdc1f821 | 106 | |
107 | # Apparently, some versions of SCO include both .so and .a libraries, | |
108 | # but they don't mix as they do on other ELF systems. The upshot is | |
109 | # that Configure finds -ldl (libdl.so) but 'ld' complains it can't | |
110 | # find libdl.a. | |
111 | # I don't know which systems have this feature, so I'll just remove | |
112 | # -dl from libswanted for all SCO systems until someone can figure | |
113 | # out how to get dynamic loading working on SCO. | |
114 | # | |
115 | # The output of uname -X on one such system was | |
116 | # System = SCO_SV | |
117 | # Node = xxxxx | |
118 | # Release = 3.2v5.0.0 | |
119 | # KernelID = 95/08/08 | |
120 | # Machine = Pentium | |
121 | # BusType = ISA | |
122 | # Serial = xxxxx | |
123 | # Users = 5-user | |
124 | # OEM# = 0 | |
125 | # Origin# = 1 | |
126 | # NumCPU = 1 | |
127 | # | |
128 | # The 5.0.0 on the Release= line is probably the thing to watch. | |
129 | # Andy Dougherty <doughera@lafcol.lafayette.edu> | |
130 | # Thu Feb 1 15:06:56 EST 1996 | |
131 | libswanted=`echo " $libswanted " | sed -e 's/ dl / /'` | |
132 | set X $libswanted | |
133 | shift | |
134 | libswanted="$*" | |
8e63d77b | 135 | |
136 | # Perl 5.003_05 and later try to include both <time.h> and <sys/select.h> | |
137 | # in pp_sys.c, but that fails due to a redefinition of struct timeval. | |
138 | # This will generate a WHOA THERE. Accept the default. | |
139 | i_sysselct=$undef |