[libvirt] [PATCH] build: Add libcurl dependency to libvirt_driver.la

Jiri Denemark jdenemar at redhat.com
Mon Feb 4 10:27:30 UTC 2013


On Mon, Feb 04, 2013 at 09:41:58 +0800, Hu Tao wrote:
> On Fri, Feb 01, 2013 at 01:45:19PM +0100, Jiri Denemark wrote:
> > libvirt.c calls curl_global_init() if WITH_CURL is defined and thus it
> > should be linked with libcurl. This fixes link failure in case neither
> > xenapi nor esx driver is enabled (they are the only users of libcurl).
> 
> In the case we link with libcurl just because user wants it. How about
> not exposing --with-curl but define WITH_CURL when needs to(xenapi or
> esx driver is enabled, or both)?

Yes, that would be the ideal solution. But this fix is correct even in
that case, no matter why WITH_CURL is defined if it is defined,
libvirt.c calls to libcurl and thus needs to link with it. Anyway, the
goal of the recent rewrite of our configure.ac by Daniel was to check
for all libraries we might need and then check what drivers we may
enable based on the libraries we have. I think removing libraries than
no driver wants might be in the long term goals but I'm not quite sure
about that.

Jirka




More information about the libvir-list mailing list