GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
-AC_ARG_ENABLE([dbus],
- AS_HELP_STRING([--enable-dbus],[Enable DBUS (default=no)]),
- [enable_dbus=$enableval],
- [enable_dbus=no])
+PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_GLIB_REQUIRED],
+ [enable_dbus=yes],[enable_dbus=no])
+AC_SUBST([DBUS_CFLAGS])
+AC_SUBST([DBUS_LIBS])
-AC_MSG_RESULT([$enable_dbus])
+if test "x$enable_dbus" = "xno"; then
+ AC_MSG_WARN([DBUS support is disabled since dbus $DBUS_GLIB_REQUIRED or higher was not found])
+fi
if test "x$enable_dbus" = "xyes" ; then
+ AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
+
+ if test x$DBUS_BINDING_TOOL = "xno" ; then
+ AC_MSG_ERROR([dbus-binding-tool executable not found in your path - should be installed with dbus glib bindings])
+ fi
+
AC_DEFINE([ENABLE_DBUS],[1],[Define if DBUS support is enabled])
AC_DEFINE([ENABLE_METADATA],[1],[Define if metadata support is enabled])
- PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_GLIB_REQUIRED])
DBUS_VERSION=`$PKG_CONFIG --modversion dbus-glib-1 | sed 's/0.\([[0-9]]*\)/\1/'`
AC_DEFINE_UNQUOTED(DBUS_VERSION, $DBUS_VERSION, [DBUS version.])
- AM_CONDITIONAL([DBUS_TOOL_NO_PREFIX], [test "x$DBUS_VERSION" = "x33"])
fi
AM_CONDITIONAL([ENABLE_DBUS], [test "x$enable_dbus" = "xyes"])
AM_CONDITIONAL([ENABLE_METADATA], [test "x$enable_dbus" = "xyes"])
+AM_CONDITIONAL([DBUS_TOOL_NO_PREFIX], [test "x$DBUS_VERSION" = "x33"])
dnl Check for Nautilus property page build
AC_ARG_ENABLE(nautilus,