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.

Attachment: pgp746zTMO8qp.pgp
Description: PGP signature

_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to