+dnl ========= Check for libgnomeprintui
+AC_ARG_ENABLE(gnome-print,
+ [AC_HELP_STRING([--disable-gnome-print], [Compile without print support])],
+ enable_gnome_print="$enableval",
+ enable_gnome_print=yes)
+
+if test x$enable_gnome_print = xyes; then
+ PKG_CHECK_MODULES(GNOME_PRINT,
+ libgnomeprintui-2.2 >= $LIBGNOMEPRINTUI_REQUIRED,
+ enable_gnome_print=yes, enable_gnome_print=no)
+fi
+
+AC_SUBST(GNOME_PRINT_CFLAGS)
+AC_SUBST(GNOME_PRINT_LIBS)
+
+if test x$enable_gnome_print = xyes; then
+ AC_DEFINE([WITH_GNOME_PRINT],[1],[Enable Print Support.])
+fi
+
+AM_CONDITIONAL(WITH_GNOME_PRINT, test x$enable_gnome_print = xyes)
+
+dnl ========= Check for DBUS
+PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_GLIB_REQUIRED],
+ [enable_dbus=yes],[enable_dbus=no])
+AC_SUBST([DBUS_CFLAGS])
+AC_SUBST([DBUS_LIBS])
+
+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