[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: library version number
From: |
Luke Mewburn |
Subject: |
Re: library version number |
Date: |
Wed, 15 Apr 2009 10:02:32 +1000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Tue, Apr 14, 2009 at 11:33:31PM +0100, Philip Herron wrote:
| Hey
|
| Just wondering it would be nice if i could in my configure.ac check for
| the library version.
|
| For one of the libraries i am use its libxml2 and the only way i know of
| getting the version number linker flags etc is it comes with its own
| pkg-config style app xml2-config.
|
| Is there a way even to run xml2-config --version and return the variable
| inside my configure.ac or is there a better macro for this :S
I use something similar to:
AC_PATH_PROGS([TOOL_XML2_CONFIG], [xml2-config])
AS_IF([test -n "$TOOL_XML2_CONFIG"],
[XML2_CFLAGS=`$TOOL_XML2_CONFIG --cflags`
XML2_LIBS=`$TOOL_XML2_CONFIG --libs`],
[AC_MSG_ERROR([missing program 'xml2-config'; is 'libxml2' or
'libxml2-devel' installed?])])
AC_SUBST([XML2_CFLAGS])
AC_SUBST([XML2_LIBS])
You could use a variation of this to obtain the version.
cheers,
Luke.
pgp_Oknv5pkEo.pgp
Description: PGP signature