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'
8 # usage: shobj-conf [-C compiler] -c host_cpu -o host_os -v host_vendor
16 SHOBJ_STATUS
=supported
17 SHLIB_STATUS
=supported
30 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF)'
32 PROGNAME
=`basename $0`
33 USAGE
="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor"
35 while [ $# -gt 0 ]; do
37 -C) shift; SHOBJ_CC
="$1"; shift ;;
38 -c) shift; host_cpu
="$1"; shift ;;
39 -o) shift; host_os
="$1"; shift ;;
40 -v) shift; host_vendor
="$1"; shift ;;
41 *) echo "$USAGE" >&2 ; exit 2;;
45 case "${host_os}-${SHOBJ_CC}" in
49 SHOBJ_LDFLAGS
='-assert pure-text'
51 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
57 SHOBJ_LDFLAGS
='-assert pure-text'
59 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
62 sunos5
*-gcc*|solaris2
*-gcc*)
65 SHOBJ_LDFLAGS
='-shared -Wl,-i -Wl,-h,$@'
67 # SHLIB_XLDFLAGS='-R $(libdir)'
68 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
73 SHOBJ_LD
=/usr
/ccs
/bin
/ld
74 SHOBJ_LDFLAGS
='-G -dy -z text -i -h $@'
76 # SHLIB_XLDFLAGS='-R $(libdir)'
77 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
80 freebsd2
* | netbsd
* | openbsd
*)
83 SHOBJ_LDFLAGS
='-x -Bshareable'
85 SHLIB_XLDFLAGS
='-R$(libdir)'
86 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
89 # FreeBSD-3.x can have either a.out or ELF object files
93 # SHOBJ_LDFLAGS='-shared'
95 # SHLIB_XLDFLAGS='-R$(libdir)'
96 # SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
104 if [ -x /usr
/bin
/objformat
] && [ "`/usr/bin/objformat`" = "elf" ]; then
105 SHOBJ_LDFLAGS
='-shared -Wl,-soname,$@'
107 SHLIB_XLDFLAGS
='-Wl,-rpath,$(libdir)'
108 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
110 SHOBJ_LDFLAGS
='-shared'
112 SHLIB_XLDFLAGS
='-R$(libdir)'
113 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
120 SHOBJ_LDFLAGS
='-shared -Wl,-soname,$@'
122 SHLIB_XLDFLAGS
='-Wl,-rpath,$(libdir)'
123 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
131 SHOBJ_LIBS
=-lc_s.2.1.0
133 # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
134 # the ass -- they require changing {/usr/lib,etc}/shlib.map on
135 # each system, and the library creation process is byzantine
136 SHLIB_STATUS
=unsupported
144 SHOBJ_LIBS
=-lc_s.3.0.0
146 # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
147 # the ass -- they require changing {/usr/lib,etc}/shlib.map on
148 # each system, and the library creation process is byzantine
149 SHLIB_STATUS
=unsupported
153 # BSD/OS 4.x now supports ELF and SunOS-style dynamically-linked
154 # shared libraries. gcc 2.x is the standard compiler, and the
155 # `normal' gcc options should work as they do in Linux.
159 SHOBJ_LDFLAGS
='-shared -Wl,-soname,$@'
161 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
165 # Fix to use gcc linker driver from bfischer@TechFak.Uni-Bielefeld.DE
167 SHOBJ_LDFLAGS
='-shared -Wl,-soname,$@'
169 SHLIB_XLDFLAGS
='-rpath $(libdir)'
170 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
175 SHOBJ_LDFLAGS
='-shared -soname $@ -expect_unresolved "*"'
177 SHLIB_XLDFLAGS
='-rpath $(libdir)'
178 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
181 aix4.
[2-9]*-gcc*) # lightly tested by jik@cisco.com
184 SHOBJ_LDFLAGS
='-bdynamic -bnoentry -bexpall'
187 SHLIB_XLDFLAGS
='-bM:SRE'
188 SHLIB_LIBS
='-lcurses -lc'
189 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
195 SHOBJ_LDFLAGS
='-bdynamic -bnoentry -bexpall'
198 SHLIB_XLDFLAGS
='-bM:SRE'
199 SHLIB_LIBS
='-lcurses -lc'
200 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
204 # THE FOLLOWING ARE UNTESTED -- and some may not support the dlopen interface
209 SHOBJ_LDFLAGS
='-shared -Wl,-soname,$@'
211 SHLIB_XLDFLAGS
='-Wl,-rpath,$(libdir)'
212 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
216 SHOBJ_CFLAGS
='-K PIC'
218 # SHOBJ_LDFLAGS='-call_shared -hidden_symbol -no_unresolved -soname $@'
219 # Change from David Kaelbling <drk@sgi.com>
220 SHOBJ_LDFLAGS
='-shared -no_unresolved -soname $@'
222 SHLIB_XLDFLAGS
='-rpath $(libdir)'
223 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
227 # must use gcc; the bundled cc cannot compile PIC code
230 SHOBJ_LDFLAGS
='-shared -Wl,-b -Wl,+s'
232 SHLIB_XLDFLAGS
='-Wl,+b,$(libdir)'
234 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
238 SHOBJ_STATUS
=unsupported
239 SHLIB_STATUS
=unsupported
243 # must use gcc; the bundled cc cannot compile PIC code
246 SHOBJ_LDFLAGS
='-shared -Wl,-b -Wl,+s'
248 SHLIB_XLDFLAGS
='-Wl,+h,$@ -Wl,+b,$(libdir)'
250 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
254 SHOBJ_STATUS
=unsupported
255 SHLIB_STATUS
=unsupported
259 # must use gcc; the bundled cc cannot compile PIC code
262 # SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,-B,symbolic -Wl,+s -Wl,+std -Wl,+h,$@'
263 SHOBJ_LDFLAGS
='-shared -Wl,-b -Wl,+s -Wl,+h,$@'
265 SHLIB_XLDFLAGS
='-Wl,+b,$(libdir)'
267 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
271 SHOBJ_STATUS
=unsupported
272 SHLIB_STATUS
=unsupported
277 SHOBJ_LDFLAGS
='-shared -h $@'
280 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
284 SHOBJ_CFLAGS
='-K PIC'
286 SHOBJ_LDFLAGS
='-dy -z text -G -h $@'
288 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
292 SHOBJ_CFLAGS
='-fpic' # DEFAULTS TO ELF
294 SHOBJ_LDFLAGS
='-shared'
296 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
300 SHOBJ_CFLAGS
='-K pic -b elf'
302 SHOBJ_LDFLAGS
='-G -b elf -dy -z text -h $@'
304 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
310 SHOBJ_LDFLAGS
='-shared'
312 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
316 SHOBJ_CFLAGS
='-K PIC'
318 SHOBJ_LDFLAGS
='-G -dy -z text -h $@'
320 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
326 SHOBJ_LDFLAGS
='-shared'
328 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
332 SHOBJ_CFLAGS
='-K pic'
334 SHOBJ_LDFLAGS
='-G -dy -h $@'
336 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
340 SHOBJ_STATUS
=unsupported
341 SHLIB_STATUS
=unsupported
345 # Rely on correct gcc configuration for everything else
350 SHOBJ_LDFLAGS
='-shared'
352 SHLIB_LIBVERSION
='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
356 SHOBJ_STATUS
=unsupported
357 SHLIB_STATUS
=unsupported
362 echo SHOBJ_CC
=\'"$SHOBJ_CC"\'
363 echo SHOBJ_CFLAGS
=\'"$SHOBJ_CFLAGS"\'
364 echo SHOBJ_LD
=\'"$SHOBJ_LD"\'
365 echo SHOBJ_LDFLAGS
=\'"$SHOBJ_LDFLAGS"\'
366 echo SHOBJ_XLDFLAGS
=\'"$SHOBJ_XLDFLAGS"\'
367 echo SHOBJ_LIBS
=\'"$SHOBJ_LIBS"\'
369 echo SHLIB_XLDFLAGS
=\'"$SHLIB_XLDFLAGS"\'
370 echo SHLIB_LIBS
=\'"$SHLIB_LIBS"\'
371 echo SHLIB_LIBSUFF
=\'"$SHLIB_LIBSUFF"\'
372 echo SHLIB_LIBVERSION
=\'"$SHLIB_LIBVERSION"\'
374 echo SHOBJ_STATUS
=\'"$SHOBJ_STATUS"\'
375 echo SHLIB_STATUS
=\'"$SHLIB_STATUS"\'
This page took 0.041358 seconds and 4 git commands to generate.