On Wed, May 23, 2007 at 07:13:05PM +0100, Richard W.M. Jones wrote:
> Daniel P. Berrange wrote:
> >On Wed, May 23, 2007 at 06:31:19PM +0100, Richard W.M. Jones wrote:
> >>Richard W.M. Jones wrote:
> >>>Attached is an autoconf snippet which allows you to check that the 
> >>>libvirt library is installed (not necessarily development headers 
> >>>though) and check the version number.
> >>>
> >>>If any autoconf experts (hello, Mark) would like to check it makes 
> >>>sense, that'd be great.
> >>I should add that I use it like this:
> >>
> >>  dnl Check for libvirt, sets LIBVIRT_VERSION.
> >>  AC_LIBVIRT
> >>
> >>  dnl Libvirt must be >= 0.2.1
> >>  AC_MSG_CHECKING([libvirt >= 0.2.1])
> >>  if test $LIBVIRT_VERSION -ge 2001; then
> >>     AC_MSG_RESULT([ok])
> >>  else
> >>     AC_MSG_ERROR([please upgrade your libvirt library])
> >>  fi
> >
> >I don't see that this buys us much over just doing
> >
> >  PKG_CHECK_MODULES(LIBVIRT, libvirt >= 0.2.1)
> >  AC_SUBST(LIBVIRT_CFLAGS)
> >  AC_SUBST(LIBVIRT_LIBS)
> >
> >which already works...
> 
> Hmmm.  pkg-config doesn't work with packages installed in non-standard 
> places. 

Sure it does, just tell it what other prefixes you install stuff 
into, eg

  export PKG_CONFIG_PATH=$HOME/usr/lib/pkg-config

>        (In fact for me the use of PKG_CHECK_MODULES in configure.in 
> prevents me from installing on Debian at all, but that's possibly 
> another story).

Broken debian pkg-config install ? Pretty much all libraries are switching
to use of pkg-config these days precisely because it allows all of the
million variations of per-library custom autoconf crack to be removed.
Anything which removes use of m4 is a good idea :-)

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to