aboutsummaryrefslogtreecommitdiff
path: root/binutils/configure.ac
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-03-31 03:53:41 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-03-31 03:53:55 -0700
commit0ee42ecde7aadb3e68ae5b944f7b1b6a859ebcfd (patch)
treed340d7c5a7897eef99004fa960d0086f1801ce8a /binutils/configure.ac
parentb38f7f340bf021f9ad017cc88beddb9b0eaae06b (diff)
downloadgdb-0ee42ecde7aadb3e68ae5b944f7b1b6a859ebcfd.zip
gdb-0ee42ecde7aadb3e68ae5b944f7b1b6a859ebcfd.tar.gz
gdb-0ee42ecde7aadb3e68ae5b944f7b1b6a859ebcfd.tar.bz2
Add --with-system-zlib in binutils
This patch adds --with-system-zlib and remove --with-zlib in binutils. * Makefile.am (ZLIB): New. (ZLIBINC): Likewise. (AM_CFLAGS): Add $(ZLIBINC). (readelf_LDADD): Add $(ZLIB). * configure.ac (AM_ZLIB): Removed. (zlibdir): New. AC_SUBST. (zlibinc): Likewise. Add --with-system-zlib. * readelf.c: Don't check HAVE_ZLIB_H to include <zlib.h>. (uncompress_section_contents): Don't check HAVE_ZLIB_H. * Makefile.in: Regenerated. * config.in: Likewise. * configure: Likewise.
Diffstat (limited to 'binutils/configure.ac')
-rw-r--r--binutils/configure.ac14
1 files changed, 10 insertions, 4 deletions
diff --git a/binutils/configure.ac b/binutils/configure.ac
index 31864ec..0677f9a 100644
--- a/binutils/configure.ac
+++ b/binutils/configure.ac
@@ -201,10 +201,16 @@ fi
AC_CHECK_DECLS([environ, fprintf, getc_unlocked, getenv,
sbrk, snprintf, stpcpy, strnlen, strstr, vsnprintf])
-# Link in zlib if we can. This allows us to read compressed debug
-# sections. This is used only by readelf.c (objdump uses bfd for
-# reading compressed sections).
-AM_ZLIB
+# Use the system's zlib library.
+zlibdir=-L../zlib
+zlibinc="-I\$(srcdir)/../zlib"
+AC_ARG_WITH(system-zlib,
+[AS_HELP_STRING([--with-system-zlib], [use installed libz])],
+zlibdir=
+zlibinc=
+)
+AC_SUBST(zlibdir)
+AC_SUBST(zlibinc)
BFD_BINARY_FOPEN