[PATCH] configure: removed $zlib_(cflags|ldflags) from compat code build

classic Classic list List threaded Threaded
2 messages Options
Tomi Ollila-2 Tomi Ollila-2
Reply | Threaded
Open this post in threaded view
|

[PATCH] configure: removed $zlib_(cflags|ldflags) from compat code build

When pkg-config does not find configure, a compat version of the
zlib.pc is created. In creation of that configure attempted to
read values of $zlib_cflags and $zlib_ldflags. In the usual case
those were undefined, and with `set -a` now in the beginning of
configure, configure broke.

Even if $zlib_cflags and $zlib_ldflags had values which were used
to create zlib.pc, the values were overwritten (with static content)
a few lines later in next pkg-config --cflags and --libs run. These
values would not be different and probably useless -- the following
boild would probably fail.

But instead of using those, CPATH and LIBRARY_PATH environment
variables can be used successfully (both while configuring and
building).
---
 configure | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/configure b/configure
index fa77eb8..e16a9b7 100755
--- a/configure
+++ b/configure
@@ -493,8 +493,7 @@ else
 fi
 
 if ! pkg-config --exists zlib; then
-  ${CC} ${zlib_cflags} -o compat/gen_zlib_pc \
-  "$srcdir"/compat/gen_zlib_pc.c ${zlib_ldflags} > /dev/null 2>&1 &&
+  ${CC} -o compat/gen_zlib_pc "$srcdir"/compat/gen_zlib_pc.c >/dev/null 2>&1 &&
   compat/gen_zlib_pc > compat/zlib.pc &&
   PKG_CONFIG_PATH="$PKG_CONFIG_PATH":compat &&
   export PKG_CONFIG_PATH
--
2.9.3

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] configure: removed $zlib_(cflags|ldflags) from compat code build

Tomi Ollila <[hidden email]> writes:

> When pkg-config does not find configure, a compat version of the
> zlib.pc is created. In creation of that configure attempted to
> read values of $zlib_cflags and $zlib_ldflags. In the usual case
> those were undefined, and with `set -a` now in the beginning of
> configure, configure broke.

pushed to master
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch