From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [RFA] Add support for --without-zlib (was --disable-zlib)
Date: Fri, 30 Oct 2009 21:22:00 -0000 [thread overview]
Message-ID: <20091030212114.GA8158@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <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).
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
+])
next parent reply other threads:[~2009-10-30 21:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20091030182157.GS24532@adacore.com>
2009-10-30 21:22 ` Jan Kratochvil [this message]
2009-10-30 21:30 ` Joel Brobecker
2009-10-30 23:29 ` [RFA] Add support for --without-zlib Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091030212114.GA8158@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=binutils@sourceware.org \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox