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]) fiI 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. (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).
However the real reason I went down this route was to check for the libvirt-python bindings ... See the bottom of the attached file.
Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
Description: S/MIME Cryptographic Signature