-AC_SUBST(NAUTILUS_CFLAGS)
-AC_SUBST(NAUTILUS_LIBS)
-if test x$HAVE_NAUTILUS = "xyes"; then
- AC_DEFINE(HAVE_NAUTILUS, 1, [defined if you build the nautilus plugin])
-fi
-AM_CONDITIONAL(HAVE_NAUTILUS, test x$HAVE_NAUTILUS = "xyes")
-
-
-dnl Check for thumbnailer build
-AC_ARG_ENABLE(thumbnailer,
- AC_HELP_STRING([--disable-thumbnailer],[disable the GNOME thumbnailer]),
- [case "${enableval}" in
- yes) ENABLE_THUMBNAILER=yes ;;
- no) ENABLE_THUMBNAILER=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-thumbnailer) ;;
- esac],
- [ENABLE_THUMBNAILER=yes]) dnl Default value
-AM_CONDITIONAL(ENABLE_THUMBNAILER, test x$ENABLE_THUMBNAILER = "xyes")
-
-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])
+AM_CONDITIONAL([ENABLE_NAUTILUS],[test "$enable_nautilus" = "yes"])
+
+# Check for thumbnailer build
+
+AC_ARG_ENABLE([thumbnailer],
+ [AS_HELP_STRING([--disable-thumbnailer],[disable the GNOME thumbnailer])],
+ [],
+ [case "$with_platform" in
+ gnome) enable_thumbnailer=yes ;;
+ *) enable_thumbnailer=no ;;
+ esac])
+
+AM_CONDITIONAL([ENABLE_THUMBNAILER],[test "$enable_thumbnailer" = "yes"])
+
+# ***************
+# Print Previewer
+# ***************
+
+AC_ARG_ENABLE([previewer],
+ [AS_HELP_STRING([--disable-previewer],[disable the GNOME Document Previewer])],
+ [],
+ [case "$with_platform" in
+ gnome) enable_previewer=yes ;;
+ *) enable_previewer=no ;;
+ esac])
+
+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])