diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-03-29 07:12:38 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-03-29 07:13:00 -0700 |
commit | 243340ad57e30de3c15cffe6e4af0381995f15d9 (patch) | |
tree | d8d22601296073d341535ae9b32336c069553b6e /bfd/Makefile.am | |
parent | ea6b7543b422836409fe7848abbfcb452ad26398 (diff) | |
download | gdb-243340ad57e30de3c15cffe6e4af0381995f15d9.zip gdb-243340ad57e30de3c15cffe6e4af0381995f15d9.tar.gz gdb-243340ad57e30de3c15cffe6e4af0381995f15d9.tar.bz2 |
Add --with-system-zlib in bfd
This patch adds --with-system-zlib and remove --with-zlib in bfd.
* Makefile.am (ZLIB): New.
(ZLIBINC): Likewise.
(AM_CFLAGS): Add $(ZLIBINC).
(libbfd_la_LIBADD): Add $(ZLIB).
* compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
(decompress_contents): Don't check HAVE_ZLIB_H.
(decompress_contents): Likewise.
(bfd_compress_section_contents): Likewise.
(bfd_get_full_section_contents): Likewise.
(bfd_init_section_decompress_status): Likewise.
(bfd_init_section_compress_status): Likewise.
* configure.ac (AM_ZLIB): Removed
(zlibdir): New. AC_SUBST.
(zlibinc): Likewise.
Add --with-system-zlib.
* Makefile.in: Regenerated.
* acinclude.m4: Likewise.
* config.in: Likewise.
* configure: Likewise.
* doc/Makefile.in: Likewise.
Diffstat (limited to 'bfd/Makefile.am')
-rw-r--r-- | bfd/Makefile.am | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 5d7f899..03b6442 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -43,9 +43,15 @@ noinst_LTLIBRARIES = libbfd.la libbfd_la_LDFLAGS += -rpath $(rpath_bfdlibdir) endif +# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is +# -I../zlib, unless we were configured with --with-system-zlib, in which +# case both are empty. +ZLIB = @zlibdir@ -lz +ZLIBINC = @zlibinc@ + WARN_CFLAGS = @WARN_CFLAGS@ NO_WERROR = @NO_WERROR@ -AM_CFLAGS = $(WARN_CFLAGS) +AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) AM_CPPFLAGS = -DBINDIR='"$(bindir)"' if PLUGINS bfdinclude_HEADERS += $(INCDIR)/plugin-api.h @@ -840,7 +846,7 @@ ofiles: stamp-ofiles ; @true libbfd_la_SOURCES = $(BFD32_LIBS_CFILES) EXTRA_libbfd_la_SOURCES = $(CFILES) libbfd_la_DEPENDENCIES = $(OFILES) ofiles -libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) +libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) $(ZLIB) libbfd_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@ # libtool will build .libs/libbfd.a. We create libbfd.a in the build |