[virt-tools-list] [PATCH glib] Fix check for libvirt optional functions

Daniel P. Berrange berrange at redhat.com
Thu Jul 28 12:38:38 UTC 2016


On Thu, Jul 28, 2016 at 02:36:54PM +0200, Christophe Fergeau wrote:
> On Thu, Jul 28, 2016 at 01:30:12PM +0100, Daniel P. Berrange wrote:
> > The checks for virDomainOpenGraphicsFD and
> > virNetworkGetDHCPLeases in configure are simply trying
> > to compile and link a test program. This was assuming
> > that libvirt was installed in /usr/lib & /usr/include,
> > which is not always the case. Using a pkg-config version
> > check avoids needing to compile and thus avoids the
> > bad assumptions about install locations.
> > 
> > Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> > ---
> > 
> > Pushed as a broken build fix
> > 
> >  configure.ac | 18 ++++++++++++------
> >  1 file changed, 12 insertions(+), 6 deletions(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index f71e5cf..b2848f2 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -92,13 +92,19 @@ LIBVIRT_GLIB_COMPILE_WARNINGS
> >  
> >  PKG_CHECK_MODULES(LIBVIRT, libvirt >= $LIBVIRT_REQUIRED)
> >  # virDomainOpenGraphicsFD was introduced in libvirt 1.2.8
> > -AC_CHECK_LIB([virt],
> > -             [virDomainOpenGraphicsFD],
> > -             [AC_DEFINE([HAVE_VIR_DOMAIN_OPEN_GRAPHICS_FD], 1, [Have virDomainOpenGraphicsFD?])])
> > +AC_MSG_CHECKING([for virDomainOpenGraphicsFD])
> > +PKG_CHECK_EXISTS(libvirt >= 21.2.8,
> 
> s/21/1

Sigh, mistakenly commited my debug hack


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list