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