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

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

Date: Fri, 13 Jun 2014 22:47:56 -0300

To: Tomi Ollila, Felipe Contreras, notmuch@notmuchmail.org

Cc:

From: David Bremner


Tomi Ollila <tomi.ollila@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

Thread: