From 36fb98bec6daaa63310244565204589989a6de2a Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 7 Feb 1996 19:19:22 +0000 Subject: [PATCH] * configure.in: Check for --enable-shared. Substitute new variables BFDLIB and OPCODES. * configure: Rebuild. * Makefile.in (BFDLIB): Set to @BFDLIB@. (OPCODES): Set to @OPCODES@. --- binutils/ChangeLog | 38 ++++++++++++++++++++ binutils/Makefile.in | 83 +++++++++++++++++++++++-------------------- binutils/configure | 56 +++++++++++++++++++++++------ binutils/configure.in | 43 ++++++++++++++++------ 4 files changed, 161 insertions(+), 59 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index aa60c2d5213..fecff7d7af8 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,41 @@ +Wed Feb 7 14:17:45 1996 Ian Lance Taylor + + * configure.in: Check for --enable-shared. Substitute new + variables BFDLIB and OPCODES. + * configure: Rebuild. + * Makefile.in (BFDLIB): Set to @BFDLIB@. + (OPCODES): Set to @OPCODES@. + +Mon Feb 5 16:18:42 1996 Ian Lance Taylor + + Support for building bfd and opcodes as shared libraries, based on + patches from Alan Modra : + * configure.in (HLDFLAGS): New substitution. + * configure: Rebuild. + * Makefile.in (HLDFLAGS): New variable. Make all links use + $(HLDFLAGS) before $(CFLAGS) and $(LDFLAGS). + (BFDLIB_DEP): New variable. Replace all occurrences of $(BFD) as + a dependency with $(BFDLIB_DEP). Remove $(BFD) as a dependency if + there is also a dependency on $(ADDL_DEPS). + (BFDLIB): Rename from BFD; change all uses; set to -L../bfd -lbfd. + (OPCODES_DEP): New variable. Replace all occurrends of $(OPCODES) + as a dependency with $(OPCODES_DEP). + (OPCODES): Set to -L../opcodes -lopcodes. + (ADDL_DEPS): New variable. Replace all occurrences of + $(ADDL_LIBS) as a dependency with $(ADDL_DEPS). + (check): Set LD_LIBRARY_PATH in the environment. + (config.status): Depend upon BFD configure.host and config.bfd. + +Fri Feb 2 17:02:59 1996 Doug Evans + + * objdump.c: #include stdarg.h or varargs.h. + (objdump_print_value): Change FILE* arg to struct disassemble_info*. + All callers updated. Use fprintf_func. + (objdump_print_address): Consistently use fprintf_func. + (objdump_sprintf): New function. + (disassemble_data): Print insn into a buffer, print raw insn ourselves, + then print insn mnemonic. + Fri Feb 2 16:48:55 1996 Ian Lance Taylor * configure: Regenerate. diff --git a/binutils/Makefile.in b/binutils/Makefile.in index 799a81a6fb1..454f1f6295a 100644 --- a/binutils/Makefile.in +++ b/binutils/Makefile.in @@ -57,6 +57,7 @@ AR_FLAGS = rc CC = @CC@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ +HLDFLAGS = @HLDFLAGS@ MAKEINFO = makeinfo TEXI2DVI = texi2dvi RANLIB = ranlib @@ -144,17 +145,21 @@ GENERATED_CFILES = \ .c.o: $(CC) -c $(ALL_CFLAGS) $< -DEBUG_OBJS = rddbg.o debug.o stabs.o ieee.o prdbg.o +DEBUG_OBJS = rddbg.o debug.o stabs.o ieee.o LIBIBERTY = ../libiberty/libiberty.a # Code shared by all the binutils. BULIBS = bucomm.o version.o filemode.o -ADDL_LIBS = $(BULIBS) $(BFD) $(LIBIBERTY) +BFDLIB_DEP = ../bfd/libbfd.a +BFDLIB = @BFDLIB@ -BFD = ../bfd/libbfd.a -OPCODES = ../opcodes/libopcodes.a +OPCODES_DEP = ../opcodes/libopcodes.a +OPCODES = @OPCODES@ + +ADDL_DEPS = $(BULIBS) $(BFDLIB_DEP) $(LIBIBERTY) +ADDL_LIBS = $(BULIBS) $(BFDLIB) $(LIBIBERTY) EXPECT = `if [ -f $$r/../expect/expect ] ; then \ echo $$r/../expect/expect ; \ @@ -187,7 +192,7 @@ FLAGS_TO_PASS = \ # ## The rules -all: $(ADDL_LIBS) $(PROGS) +all: $(ADDL_DEPS) $(PROGS) # These targets are for the dejagnu testsuites. The file site.exp # contains global variables that all the testsuites will use. @@ -224,6 +229,8 @@ check: site.exp r=`pwd`; export r ; \ srcroot=`cd ${srcdir}; pwd` ; export srcroot ; \ EXPECT=${EXPECT} ; export EXPECT ; \ + LD_LIBRARY_PATH=$$r/../bfd:$$r/../opcodes:$$LD_LIBRARY_PATH; \ + export LD_LIBRARY_PATH; \ if [ -f $$r/../expect/expect ] ; then \ TCL_LIBRARY=$${srcroot}/../tcl/library ; \ export TCL_LIBRARY ; else true; fi ; \ @@ -237,23 +244,23 @@ info: binutils.info dvi: binutils.dvi -$(SIZE_PROG): $(ADDL_LIBS) size.o $(BFD) - $(CC) $(CFLAGS) $(LDFLAGS) -o $(SIZE_PROG) size.o $(ADDL_LIBS) $(EXTRALIBS) +$(SIZE_PROG): $(ADDL_DEPS) size.o + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(SIZE_PROG) size.o $(ADDL_LIBS) $(EXTRALIBS) -$(OBJCOPY_PROG): $(ADDL_LIBS) objcopy.o not-strip.o $(DEBUG_OBJS) $(BFD) - $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o not-strip.o $(DEBUG_OBJS) $(ADDL_LIBS) $(EXTRALIBS) +$(OBJCOPY_PROG): $(ADDL_DEPS) objcopy.o not-strip.o $(DEBUG_OBJS) + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o not-strip.o $(DEBUG_OBJS) $(ADDL_LIBS) $(EXTRALIBS) -$(STRINGS_PROG): $(ADDL_LIBS) strings.o $(BFD) - $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRINGS_PROG) strings.o $(ADDL_LIBS) $(EXTRALIBS) +$(STRINGS_PROG): $(ADDL_DEPS) strings.o + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(STRINGS_PROG) strings.o $(ADDL_LIBS) $(EXTRALIBS) -$(STRIP_PROG): $(ADDL_LIBS) objcopy.o is-strip.o $(DEBUG_OBJS) $(BFD) - $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRIP_PROG) objcopy.o is-strip.o $(DEBUG_OBJS) $(ADDL_LIBS) $(EXTRALIBS) +$(STRIP_PROG): $(ADDL_DEPS) objcopy.o is-strip.o $(DEBUG_OBJS) + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(STRIP_PROG) objcopy.o is-strip.o $(DEBUG_OBJS) $(ADDL_LIBS) $(EXTRALIBS) -$(NM_PROG): $(ADDL_LIBS) nm.o $(BFD) - $(CC) $(CFLAGS) $(LDFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(EXTRALIBS) +$(NM_PROG): $(ADDL_DEPS) nm.o + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(EXTRALIBS) -$(OBJDUMP_PROG): $(ADDL_LIBS) objdump.o $(DEBUG_OBJS) $(BFD) $(OPCODES) - $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJDUMP_PROG) objdump.o $(DEBUG_OBJS) $(OPCODES) $(ADDL_LIBS) $(EXTRALIBS) +$(OBJDUMP_PROG): $(ADDL_DEPS) objdump.o prdbg.o $(DEBUG_OBJS) $(OPCODES_DEP) + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(OBJDUMP_PROG) objdump.o prdbg.o $(DEBUG_OBJS) $(OPCODES) $(ADDL_LIBS) $(EXTRALIBS) underscore.c: stamp-under ; @true @@ -270,7 +277,7 @@ cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h $(CC) -c -DMAIN -DVERSION='"$(VERSION)"' $(ALL_CFLAGS) $(BASEDIR)/libiberty/cplus-dem.c $(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o $(DEMANGLER_PROG).1 - $(CC) $(CFLAGS) $(LDFLAGS) -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(EXTRALIBS) underscore.o + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(EXTRALIBS) underscore.o arparse.c: arparse.y $(BISON) $(BISONFLAGS) $(srcdir)/arparse.y @@ -285,11 +292,11 @@ arlex.c: arlex.l $(LEX) $(LEX_OPTIONS) $(srcdir)/arlex.l mv lex.yy.c arlex.c -$(AR_PROG): $(ADDL_LIBS) ar.o arparse.o arlex.o not-ranlib.o $(BFD) arsup.o - $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o arparse.o arlex.o arsup.o not-ranlib.o $(ADDL_LIBS) $(EXTRALIBS) +$(AR_PROG): $(ADDL_DEPS) ar.o arparse.o arlex.o not-ranlib.o arsup.o + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o arparse.o arlex.o arsup.o not-ranlib.o $(ADDL_LIBS) $(EXTRALIBS) -$(RANLIB_PROG): $(ADDL_LIBS) ar.o is-ranlib.o arparse.o arlex.o arsup.o $(BFD) - $(CC) $(CFLAGS) $(LDFLAGS) -o $(RANLIB_PROG) ar.o arparse.o arlex.o arsup.o is-ranlib.o $(ADDL_LIBS) $(EXTRALIBS) +$(RANLIB_PROG): $(ADDL_DEPS) ar.o is-ranlib.o arparse.o arlex.o arsup.o + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(RANLIB_PROG) ar.o arparse.o arlex.o arsup.o is-ranlib.o $(ADDL_LIBS) $(EXTRALIBS) # This rule creates a single binary that switches between ar and ranlib # by looking at argv[0]. Use this kludge to save some disk space. @@ -298,15 +305,15 @@ $(RANLIB_PROG): $(ADDL_LIBS) ar.o is-ranlib.o arparse.o arlex.o arsup.o $(BFD) # Alternatively, you can install ranlib.sh as ranlib. -ar_with_ranlib: $(ADDL_LIBS) ar.o maybe-ranlib.o $(BFD) - $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(EXTRALIBS) +ar_with_ranlib: $(ADDL_DEPS) ar.o maybe-ranlib.o + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(EXTRALIBS) -rm -f $(RANLIB_PROG) -ln $(AR_PROG) $(RANLIB_PROG) # objcopy and strip in one binary that uses argv[0] to decide its action. -objcopy_with_strip: $(ADDL_LIBS) objcopy.o maybe-strip.o $(BFD) - $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(EXTRALIBS) +objcopy_with_strip: $(ADDL_DEPS) objcopy.o maybe-strip.o + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(EXTRALIBS) -rm -f $(STRIP_PROG) -ln $(OBJCOPY_PROG) $(STRIP_PROG) @@ -351,11 +358,11 @@ sysinfo.o: sysinfo.c $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \ fi -srconv: srconv.o coffgrok.o $(ADDL_LIBS) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srconv.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS) +srconv: srconv.o coffgrok.o $(ADDL_DEPS) + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ srconv.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS) -dlltool:dlltool.o defparse.o deflex.o cplus-dem.o - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ dlltool.o defparse.o deflex.o $(ADDL_LIBS) $(EXTRALIBS) +dlltool: dlltool.o defparse.o deflex.o cplus-dem.o $(ADDL_DEPS) + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ dlltool.o defparse.o deflex.o $(ADDL_LIBS) $(EXTRALIBS) defparse.c:defparse.y $(BISON) $(BISONFLAGS) $(srcdir)/defparse.y @@ -371,11 +378,11 @@ deflex.c:deflex.l dlltool.o:dlltool.c $(CC) -c @DLLTOOL_DEFS@ $(ALL_CFLAGS) $(srcdir)/dlltool.c -coffdump: coffdump.o coffgrok.o $(ADDL_LIBS) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ coffdump.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS) +coffdump: coffdump.o coffgrok.o $(ADDL_DEPS) + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ coffdump.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS) -sysdump: sysdump.o $(ADDL_LIBS) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ sysdump.o $(ADDL_LIBS) $(EXTRALIBS) +sysdump: sysdump.o $(ADDL_DEPS) + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ sysdump.o $(ADDL_LIBS) $(EXTRALIBS) # Depend upon sysinfo.c to avoid building both nlmheader.c and sysinfo.c # simultaneously. @@ -390,8 +397,8 @@ nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h ldname=`echo ld | sed '$(program_transform_name)'`; \ $(CC) -c -DLD_NAME="\"$${ldname}\"" @NLMCONV_DEFS@ $(ALL_CFLAGS) $(srcdir)/nlmconv.c -$(NLMCONV_PROG): nlmconv.o nlmheader.o $(ADDL_LIBS) $(BFD) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nlmconv.o nlmheader.o $(ADDL_LIBS) $(EXTRALIBS) +$(NLMCONV_PROG): nlmconv.o nlmheader.o $(ADDL_DEPS) + $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ nlmconv.o nlmheader.o $(ADDL_LIBS) $(EXTRALIBS) # Targets to rebuild dependencies in this Makefile. # Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES). @@ -513,7 +520,7 @@ distclean: -rm -f Makefile config.status *.o *~ \#* core y.* -rm -f binutils.?? binutils.??s binutils.aux binutils.log binutils.toc -rm -f $(PROGS) underscore.c config.h stamp-h config.cache config.log - -rm -f dep.sed stamp-under + -rm -f dep.sed stamp-under $(DEMANGLER_PROG).1 maintainer-clean realclean: clean distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." @@ -630,7 +637,7 @@ config.h: stamp-h ; @true stamp-h: config.in config.status CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status -config.status: configure +config.status: configure $(srcdir)/../bfd/configure.host $(srcdir)/../bfd/config.bfd $(SHELL) ./config.status --recheck # What appears below is generated by a hacked mkdep using gcc -MM. diff --git a/binutils/configure b/binutils/configure index ef477c9c962..e15e33693c0 100755 --- a/binutils/configure +++ b/binutils/configure @@ -13,6 +13,8 @@ ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --enable-targets alternative target configurations" +ac_help="$ac_help + --enable-shared build shared BFD library" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -528,6 +530,15 @@ if test "${enable_targets+set}" = set; then *) enable_targets=$enableval ;; esac fi +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + case "${enableval}" in + yes) shared=true ;; + no) shared=false ;; + *) { echo "configure: error: bad value ${enableval} for BFD shared option" 1>&2; exit 1; } ;; +esac +fi @@ -666,6 +677,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," HDEFINES= LDFLAGS= +HLDFLAGS= . ${srcdir}/../bfd/configure.host @@ -747,6 +759,7 @@ fi + AR=${AR-ar} # Extract the first word of "ranlib", so it can be a program name with args. @@ -837,6 +850,24 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +# 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 + + + # If we cannot run a trivial program, we must be cross compiling. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then @@ -846,7 +877,7 @@ else ac_cv_c_cross=yes else cat > conftest.$ac_ext < conftest.$ac_ext < Syntax Error @@ -902,7 +933,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error @@ -935,7 +966,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -968,7 +999,7 @@ if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1011,7 +1042,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < int main() { return 0; } @@ -1093,7 +1124,7 @@ if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return 0; } @@ -1127,7 +1158,7 @@ if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_TIME_H @@ -1163,7 +1194,7 @@ if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1201,7 +1232,7 @@ fi case "${host}" in -i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-win32) +i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32) cat >> confdefs.h <<\EOF #define USE_BINARY_FOPEN 1 EOF @@ -1426,10 +1457,13 @@ s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g s%@CC@%$CC%g s%@HDEFINES@%$HDEFINES%g +s%@HLDFLAGS@%$HLDFLAGS%g s%@AR@%$AR%g s%@RANLIB@%$RANLIB%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@BFDLIB@%$BFDLIB%g +s%@OPCODES@%$OPCODES%g s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g s%@CPP@%$CPP%g s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g diff --git a/binutils/configure.in b/binutils/configure.in index 7c23cd339de..710eedda14a 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 ], -[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 -- 2.30.2