- 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])
+ [AS_HELP_STRING([--disable-thumbnailer],[disable the GNOME thumbnailer])],
+ [],
+ [case "$with_platform" in
+ gnome) enable_thumbnailer=yes ;;
+ hildon) enable_thumbnailer=no ;;
+ esac])
+
+AM_CONDITIONAL(ENABLE_THUMBNAILER, test x$enable_thumbnailer = "xyes")
+
+dnl Check for previewer build
+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 "$enable_previewer" = "yes" ; then
+ PKG_CHECK_MODULES(PREVIEWER, gtk+-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