This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] Add support for --without-zlib (was --disable-zlib)
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: binutils at sourceware dot org, gdb-patches at sourceware dot org
- Date: Fri, 30 Oct 2009 22:21:14 +0100
- Subject: Re: [RFA] Add support for --without-zlib (was --disable-zlib)
- References: <20091030182157.GS24532@adacore.com>
On Fri, 30 Oct 2009 19:21:57 +0100, Joel Brobecker wrote:
> We'd like to be able to distribute binutils and GDB without an extra
> dependency on zlib, so we're introducing a new configure switch
> --disable-zlib. The current behavior remains the default.
It should be more systematic to use AC_ARG_WITH than AC_ARG_ENABLE as it is
about a dependency on external software as described in the autoconf manual.
And I would prefer to be also able to force the requirement - it makes the
vendor packaging sanity checking of prerequisited packages easier.
Tested only separately, outside of the sourceware tree (there should be no
change I hope as externally is visible only the AC_CHECK_HEADERS result).
* zlib.m4: New file.
@@ -0,0 +1,17 @@
+dnl A function to check for zlib availability. zlib is used by default
+dnl unless the user configured using --without-nls.
+ # See if the user asked for zlib support to be disabled.
+ [ --with-zlib include zlib support (auto/yes/no)],
+ , [with_zlib=auto])
+ if test "$with_zlib" != "no"; then
+ AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+ if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
+ AC_MSG_ERROR([zlib (libz) library was explicitly requested but not found])