-dnl GConf configuration
-AM_GCONF_SOURCE_2
-
-AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])
-if test "x$GCONFTOOL" = "xno"; then
- AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
+dnl Check for previewer build
+AC_ARG_ENABLE(previewer,
+ AC_HELP_STRING([--disable-previewer],[disable the GNOME Document Previewer]),
+ [case "${enableval}" in
+ yes) ENABLE_PREVIEWER=yes ;;
+ no) ENABLE_PREVIEWER=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-previewer) ;;
+ esac],
+ [ENABLE_PREVIEWER=yes]) dnl Default value
+if test x$ENABLE_PREVIEWER = "xyes" ; then
+ PKG_CHECK_MODULES(PREVIEWER, gtk+-2.0 >= $GTK_REQUIRED gtk+-unix-print-2.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED,
+ [ENABLE_PREVIEWER=yes],[ENABLE_PREVIEWER=no])
+ if test x$ENABLE_PREVIEWER = "xno" ; then
+ AC_MSG_WARN([Previewer support is disabled since gtk+-unix-print $GTK_REQUIRED or higher was not found])
+ fi