Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [RFA] Add support for --without-zlib (was --disable-zlib)
       [not found] <20091030182157.GS24532@adacore.com>
@ 2009-10-30 21:22 ` Jan Kratochvil
  2009-10-30 21:30   ` Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kratochvil @ 2009-10-30 21:22 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: binutils, gdb-patches

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).


Thanks,
Jan


config/
	* zlib.m4: New file.

--- /dev/null
+++ b/config/zlib.m4
@@ -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.
+
+AC_DEFUN([AM_ZLIB],
+[
+  # See if the user asked for zlib support to be disabled.
+  AC_ARG_WITH(zlib,
+    [  --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])
+    fi
+  fi
+])


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] Add support for --without-zlib (was --disable-zlib)
  2009-10-30 21:22 ` [RFA] Add support for --without-zlib (was --disable-zlib) Jan Kratochvil
@ 2009-10-30 21:30   ` Joel Brobecker
  2009-10-30 23:29     ` [RFA] Add support for --without-zlib Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2009-10-30 21:30 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: binutils, gdb-patches

> 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.

Makes sense, indeed.  I wanted to avoid --with-zlib because I wanted
to avoid the confusion with a possible --with-zlib-prefix.

> And I would prefer to be also able to force the requirement - it makes the
> vendor packaging sanity checking of prerequisited packages easier.

Agreed.

I will post a new set of patches later.

-- 
Joel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] Add support for --without-zlib
  2009-10-30 21:30   ` Joel Brobecker
@ 2009-10-30 23:29     ` Tom Tromey
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2009-10-30 23:29 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Jan Kratochvil, binutils, gdb-patches

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

>> 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.

Joel> Makes sense, indeed.  I wanted to avoid --with-zlib because I wanted
Joel> to avoid the confusion with a possible --with-zlib-prefix.

FWIW, GCC has --with-system-zlib.
It would be nice not to wind up with multiple ways to configure this
same thing.

Tom


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-30 23:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20091030182157.GS24532@adacore.com>
2009-10-30 21:22 ` [RFA] Add support for --without-zlib (was --disable-zlib) Jan Kratochvil
2009-10-30 21:30   ` Joel Brobecker
2009-10-30 23:29     ` [RFA] Add support for --without-zlib Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox