Wed 03 Mar 2010 11:32:08 PM UTC, original submission:
I'd like to submit AX_LIB_LIBKML macro which provides tests of availability of Google libkml (http://code.google.com/p/libkml/) library of particular version or newer.
This macros checks for Google libkml headers and libraries and defines compilation flags.
The macro supports following options and their values:
1) Single-option usage:
--with-libkml - yes, no or path to Google libkml installation prefix
2) Three-options usage (all options are required):
--with-libkml=yes
--with-libkml-inc - path to base directory with headers
--with-libkml-lib - linker flags for
The macro calls:
AC_SUBST(LIBKML_CFLAGS)
AC_SUBST(LIBKML_LDFLAGS)
AC_SUBST(LIBKML_VERSION) - only if version requirement is used
The macro sets:
HAVE_LIBKML
Example of use the macro:
LIBKML_REQ_VERSION="1.2.0"
AX_LIB_LIBKML($LIBKML_REQ_VERSION)
if test "$HAVE_LIBKML" = "yes"; then
# libkml found
LIBS="$LIBKML_LDFLAGS $LIBS"
CFLAGS="$LIBKML_CFLAGS $CFLAGS"
fi
LICENSE: AllPermissive
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
--
Mateusz Loskot, mateusz-at-loskot-dot-net
http://mateusz.loskot.net
|