This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] libbacktrace: Move define of HAVE_ZLIB into check for -lz
- From: Iain Buclaw <ibuclaw at gdcproject dot org>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 31 Jul 2018 17:10:49 +0200
- Subject: Re: [PATCH] libbacktrace: Move define of HAVE_ZLIB into check for -lz
- References: <CABOHX+eb04n65-Vs=7PFwOFvAEbNVe92AeZ1WoEa=dLrJEFQNg@mail.gmail.com> <CAKOQZ8yJ+cmsBcOjFQYen9F-Sdw5useeZZZkRoHHuckfirstname.lastname@example.org>
On 31 July 2018 at 16:33, Ian Lance Taylor <email@example.com> wrote:
> On Sun, Jul 29, 2018 at 7:50 AM, Iain Buclaw <firstname.lastname@example.org> wrote:
>> This is really to suppress the default action-if-found for
>> AC_CHECK_LIBS. Zlib is not a dependency of libbacktrace, and so it
>> shouldn't be added to LIBS. When looking at the check, saw that could
>> remove the test for ac_cv_lib_z_compress also.
> Thanks, but this doesn't seem like quite the right approach, as seen
> by the fact that HAVE_ZLIB_H was dropped from config.h.in. I think
> you need to keep the AC_DEFINE out of the AC_CHECK_LIB. I would guess
> that it would work to just change the default case of AC_CHECK_LIB to
> [;] or something similarly innocuous.
May I ask you to look at the patch again? There's two similarly named
variables here, HAVE_LIBZ and HAVE_ZLIB.
Only the unused HAVE_LIBZ has been dropped from config.h.in. The one
that matters has been left alone, or at least I'm pretty sure of.