Initial add

(Old svn revision: 287)
master
Bernhard Walle 2003-08-17 18:56:49 +00:00
parent 39c7c55760
commit 0045c0359d
1 changed files with 31 additions and 0 deletions

31
m4/libgtop.m4 Normal file
View File

@ -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)
])