diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-02-07 19:19:22 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-02-07 19:19:22 +0000 |
commit | 36fb98bec6daaa63310244565204589989a6de2a (patch) | |
tree | e4ea97b2fc133c63ce67189256492f5161f80106 /binutils/configure.in | |
parent | 1c9dbb83f12d729f872d5755055889cedfa78407 (diff) | |
download | gdb-36fb98bec6daaa63310244565204589989a6de2a.zip gdb-36fb98bec6daaa63310244565204589989a6de2a.tar.gz gdb-36fb98bec6daaa63310244565204589989a6de2a.tar.bz2 |
* configure.in: Check for --enable-shared. Substitute new
variables BFDLIB and OPCODES.
* configure: Rebuild.
* Makefile.in (BFDLIB): Set to @BFDLIB@.
(OPCODES): Set to @OPCODES@.
Diffstat (limited to 'binutils/configure.in')
-rw-r--r-- | binutils/configure.in | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/binutils/configure.in b/binutils/configure.in index 7c23cd3..710eedd 100644 --- a/binutils/configure.in +++ b/binutils/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) @@ -28,6 +35,7 @@ AC_ARG_PROGRAM HDEFINES= LDFLAGS= +HLDFLAGS= . ${srcdir}/../bfd/configure.host @@ -35,11 +43,30 @@ AC_PROG_CC AC_SUBST(CFLAGS) AC_SUBST(HDEFINES) AC_SUBST(LDFLAGS) +AC_SUBST(HLDFLAGS) AR=${AR-ar} AC_SUBST(AR) AC_PROG_RANLIB AC_PROG_INSTALL +# 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' +OPCODES='-L../opcodes -lopcodes' +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)'"'"'`' + OPCODES='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`' + ;; + esac +fi +AC_SUBST(BFDLIB) +AC_SUBST(OPCODES) + BFD_CC_FOR_BUILD AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h) @@ -80,15 +107,7 @@ if test $bu_cv_header_utime_h = yes; then AC_DEFINE(HAVE_GOOD_UTIME_H) fi -AC_MSG_CHECKING([whether fprintf must be declared]) -AC_CACHE_VAL(bu_cv_decl_needed_fprintf, -[AC_TRY_COMPILE([#include <stdio.h>], -[int (*pfn) = (int (*)) fprintf], -bu_cv_decl_needed_fprintf=no, bu_cv_decl_needed_fprintf=yes)]) -AC_MSG_RESULT($bu_cv_decl_needed_fprintf) -if test $bu_cv_decl_needed_fprintf = yes; then - AC_DEFINE(NEED_DECLARATION_FPRINTF) -fi +BFD_NEED_DECLARATION(fprintf) BFD_BINARY_FOPEN @@ -152,11 +171,15 @@ changequote([,])dnl DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" ;; changequote(,)dnl - i[3-6]86-*pe* | i[3-6]86-*-win32) + i[3-6]86-*pe* | i[3-6]86-*-cygwin32) changequote([,])dnl BUILD_DLLTOOL='$(DLLTOOL_PROG)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" ;; + powerpc*-*-*pe* | powerpc*-*-cygwin32) + BUILD_DLLTOOL='$(DLLTOOL_PROG)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC" + ;; esac fi done |