[PATCH] configure: add workaround for systems without zlib.pc

David Bremner david at tethera.net
Fri Jun 13 18:47:56 PDT 2014


Tomi Ollila <tomi.ollila at iki.fi> writes:

>> +static const char *template =
>> +	"prefix=/usr\n"
>> +	"exec_prefix=${prefix}\n"
>> +	"libdir=${exec_prefix}/lib\n"
>> +	"\n"
>> +	"Name: zlib\n"
>> +	"Description: zlib compression library\n"
>> +	"Version: %s\n"
>> +	"Libs: -lz\n";
>
> The above is bit different what zlib.pc files have in e.g. Fedora 20 and
> Ubuntu 14.04 machines: those have 'Requires: before Libs: (and Cflags:)'
> But probably that is unnecessary (and just some sugar coating...?).
>

it seems consistent with the 'foo' example at

   http://people.freedesktop.org/~dbn/pkg-config-guide.html#writing

>
> To be consistent what we do elsewhere:
>
>   PKG_CONFIG_PATH=${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}compat &&
>
> i.e. don't add ':' in case $PKG_CONFIG_PATH is not defined or is empty string.

What Tomi writes here sounds correct to me. I guess empty PKG_CONFIG_PATH is
probably the most common case.

d


More information about the notmuch mailing list