
On 09/12/2012 01:14 PM, Laine Stump wrote:
On 09/10/2012 06:14 PM, Eric Blake wrote:
Recent spec file changes ensure that in distro situations, netcf and libvirt will link against the same libnl in order to avoid dumping core. But for every-day development, if you are F17 and have the libnl3-devel headers available, libvirt was blindly linking against libnl3 even though F17 netcf still links against libnl1, making testing a self-built binary on F17 impossible.
By making configure a little bit smarter, we can avoid this situation - we merely skip the probe of libnl-3 if we can prove that netcf is still using libnl-1. I intentionally wrote the test so that we still favor libnl-3 if netcf is not installed or if we couldn't use ldd to determine things.
Defaults being what they are, someone will invariably complain that our smarts were wrong. Never fear - in that case, just run ./configure LIBNL_CFLAGS=..., where the fact that you set LIBNL_CFLAGS (even to the empty string) will go back to probing for libnl-3, regardless of netcf's choice.
This method of forcing libnl-3 is a bit obscure, but it will be used infrequently enough (possibly never? :-P) that I'm okay doing it that way, as long as you add a comment to configure.ac briefly explaining it (as you've done in the commit message). ACK with that added.
Done and pushed. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org