From 0045c0359d5e2347f746d202d5bc5a53bc28105e Mon Sep 17 00:00:00 2001 From: Bernhard Walle Date: Sun, 17 Aug 2003 18:56:49 +0000 Subject: [PATCH] Initial add (Old svn revision: 287) --- m4/libgtop.m4 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 m4/libgtop.m4 diff --git a/m4/libgtop.m4 b/m4/libgtop.m4 new file mode 100644 index 0000000..2aef715 --- /dev/null +++ b/m4/libgtop.m4 @@ -0,0 +1,31 @@ + +AC_DEFUN([INIT_LIBGTOP], +[ + +MINIMUM_LIBGTOP_VERSION=$1 +AC_MSG_CHECKING([for LibGTop >= $MINIMUM_LIBGTOP_VERSION]) + +PC_FILE="libgtop-2.0" + + +# Make sure the version is sufficient + +if $PKG_CONFIG --atleast-version=$MINIMUM_LIBGTOP_VERSION $PC_FILE ; then + GTOP_VERSION=`$PKG_CONFIG $PC_FILE --modversion` + AC_MSG_RESULT([yes ($GTOP_VERSION)]) +else + AC_MSG_RESULT([no]) + echo "$as_me: ERROR: LibGTop >= $MINIMUM_LIBGTOP_VERSION not found" >&2; + echo "$as_me: ERROR: Cannot run without LibGTop." + exit 1; +fi + +#OK, we've got what we need, so get the necessary flags to compile +LIBGTOP_INCS=`$PKG_CONFIG $PC_FILE --cflags` +LIBGTOP_LIBS=`$PKG_CONFIG $PC_FILE --libs` + +# And make sure they get plugged into the Makefile +AC_SUBST(LIBGTOP_INCS) +AC_SUBST(LIBGTOP_LIBS) + +])