diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-02-07 19:03:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-02-07 19:03:38 +0000 |
commit | 2e5983457a7e68ef9089acf42d80be836ba15c01 (patch) | |
tree | e227606f78530b2bcd310fd0506e632505efb540 /ld/configure.in | |
parent | c07dc45948fa30ca7b5035f5802322480d5c6ac5 (diff) | |
download | gdb-2e5983457a7e68ef9089acf42d80be836ba15c01.zip gdb-2e5983457a7e68ef9089acf42d80be836ba15c01.tar.gz gdb-2e5983457a7e68ef9089acf42d80be836ba15c01.tar.bz2 |
* configure.in: Look for --enable-shared. Change the value of
BFDLIB when linking against a shared library on SunOS.
* configure: Rebuild.
* configure.host: If using a shared BFD library, try to pass a
reasonable -rpath option when linking.
* Makefile.in (BFDLIB): Set to @BFDLIB@.
Diffstat (limited to 'ld/configure.in')
-rw-r--r-- | ld/configure.in | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ld/configure.in b/ld/configure.in index 4913982..4444fce 100644 --- a/ld/configure.in +++ b/ld/configure.in @@ -11,6 +11,13 @@ AC_ARG_ENABLE(targets, no) enable_targets= ;; *) enable_targets=$enableval ;; esac])dnl +AC_ARG_ENABLE(shared, +[ --enable-shared build shared BFD library], +[case "${enableval}" in + yes) shared=true ;; + no) shared=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for BFD shared option]) ;; +esac])dnl AC_CONFIG_HEADER(config.h:config.in) @@ -30,16 +37,35 @@ AC_ARG_PROGRAM AC_PROG_CC AC_SUBST(CFLAGS) +AC_SUBST(HLDFLAGS) AC_SUBST(HDEFINES) AC_SUBST(HOSTING_CRT0) AC_SUBST(HOSTING_LIBS) AC_SUBST(NATIVE_LIB_DIRS) +# For most hosts we can use a simple definition to pick up the BFD and +# opcodes libraries. However, if we are building shared libraries, we +# need to handle some hosts specially. +BFDLIB='-L../bfd -lbfd' +if test "${shared}" = "true"; then + case "${host}" in + *-*-sunos*) + # On SunOS, we must link against the name we are going to install, + # not -lbfd, since SunOS does not support SONAME. + BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`' + ;; + esac +fi +AC_SUBST(BFDLIB) + AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h) AC_CHECK_FUNCS(sbrk) +AC_HEADER_DIRENT BFD_BINARY_FOPEN +BFD_NEED_DECLARATION(free) + # target-specific stuff: # Canonicalize the secondary target names. |