* [PATCH] configure: fix reference to possibly undefined $PKG_CONFIG_PATH
@ 2019-11-17 21:24 Tomi Ollila
2019-12-09 20:15 ` Daniel Kahn Gillmor
2019-12-09 20:26 ` David Bremner
0 siblings, 2 replies; 3+ messages in thread
From: Tomi Ollila @ 2019-11-17 21:24 UTC (permalink / raw)
To: notmuch; +Cc: tomi.ollila
In case zlib not found by pkg-config(1) the pkg-config information
is resolved by attempting to print ZLIB_VERSION from from zlib
installation if it exists anyway.
If above done successfully compat/zlib.pc is written for forthcoming
pkg-config execution.
Since `set -u` is in effect (since 124a67e96, 2016-05-06),
expanding unset $PKG_CONFIG_PATH (would have) failed whenever tried.
Now it is changed to set as "$PKG_CONFIG_PATH:compat" if PKG_CONFIG_PATH
is set and is non-empty string, plain "compat" otherwise.
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 2160be37..00a9d03d 100755
--- a/configure
+++ b/configure
@@ -606,7 +606,7 @@ fi
if ! pkg-config --exists zlib; then
${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 &&
+ PKG_CONFIG_PATH=${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}compat &&
export PKG_CONFIG_PATH
rm -f compat/gen_zlib_pc
fi
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] configure: fix reference to possibly undefined $PKG_CONFIG_PATH
2019-11-17 21:24 [PATCH] configure: fix reference to possibly undefined $PKG_CONFIG_PATH Tomi Ollila
@ 2019-12-09 20:15 ` Daniel Kahn Gillmor
2019-12-09 20:26 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Kahn Gillmor @ 2019-12-09 20:15 UTC (permalink / raw)
To: Tomi Ollila, notmuch
[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]
On Sun 2019-11-17 23:24:41 +0200, Tomi Ollila wrote:
> In case zlib not found by pkg-config(1) the pkg-config information
> is resolved by attempting to print ZLIB_VERSION from from zlib
> installation if it exists anyway.
>
> If above done successfully compat/zlib.pc is written for forthcoming
> pkg-config execution.
>
> Since `set -u` is in effect (since 124a67e96, 2016-05-06),
> expanding unset $PKG_CONFIG_PATH (would have) failed whenever tried.
>
> Now it is changed to set as "$PKG_CONFIG_PATH:compat" if PKG_CONFIG_PATH
> is set and is non-empty string, plain "compat" otherwise.
> ---
> configure | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 2160be37..00a9d03d 100755
> --- a/configure
> +++ b/configure
> @@ -606,7 +606,7 @@ fi
> if ! pkg-config --exists zlib; then
> ${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 &&
> + PKG_CONFIG_PATH=${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}compat &&
> export PKG_CONFIG_PATH
> rm -f compat/gen_zlib_pc
> fi
LGTM. Thanks, Tomi.
--dkg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] configure: fix reference to possibly undefined $PKG_CONFIG_PATH
2019-11-17 21:24 [PATCH] configure: fix reference to possibly undefined $PKG_CONFIG_PATH Tomi Ollila
2019-12-09 20:15 ` Daniel Kahn Gillmor
@ 2019-12-09 20:26 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2019-12-09 20:26 UTC (permalink / raw)
To: Tomi Ollila, notmuch; +Cc: tomi.ollila
Tomi Ollila <tomi.ollila@iki.fi> writes:
> In case zlib not found by pkg-config(1) the pkg-config information
> is resolved by attempting to print ZLIB_VERSION from from zlib
> installation if it exists anyway.
>
pushed to master.
d
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-09 20:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-17 21:24 [PATCH] configure: fix reference to possibly undefined $PKG_CONFIG_PATH Tomi Ollila
2019-12-09 20:15 ` Daniel Kahn Gillmor
2019-12-09 20:26 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).