From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 4939B6DE1E76 for ; Sun, 5 Mar 2017 13:12:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.173 X-Spam-Level: X-Spam-Status: No, score=0.173 tagged_above=-999 required=5 tests=[AWL=0.182, HEADER_FROM_DIFFERENT_DOMAINS=0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kmjcDgAN7n2J for ; Sun, 5 Mar 2017 13:12:22 -0800 (PST) X-Greylist: delayed 491 seconds by postgrey-1.35 at arlo; Sun, 05 Mar 2017 13:12:22 PST Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 0A9F46DE1E6B for ; Sun, 5 Mar 2017 13:12:22 -0800 (PST) Received: by guru.guru-group.fi (Postfix, from userid 501) id 63EAC1001CC; Sun, 5 Mar 2017 23:03:29 +0200 (EET) From: Tomi Ollila To: notmuch@notmuchmail.org Cc: tomi.ollila@iki.fi Subject: [PATCH] configure: removed $zlib_(cflags|ldflags) from compat code build Date: Sun, 5 Mar 2017 23:03:27 +0200 Message-Id: <20170305210327.8651-1-tomi.ollila@iki.fi> X-Mailer: git-send-email 2.11.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Mar 2017 21:12:24 -0000 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