[Libvir] Please check my autoconf libvirt.m4

Richard W.M. Jones rjones at redhat.com
Wed May 23 18:13:05 UTC 2007


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.  (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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt.m4
Type: application/x-m4
Size: 2580 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070523/a994626b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070523/a994626b/attachment-0003.bin>


More information about the libvir-list mailing list