-GMETADOM_CONFIG="gmetadom-config"
-GMETADOM_MIN_VERSION=0.1.4
-AC_MSG_CHECKING(for GMetaDOM libraries >= $GMETADOM_MIN_VERSION)
-if test "x$GMETADOM_PREFIX" != "x"
-then
- if ${GMETADOM_PREFIX}/bin/$GMETADOM_CONFIG --version > /dev/null 2>&1
- then
- GMETADOM_CONFIG=${GMETADOM_PREFIX}/bin/$GMETADOM_CONFIG
- elif ! $GMETADOM_CONFIG --version > /dev/null 2>&1
- then
- AC_MSG_ERROR(Could not find GMetaDOM anywhere (see config.log for details).)
- fi
-fi
-
-vers=`$GMETADOM_CONFIG --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
-minvers=`echo $GMETADOM_MIN_VERSION | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
-if test "$vers" -ge "$minvers"
-then
- GMETADOM_LIBS="`$GMETADOM_CONFIG --module=gdome_cpp_smart --libs`"
- GMETADOM_CFLAGS="`$GMETADOM_CONFIG --module=gdome_cpp_smart --cflags`"
- AC_MSG_RESULT(found)
-else
- AC_MSG_ERROR(You need at least GMetaDOM $GMETADOM_MIN_VERSION for this version of $PACKAGE)
-fi
-
+PKG_CHECK_MODULES(GMETADOM, gdome2-cpp-smart >= 0.1.8,, AC_MSG_ERROR(could not find GMetaDOM))