This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/commit] Add support for --disable-zlib


Hello,

As mentioned on the binutils list, we'd like to add support for
--disable-zlib, in order to be able to build a GDB that does not
have a dependency on that library:

    http://www.sourceware.org/ml/binutils/2009-10/msg00600.html

This is the sim and gdb part, which needs to be checked in at the same
time as the binutils part.

sim/

        * common/aclocal.m4: Add include of ../../config/zlib.m4.
        * common/common.m4: Use AM_ZLIB to check for zlib support.
        * ppc/configure.ac: Likewise.
        * arm/configure, avr/configure, common/configure, cr16/configure,
        cris/configure, d10v/configure, erc32/configure, frv/configure,
        h8300/configure, iq2000/configure, lm32/configure, m32c/configure,
        m32r/configure, m68hc11/configure, mcore/configure,
        microblaze/configure, mips/configure, mn10300/configure,
        moxie/configure, ppc/configure, sh/configure, sh64/configure,
        v850/configure: Regenerate.

gdb/

        * acinclude.m4: Include ../config/zlib.m4.
        * configure.ac: Use AM_ZLIB to check for zlib support.
        * configure: Regenerate.

I tested these changes by building GDB with and without --disable-zlib,
and verified that the dependency on libz disappeared in the second case.
I'd like to commit in a few days unless there are some objections.

Thanks,
-- 
Joel
commit 04d98981bf0f628379cd63f084e695dc76a44889
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Fri Oct 30 10:17:36 2009 -0700

        * common/aclocal.m4: Add include of ../../config/zlib.m4.
        * common/common.m4: Use AM_ZLIB to check for zlib support.
        * ppc/configure.ac: Likewise.
        * arm/configure, avr/configure, common/configure, cr16/configure,
        cris/configure, d10v/configure, erc32/configure, frv/configure,
        h8300/configure, iq2000/configure, lm32/configure, m32c/configure,
        m32r/configure, m68hc11/configure, mcore/configure,
        microblaze/configure, mips/configure, mn10300/configure,
        moxie/configure, ppc/configure, sh/configure, sh64/configure,
        v850/configure: Regenerate.

diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4
index 7beaebd..9a6a4c8 100644
--- a/sim/common/aclocal.m4
+++ b/sim/common/aclocal.m4
@@ -20,6 +20,7 @@
 
 # Include global overrides and fixes for Autoconf.
 m4_include(../../config/override.m4)
+sinclude([../../config/zlib.m4])
 
 AC_DEFUN([SIM_AC_COMMON],
 [
diff --git a/sim/common/common.m4 b/sim/common/common.m4
index 215208d..97a2c61 100644
--- a/sim/common/common.m4
+++ b/sim/common/common.m4
@@ -56,7 +56,7 @@ AC_CHECK_LIB(nsl, gethostbyname)
 
 # BFD conditionally uses zlib, so we must link it in if libbfd does, by
 # using the same condition.
-AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+AM_ZLIB
 
 . ${srcdir}/../../bfd/configure.host
 
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index e8ccfe9..ae26d54 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -668,7 +668,7 @@ AC_ARG_PROGRAM
 
 # BFD conditionally uses zlib, so we must link it in if libbfd does, by
 # using the same condition.
-AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+AM_ZLIB
 
 . ${srcdir}/../../bfd/configure.host
 
commit cb233de5d67031f414582794cb1b2ef3386b4b4d
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Fri Oct 30 10:22:55 2009 -0700

        * acinclude.m4: Include ../config/zlib.m4.
        * configure.ac: Use AM_ZLIB to check for zlib support.
        * configure: Regenerate.

diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index c32e1ea..af4639b 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -32,6 +32,8 @@ sinclude([../config/lcmessage.m4])
 dnl For AM_LANGINFO_CODESET.
 sinclude([../config/codeset.m4])
 
+sinclude([../config/zlib.m4])
+
 #
 # Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
 # makes configure think it's cross compiling. If --target wasn't used, then
diff --git a/gdb/configure.ac b/gdb/configure.ac
index b96caef..d3d4f1f 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -422,7 +422,7 @@ AC_SEARCH_LIBS(gethostbyname, nsl)
 AC_SEARCH_LIBS(socketpair, socket)
 
 # Link in zlib if we can.  This allows us to read compressed debug sections.
-AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+AM_ZLIB
 
 # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
 AC_SEARCH_LIBS(dlgetmodinfo, [dl xpdl])

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]