shobj-conf (136644) | shobj-conf (157184) |
---|---|
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 --- 27 unchanged lines hidden (view full) --- 36SHOBJ_CFLAGS= 37SHOBJ_LD= 38SHOBJ_LDFLAGS= 39SHOBJ_XLDFLAGS= 40SHOBJ_LIBS= 41 42SHLIB_XLDFLAGS= 43SHLIB_LIBS= | 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 --- 27 unchanged lines hidden (view full) --- 36SHOBJ_CFLAGS= 37SHOBJ_LD= 38SHOBJ_LDFLAGS= 39SHOBJ_XLDFLAGS= 40SHOBJ_LIBS= 41 42SHLIB_XLDFLAGS= 43SHLIB_LIBS= |
44 45SHLIB_DOT='.' 46SHLIB_LIBPREF='lib' |
|
44SHLIB_LIBSUFF='so' 45 46SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)' | 47SHLIB_LIBSUFF='so' 48 49SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)' |
50SHLIB_DLLVERSION='$(SHLIB_MAJOR)' |
|
47 48PROGNAME=`basename $0` 49USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor" 50 51while [ $# -gt 0 ]; do 52 case "$1" in 53 -C) shift; SHOBJ_CC="$1"; shift ;; 54 -c) shift; host_cpu="$1"; shift ;; --- 18 unchanged lines hidden (view full) --- 73 SHOBJ_LDFLAGS='-assert pure-text' 74 75 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' 76 ;; 77 78sunos5*-*gcc*|solaris2*-*gcc*) 79 SHOBJ_CFLAGS=-fpic 80 SHOBJ_LD='${CC}' | 51 52PROGNAME=`basename $0` 53USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor" 54 55while [ $# -gt 0 ]; do 56 case "$1" in 57 -C) shift; SHOBJ_CC="$1"; shift ;; 58 -c) shift; host_cpu="$1"; shift ;; --- 18 unchanged lines hidden (view full) --- 77 SHOBJ_LDFLAGS='-assert pure-text' 78 79 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' 80 ;; 81 82sunos5*-*gcc*|solaris2*-*gcc*) 83 SHOBJ_CFLAGS=-fpic 84 SHOBJ_LD='${CC}' |
81 # This line works for the Solaris linker in /usr/ccs/bin/ld 82 SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@' 83 # This line works for the GNU ld 84# SHOBJ_LDFLAGS='-shared -Wl,-h,$@' | 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 |
85 86# SHLIB_XLDFLAGS='-R $(libdir)' 87 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' 88 ;; 89 90sunos5*|solaris2*) 91 SHOBJ_CFLAGS='-K pic' 92 SHOBJ_LD=/usr/ccs/bin/ld --- 18 unchanged lines hidden (view full) --- 111 SHOBJ_LD=ld 112 SHOBJ_LDFLAGS='-x -Bshareable' 113 114 SHLIB_XLDFLAGS='-R$(libdir)' 115 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' 116 ;; 117 118# FreeBSD-3.x ELF | 93 94# SHLIB_XLDFLAGS='-R $(libdir)' 95 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' 96 ;; 97 98sunos5*|solaris2*) 99 SHOBJ_CFLAGS='-K pic' 100 SHOBJ_LD=/usr/ccs/bin/ld --- 18 unchanged lines hidden (view full) --- 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 |
119freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*) | 127freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*) |
120 SHOBJ_CFLAGS=-fpic 121 SHOBJ_LD='${CC}' 122 123 if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then 124 SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' 125 126 SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)' 127 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' --- 13 unchanged lines hidden (view full) --- 141 SHOBJ_CFLAGS='-fno-common' 142 143 SHOBJ_LD='${CC}' 144 145 SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' 146 SHLIB_LIBSUFF='dylib' 147 148 case "${host_os}" in | 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)' --- 13 unchanged lines hidden (view full) --- 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 |
149 darwin7*) SHOBJ_LDFLAGS='' | 157 darwin[78]*) SHOBJ_LDFLAGS='' |
150 SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' 151 ;; 152 *) SHOBJ_LDFLAGS='-dynamic' 153 SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' 154 ;; 155 esac 156 157 SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 --- 245 unchanged lines hidden (view full) --- 403 404sysv5uw7*) 405 SHOBJ_CFLAGS='-K PIC' 406 SHOBJ_LD=ld 407 SHOBJ_LDFLAGS='-G -dy -z text -h $@' 408 409 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' 410 ;; | 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 --- 245 unchanged lines hidden (view full) --- 411 412sysv5uw7*) 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 ;; |
411 | 419 420sysv5UnixWare*-*gcc*) 421 SHOBJ_CFLAGS=-fpic 422 SHOBJ_LD='${CC}' 423 SHOBJ_LDFLAGS='-shared' 424 425 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' 426 ;; 427 428sysv5UnixWare*) 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 436sysv5OpenUNIX*-*gcc*) 437 SHOBJ_CFLAGS=-fpic 438 SHOBJ_LD='${CC}' 439 SHOBJ_LDFLAGS='-shared' 440 441 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' 442 ;; 443 444sysv5OpenUNIX*) 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 |
412dgux*-*gcc*) 413 SHOBJ_CFLAGS=-fpic 414 SHOBJ_LD='${CC}' 415 SHOBJ_LDFLAGS='-shared' 416 417 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' 418 ;; 419 --- 5 unchanged lines hidden (view full) --- 425 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' 426 ;; 427 428msdos*) 429 SHOBJ_STATUS=unsupported 430 SHLIB_STATUS=unsupported 431 ;; 432 | 452dgux*-*gcc*) 453 SHOBJ_CFLAGS=-fpic 454 SHOBJ_LD='${CC}' 455 SHOBJ_LDFLAGS='-shared' 456 457 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' 458 ;; 459 --- 5 unchanged lines hidden (view full) --- 465 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' 466 ;; 467 468msdos*) 469 SHOBJ_STATUS=unsupported 470 SHLIB_STATUS=unsupported 471 ;; 472 |
473cygwin*) 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 |
|
433# 434# Rely on correct gcc configuration for everything else 435# 436*-*gcc*) 437 SHOBJ_CFLAGS=-fpic 438 SHOBJ_LD='${CC}' 439 SHOBJ_LDFLAGS='-shared' 440 --- 11 unchanged lines hidden (view full) --- 452echo SHOBJ_CFLAGS=\'"$SHOBJ_CFLAGS"\' 453echo SHOBJ_LD=\'"$SHOBJ_LD"\' 454echo SHOBJ_LDFLAGS=\'"$SHOBJ_LDFLAGS"\' 455echo SHOBJ_XLDFLAGS=\'"$SHOBJ_XLDFLAGS"\' 456echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\' 457 458echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\' 459echo SHLIB_LIBS=\'"$SHLIB_LIBS"\' | 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 --- 11 unchanged lines hidden (view full) --- 510echo SHOBJ_CFLAGS=\'"$SHOBJ_CFLAGS"\' 511echo SHOBJ_LD=\'"$SHOBJ_LD"\' 512echo SHOBJ_LDFLAGS=\'"$SHOBJ_LDFLAGS"\' 513echo SHOBJ_XLDFLAGS=\'"$SHOBJ_XLDFLAGS"\' 514echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\' 515 516echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\' 517echo SHLIB_LIBS=\'"$SHLIB_LIBS"\' |
518 519echo SHLIB_DOT=\'"$SHLIB_DOT"\' 520 521echo SHLIB_LIBPREF=\'"$SHLIB_LIBPREF"\' |
|
460echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\' | 522echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\' |
523 |
|
461echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\' | 524echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\' |
525echo SHLIB_DLLVERSION=\'"$SHLIB_DLLVERSION"\' |
|
462 463echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\' 464echo SHLIB_STATUS=\'"$SHLIB_STATUS"\' 465 466exit 0 | 526 527echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\' 528echo SHLIB_STATUS=\'"$SHLIB_STATUS"\' 529 530exit 0 |