Commit | Line | Data |
---|---|---|
9b700aad | 1 | #! /bin/sh |
c862e87b JM |
2 | # |
3 | # shobj-conf -- output a series of variable assignments to be substituted | |
4 | # into a Makefile by configure which specify system-dependent | |
5 | # information for creating shared objects that may be loaded | |
6 | # into bash with `enable -f' | |
7 | # | |
8 | # usage: shobj-conf [-C compiler] -c host_cpu -o host_os -v host_vendor | |
9 | # | |
10 | # Chet Ramey | |
11 | # chet@po.cwru.edu | |
12 | ||
cc88a640 | 13 | # Copyright (C) 1996-2009 Free Software Foundation, Inc. |
9255ee31 | 14 | # |
cc88a640 | 15 | # This file is part of GNU Bash, the Bourne Again SHell. |
9255ee31 | 16 | # |
cc88a640 JK |
17 | # This program is free software: you can redistribute it and/or modify |
18 | # it under the terms of the GNU General Public License as published by | |
19 | # the Free Software Foundation, either version 3 of the License, or | |
20 | # (at your option) any later version. | |
21 | # | |
22 | # This program is distributed in the hope that it will be useful, | |
23 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | # GNU General Public License for more details. | |
26 | # | |
27 | # You should have received a copy of the GNU General Public License | |
28 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
9255ee31 | 29 | # |
9255ee31 | 30 | |
c862e87b JM |
31 | # |
32 | # defaults | |
33 | # | |
34 | SHOBJ_STATUS=supported | |
35 | SHLIB_STATUS=supported | |
36 | ||
37 | SHOBJ_CC=cc | |
38 | SHOBJ_CFLAGS= | |
39 | SHOBJ_LD= | |
40 | SHOBJ_LDFLAGS= | |
41 | SHOBJ_XLDFLAGS= | |
42 | SHOBJ_LIBS= | |
43 | ||
44 | SHLIB_XLDFLAGS= | |
45 | SHLIB_LIBS= | |
5bdf8622 DJ |
46 | |
47 | SHLIB_DOT='.' | |
48 | SHLIB_LIBPREF='lib' | |
c862e87b JM |
49 | SHLIB_LIBSUFF='so' |
50 | ||
51 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)' | |
5bdf8622 | 52 | SHLIB_DLLVERSION='$(SHLIB_MAJOR)' |
c862e87b JM |
53 | |
54 | PROGNAME=`basename $0` | |
55 | USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor" | |
56 | ||
57 | while [ $# -gt 0 ]; do | |
58 | case "$1" in | |
59 | -C) shift; SHOBJ_CC="$1"; shift ;; | |
60 | -c) shift; host_cpu="$1"; shift ;; | |
61 | -o) shift; host_os="$1"; shift ;; | |
62 | -v) shift; host_vendor="$1"; shift ;; | |
63 | *) echo "$USAGE" >&2 ; exit 2;; | |
64 | esac | |
65 | done | |
66 | ||
cc88a640 | 67 | case "${host_os}-${SHOBJ_CC}-${host_vendor}" in |
9255ee31 | 68 | sunos4*-*gcc*) |
c862e87b JM |
69 | SHOBJ_CFLAGS=-fpic |
70 | SHOBJ_LD=/usr/bin/ld | |
71 | SHOBJ_LDFLAGS='-assert pure-text' | |
72 | ||
73 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' | |
74 | ;; | |
75 | ||
76 | sunos4*) | |
77 | SHOBJ_CFLAGS=-pic | |
78 | SHOBJ_LD=/usr/bin/ld | |
79 | SHOBJ_LDFLAGS='-assert pure-text' | |
80 | ||
81 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' | |
82 | ;; | |
83 | ||
9255ee31 | 84 | sunos5*-*gcc*|solaris2*-*gcc*) |
c862e87b | 85 | SHOBJ_LD='${CC}' |
5bdf8622 DJ |
86 | ld_used=`gcc -print-prog-name=ld` |
87 | if ${ld_used} -V 2>&1 | grep GNU >/dev/null 2>&1; then | |
88 | # This line works for the GNU ld | |
89 | SHOBJ_LDFLAGS='-shared -Wl,-h,$@' | |
cc88a640 JK |
90 | # http://sourceware.org/ml/binutils/2001-08/msg00361.html |
91 | SHOBJ_CFLAGS=-fPIC | |
5bdf8622 DJ |
92 | else |
93 | # This line works for the Solaris linker in /usr/ccs/bin/ld | |
94 | SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@' | |
cc88a640 | 95 | SHOBJ_CFLAGS=-fpic |
5bdf8622 | 96 | fi |
c862e87b | 97 | |
1b17e766 | 98 | # SHLIB_XLDFLAGS='-R $(libdir)' |
c862e87b JM |
99 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' |
100 | ;; | |
101 | ||
102 | sunos5*|solaris2*) | |
103 | SHOBJ_CFLAGS='-K pic' | |
104 | SHOBJ_LD=/usr/ccs/bin/ld | |
105 | SHOBJ_LDFLAGS='-G -dy -z text -i -h $@' | |
106 | ||
1b17e766 | 107 | # SHLIB_XLDFLAGS='-R $(libdir)' |
c862e87b JM |
108 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' |
109 | ;; | |
110 | ||
cc88a640 JK |
111 | # All versions of Linux (including Gentoo/FreeBSD) or the semi-mythical GNU Hurd. |
112 | linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo) | |
9255ee31 EZ |
113 | SHOBJ_CFLAGS=-fPIC |
114 | SHOBJ_LD='${CC}' | |
115 | SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' | |
116 | ||
117 | SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`' | |
118 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' | |
119 | ;; | |
120 | ||
cc88a640 | 121 | freebsd2*) |
c862e87b JM |
122 | SHOBJ_CFLAGS=-fpic |
123 | SHOBJ_LD=ld | |
124 | SHOBJ_LDFLAGS='-x -Bshareable' | |
125 | ||
126 | SHLIB_XLDFLAGS='-R$(libdir)' | |
127 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' | |
128 | ;; | |
129 | ||
1b17e766 | 130 | # FreeBSD-3.x ELF |
cc88a640 JK |
131 | freebsd3*|freebsdaout*) |
132 | SHOBJ_CFLAGS=-fPIC | |
c862e87b | 133 | SHOBJ_LD='${CC}' |
c862e87b | 134 | |
1b17e766 EZ |
135 | if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then |
136 | SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' | |
137 | ||
138 | SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)' | |
139 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
140 | else | |
141 | SHOBJ_LDFLAGS='-shared' | |
142 | ||
143 | SHLIB_XLDFLAGS='-R$(libdir)' | |
144 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' | |
145 | fi | |
c862e87b JM |
146 | ;; |
147 | ||
cc88a640 JK |
148 | # FreeBSD-4.x and later have only ELF |
149 | freebsd[4-9]*|freebsdelf*|dragonfly*) | |
150 | SHOBJ_CFLAGS=-fPIC | |
151 | SHOBJ_LD='${CC}' | |
152 | ||
153 | SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' | |
154 | SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)' | |
155 | ||
156 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
157 | ;; | |
158 | ||
9255ee31 | 159 | # Darwin/MacOS X |
cc88a640 JK |
160 | darwin[89]*|darwin10*) |
161 | SHOBJ_STATUS=supported | |
162 | SHLIB_STATUS=supported | |
163 | ||
164 | SHOBJ_CFLAGS='-fno-common' | |
165 | ||
166 | SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}' | |
167 | ||
168 | SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' | |
169 | SHLIB_LIBSUFF='dylib' | |
170 | ||
171 | SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup -arch_only `/usr/bin/arch`' | |
172 | SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' | |
173 | ||
174 | SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 | |
175 | ;; | |
176 | ||
9255ee31 EZ |
177 | darwin*|macosx*) |
178 | SHOBJ_STATUS=unsupported | |
179 | SHLIB_STATUS=supported | |
180 | ||
5bdf8622 | 181 | SHOBJ_CFLAGS='-fno-common' |
9255ee31 | 182 | |
5bdf8622 | 183 | SHOBJ_LD='${CC}' |
9255ee31 EZ |
184 | |
185 | SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' | |
186 | SHLIB_LIBSUFF='dylib' | |
187 | ||
5bdf8622 | 188 | case "${host_os}" in |
cc88a640 | 189 | darwin[789]*|darwin10*) SHOBJ_LDFLAGS='' |
5bdf8622 DJ |
190 | SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' |
191 | ;; | |
192 | *) SHOBJ_LDFLAGS='-dynamic' | |
193 | SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' | |
194 | ;; | |
195 | esac | |
9255ee31 | 196 | |
5bdf8622 | 197 | SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 |
9255ee31 EZ |
198 | ;; |
199 | ||
cc88a640 | 200 | openbsd*|netbsd*) |
c862e87b JM |
201 | SHOBJ_CFLAGS=-fPIC |
202 | SHOBJ_LD='${CC}' | |
9255ee31 | 203 | SHOBJ_LDFLAGS='-shared' |
c862e87b | 204 | |
9255ee31 | 205 | SHLIB_XLDFLAGS='-R$(libdir)' |
c862e87b JM |
206 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' |
207 | ;; | |
208 | ||
209 | bsdi2*) | |
210 | SHOBJ_CC=shlicc2 | |
211 | SHOBJ_CFLAGS= | |
212 | SHOBJ_LD=ld | |
213 | SHOBJ_LDFLAGS=-r | |
214 | SHOBJ_LIBS=-lc_s.2.1.0 | |
215 | ||
216 | # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in | |
217 | # the ass -- they require changing {/usr/lib,etc}/shlib.map on | |
218 | # each system, and the library creation process is byzantine | |
219 | SHLIB_STATUS=unsupported | |
220 | ;; | |
221 | ||
222 | bsdi3*) | |
223 | SHOBJ_CC=shlicc2 | |
224 | SHOBJ_CFLAGS= | |
225 | SHOBJ_LD=ld | |
226 | SHOBJ_LDFLAGS=-r | |
227 | SHOBJ_LIBS=-lc_s.3.0.0 | |
228 | ||
229 | # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in | |
230 | # the ass -- they require changing {/usr/lib,etc}/shlib.map on | |
231 | # each system, and the library creation process is byzantine | |
232 | SHLIB_STATUS=unsupported | |
233 | ;; | |
234 | ||
235 | bsdi4*) | |
236 | # BSD/OS 4.x now supports ELF and SunOS-style dynamically-linked | |
237 | # shared libraries. gcc 2.x is the standard compiler, and the | |
238 | # `normal' gcc options should work as they do in Linux. | |
239 | ||
240 | SHOBJ_CFLAGS=-fPIC | |
241 | SHOBJ_LD='${CC}' | |
242 | SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' | |
243 | ||
9255ee31 | 244 | SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`' |
c862e87b JM |
245 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' |
246 | ;; | |
247 | ||
9255ee31 | 248 | osf*-*gcc*) |
1b17e766 EZ |
249 | # Fix to use gcc linker driver from bfischer@TechFak.Uni-Bielefeld.DE |
250 | SHOBJ_LD='${CC}' | |
251 | SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' | |
252 | ||
253 | SHLIB_XLDFLAGS='-rpath $(libdir)' | |
254 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
255 | ;; | |
256 | ||
c862e87b JM |
257 | osf*) |
258 | SHOBJ_LD=ld | |
259 | SHOBJ_LDFLAGS='-shared -soname $@ -expect_unresolved "*"' | |
260 | ||
261 | SHLIB_XLDFLAGS='-rpath $(libdir)' | |
262 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
263 | ;; | |
264 | ||
cc88a640 | 265 | aix4.[2-9]*-*gcc*|aix[5-9].*-*gcc*) # lightly tested by jik@cisco.com |
c862e87b JM |
266 | SHOBJ_CFLAGS=-fpic |
267 | SHOBJ_LD='ld' | |
268 | SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall' | |
269 | SHOBJ_XLDFLAGS='-G' | |
270 | ||
271 | SHLIB_XLDFLAGS='-bM:SRE' | |
272 | SHLIB_LIBS='-lcurses -lc' | |
273 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
274 | ;; | |
275 | ||
cc88a640 | 276 | aix4.[2-9]*|aix[5-9].*) |
c862e87b JM |
277 | SHOBJ_CFLAGS=-K |
278 | SHOBJ_LD='ld' | |
279 | SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall' | |
280 | SHOBJ_XLDFLAGS='-G' | |
281 | ||
282 | SHLIB_XLDFLAGS='-bM:SRE' | |
283 | SHLIB_LIBS='-lcurses -lc' | |
284 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
285 | ;; | |
286 | ||
287 | # | |
288 | # THE FOLLOWING ARE UNTESTED -- and some may not support the dlopen interface | |
289 | # | |
9255ee31 | 290 | irix[56]*-*gcc*) |
c862e87b JM |
291 | SHOBJ_CFLAGS='-fpic' |
292 | SHOBJ_LD='${CC}' | |
293 | SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' | |
294 | ||
295 | SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)' | |
296 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
297 | ;; | |
298 | ||
299 | irix[56]*) | |
300 | SHOBJ_CFLAGS='-K PIC' | |
301 | SHOBJ_LD=ld | |
1b17e766 | 302 | # SHOBJ_LDFLAGS='-call_shared -hidden_symbol -no_unresolved -soname $@' |
9255ee31 EZ |
303 | # Change from David Kaelbling <drk@sgi.com>. If you have problems, |
304 | # remove the `-no_unresolved' | |
1b17e766 | 305 | SHOBJ_LDFLAGS='-shared -no_unresolved -soname $@' |
c862e87b JM |
306 | |
307 | SHLIB_XLDFLAGS='-rpath $(libdir)' | |
308 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
309 | ;; | |
310 | ||
9255ee31 | 311 | hpux9*-*gcc*) |
c862e87b JM |
312 | # must use gcc; the bundled cc cannot compile PIC code |
313 | SHOBJ_CFLAGS='-fpic' | |
314 | SHOBJ_LD='${CC}' | |
315 | SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s' | |
316 | ||
317 | SHLIB_XLDFLAGS='-Wl,+b,$(libdir)' | |
318 | SHLIB_LIBSUFF='sl' | |
319 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
320 | ;; | |
321 | ||
322 | hpux9*) | |
323 | SHOBJ_STATUS=unsupported | |
324 | SHLIB_STATUS=unsupported | |
9255ee31 EZ |
325 | |
326 | # If you are using the HP ANSI C compiler, you can uncomment and use | |
327 | # this code (I have not tested it) | |
328 | # SHOBJ_STATUS=supported | |
329 | # SHLIB_STATUS=supported | |
330 | # | |
331 | # SHOBJ_CFLAGS='+z' | |
332 | # SHOBJ_LD='ld' | |
333 | # SHOBJ_LDFLAGS='-b +s' | |
334 | # | |
335 | # SHLIB_XLDFLAGS='+b $(libdir)' | |
336 | # SHLIB_LIBSUFF='sl' | |
337 | # SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
338 | ||
c862e87b JM |
339 | ;; |
340 | ||
9255ee31 | 341 | hpux10*-*gcc*) |
c862e87b JM |
342 | # must use gcc; the bundled cc cannot compile PIC code |
343 | SHOBJ_CFLAGS='-fpic' | |
344 | SHOBJ_LD='${CC}' | |
5bdf8622 DJ |
345 | # if you have problems linking here, moving the `-Wl,+h,$@' from |
346 | # SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work | |
cc88a640 | 347 | SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s' |
c862e87b JM |
348 | |
349 | SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)' | |
350 | SHLIB_LIBSUFF='sl' | |
351 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
352 | ;; | |
353 | ||
354 | hpux10*) | |
355 | SHOBJ_STATUS=unsupported | |
356 | SHLIB_STATUS=unsupported | |
9255ee31 EZ |
357 | |
358 | # If you are using the HP ANSI C compiler, you can uncomment and use | |
359 | # this code (I have not tested it) | |
360 | # SHOBJ_STATUS=supported | |
361 | # SHLIB_STATUS=supported | |
362 | # | |
363 | # SHOBJ_CFLAGS='+z' | |
364 | # SHOBJ_LD='ld' | |
365 | # SHOBJ_LDFLAGS='-b +s +h $@' | |
366 | # | |
367 | # SHLIB_XLDFLAGS='+b $(libdir)' | |
368 | # SHLIB_LIBSUFF='sl' | |
369 | # SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
370 | ||
c862e87b JM |
371 | ;; |
372 | ||
9255ee31 | 373 | hpux11*-*gcc*) |
c862e87b JM |
374 | # must use gcc; the bundled cc cannot compile PIC code |
375 | SHOBJ_CFLAGS='-fpic' | |
376 | SHOBJ_LD='${CC}' | |
377 | # SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,-B,symbolic -Wl,+s -Wl,+std -Wl,+h,$@' | |
9255ee31 | 378 | SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s -Wl,+h,$@' |
c862e87b JM |
379 | |
380 | SHLIB_XLDFLAGS='-Wl,+b,$(libdir)' | |
381 | SHLIB_LIBSUFF='sl' | |
382 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
383 | ;; | |
384 | ||
385 | hpux11*) | |
386 | SHOBJ_STATUS=unsupported | |
387 | SHLIB_STATUS=unsupported | |
9255ee31 EZ |
388 | |
389 | # If you are using the HP ANSI C compiler, you can uncomment and use | |
390 | # this code (I have not tested it) | |
391 | # SHOBJ_STATUS=supported | |
392 | # SHLIB_STATUS=supported | |
393 | # | |
394 | # SHOBJ_CFLAGS='+z' | |
395 | # SHOBJ_LD='ld' | |
396 | # SHOBJ_LDFLAGS='-b +s +h $@' | |
397 | # | |
398 | # SHLIB_XLDFLAGS='+b $(libdir)' | |
399 | # SHLIB_LIBSUFF='sl' | |
400 | # SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
401 | ||
c862e87b JM |
402 | ;; |
403 | ||
9255ee31 | 404 | sysv4*-*gcc*) |
c862e87b JM |
405 | SHOBJ_CFLAGS=-shared |
406 | SHOBJ_LDFLAGS='-shared -h $@' | |
407 | SHOBJ_LD='${CC}' | |
408 | ||
409 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
410 | ;; | |
411 | ||
412 | sysv4*) | |
413 | SHOBJ_CFLAGS='-K PIC' | |
414 | SHOBJ_LD=ld | |
415 | SHOBJ_LDFLAGS='-dy -z text -G -h $@' | |
416 | ||
417 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
418 | ;; | |
419 | ||
9255ee31 | 420 | sco3.2v5*-*gcc*) |
c862e87b JM |
421 | SHOBJ_CFLAGS='-fpic' # DEFAULTS TO ELF |
422 | SHOBJ_LD='${CC}' | |
423 | SHOBJ_LDFLAGS='-shared' | |
424 | ||
425 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
426 | ;; | |
427 | ||
428 | sco3.2v5*) | |
429 | SHOBJ_CFLAGS='-K pic -b elf' | |
430 | SHOBJ_LD=ld | |
431 | SHOBJ_LDFLAGS='-G -b elf -dy -z text -h $@' | |
432 | ||
433 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
434 | ;; | |
435 | ||
9255ee31 | 436 | sysv5uw7*-*gcc*) |
c862e87b JM |
437 | SHOBJ_CFLAGS='-fpic' |
438 | SHOBJ_LD='${CC}' | |
439 | SHOBJ_LDFLAGS='-shared' | |
440 | ||
441 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
442 | ;; | |
443 | ||
444 | sysv5uw7*) | |
445 | SHOBJ_CFLAGS='-K PIC' | |
446 | SHOBJ_LD=ld | |
447 | SHOBJ_LDFLAGS='-G -dy -z text -h $@' | |
448 | ||
449 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
450 | ;; | |
5bdf8622 DJ |
451 | |
452 | sysv5UnixWare*-*gcc*) | |
453 | SHOBJ_CFLAGS=-fpic | |
454 | SHOBJ_LD='${CC}' | |
455 | SHOBJ_LDFLAGS='-shared' | |
456 | ||
457 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
458 | ;; | |
459 | ||
460 | sysv5UnixWare*) | |
461 | SHOBJ_CFLAGS='-K PIC' | |
462 | SHOBJ_LD=ld | |
463 | SHOBJ_LDFLAGS='-G -dy -z text -h $@' | |
464 | ||
465 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
466 | ;; | |
467 | ||
468 | sysv5OpenUNIX*-*gcc*) | |
469 | SHOBJ_CFLAGS=-fpic | |
470 | SHOBJ_LD='${CC}' | |
471 | SHOBJ_LDFLAGS='-shared' | |
472 | ||
473 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
474 | ;; | |
475 | ||
476 | sysv5OpenUNIX*) | |
477 | SHOBJ_CFLAGS='-K PIC' | |
478 | SHOBJ_LD=ld | |
479 | SHOBJ_LDFLAGS='-G -dy -z text -h $@' | |
480 | ||
481 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
482 | ;; | |
483 | ||
9255ee31 | 484 | dgux*-*gcc*) |
c862e87b JM |
485 | SHOBJ_CFLAGS=-fpic |
486 | SHOBJ_LD='${CC}' | |
487 | SHOBJ_LDFLAGS='-shared' | |
488 | ||
489 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
490 | ;; | |
491 | ||
492 | dgux*) | |
493 | SHOBJ_CFLAGS='-K pic' | |
494 | SHOBJ_LD=ld | |
495 | SHOBJ_LDFLAGS='-G -dy -h $@' | |
496 | ||
497 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
498 | ;; | |
511fec4d | 499 | |
1b17e766 | 500 | msdos*) |
511fec4d EZ |
501 | SHOBJ_STATUS=unsupported |
502 | SHLIB_STATUS=unsupported | |
503 | ;; | |
504 | ||
5bdf8622 DJ |
505 | cygwin*) |
506 | SHOBJ_LD='$(CC)' | |
cc88a640 JK |
507 | SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' |
508 | SHLIB_LIBPREF='cyg' | |
509 | SHLIB_LIBSUFF='dll' | |
510 | SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' | |
511 | SHLIB_LIBS='$(TERMCAP_LIB)' | |
5bdf8622 DJ |
512 | |
513 | SHLIB_DOT= | |
cc88a640 JK |
514 | # For official cygwin releases, DLLVERSION will be defined in the |
515 | # environment of configure, and will be incremented any time the API | |
516 | # changes in a non-backwards compatible manner. Otherwise, it is just | |
517 | # SHLIB_MAJOR. | |
518 | if [ -n "$DLLVERSION" ] ; then | |
5bdf8622 | 519 | SHLIB_DLLVERSION="$DLLVERSION" |
cc88a640 JK |
520 | fi |
521 | ;; | |
522 | ||
523 | mingw*) | |
524 | SHOBJ_LD='$(CC)' | |
525 | SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' | |
526 | SHLIB_LIBSUFF='dll' | |
527 | SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' | |
528 | SHLIB_LIBS='$(TERMCAP_LIB)' | |
529 | ||
530 | SHLIB_DOT= | |
531 | # For official cygwin releases, DLLVERSION will be defined in the | |
532 | # environment of configure, and will be incremented any time the API | |
533 | # changes in a non-backwards compatible manner. Otherwise, it is just | |
534 | # SHLIB_MAJOR. | |
535 | if [ -n "$DLLVERSION" ] ; then | |
536 | SHLIB_DLLVERSION="$DLLVERSION" | |
537 | fi | |
5bdf8622 DJ |
538 | ;; |
539 | ||
c862e87b JM |
540 | # |
541 | # Rely on correct gcc configuration for everything else | |
542 | # | |
9255ee31 | 543 | *-*gcc*) |
c862e87b JM |
544 | SHOBJ_CFLAGS=-fpic |
545 | SHOBJ_LD='${CC}' | |
546 | SHOBJ_LDFLAGS='-shared' | |
547 | ||
548 | SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' | |
549 | ;; | |
550 | ||
551 | *) | |
552 | SHOBJ_STATUS=unsupported | |
553 | SHLIB_STATUS=unsupported | |
554 | ;; | |
555 | ||
556 | esac | |
557 | ||
558 | echo SHOBJ_CC=\'"$SHOBJ_CC"\' | |
559 | echo SHOBJ_CFLAGS=\'"$SHOBJ_CFLAGS"\' | |
560 | echo SHOBJ_LD=\'"$SHOBJ_LD"\' | |
561 | echo SHOBJ_LDFLAGS=\'"$SHOBJ_LDFLAGS"\' | |
562 | echo SHOBJ_XLDFLAGS=\'"$SHOBJ_XLDFLAGS"\' | |
563 | echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\' | |
564 | ||
565 | echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\' | |
566 | echo SHLIB_LIBS=\'"$SHLIB_LIBS"\' | |
5bdf8622 DJ |
567 | |
568 | echo SHLIB_DOT=\'"$SHLIB_DOT"\' | |
569 | ||
570 | echo SHLIB_LIBPREF=\'"$SHLIB_LIBPREF"\' | |
c862e87b | 571 | echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\' |
5bdf8622 | 572 | |
c862e87b | 573 | echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\' |
5bdf8622 | 574 | echo SHLIB_DLLVERSION=\'"$SHLIB_DLLVERSION"\' |
c862e87b JM |
575 | |
576 | echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\' | |
577 | echo SHLIB_STATUS=\'"$SHLIB_STATUS"\' | |
578 | ||
579 | exit 0 |