
On 12/05/2014 11:07 AM, Daniel P. Berrange wrote:
On Thu, Dec 04, 2014 at 01:41:10PM -0700, Eric Blake wrote:
On 12/04/2014 01:30 PM, Pavel Hrdina wrote:
For example on FreeBSD the "yajl" library is located at "/usr/local/lib" and it's not in default LIBS and therefore the configure fails that "yajl" not installed.
We can use the "PKG_CHECK_MODULES" to get the correct library path in case the library provides pkg-config file definition, otherwise the old approach is used.
This feels a bit awkward. Shouldn't we instead be fixing m4/virt-yajl.m4 to use LIBVIRT_CHECK_PKG? That is, shouldn't yajl be using pkg-config everywhere, and not just on FreeBSD?
I'm not sure that older versions of yajl actually use pkg-config - if they did I'm sure I would have used PKG_CHECK_MODULES in the first place.
Regards, Daniel
I didn't thought about that and you are right. At least on rhel-6 there is yajl-1 and it doesn't use pkg-config. But this patch will work with that, except that it won't find the path to yajl or any other library that doesn't support pkg-config. It will set the _CFLAGS and _LIBS only in case the pkg-config is able to find that information. There will be error message about missing pkg-config only in the config.log for libraries which don't support the pkg-config. Pavel