-dnl Compile with disable-deprecated switches
-
-AC_ARG_ENABLE(deprecated,
-AC_HELP_STRING([--disable-deprecated],
- [Don't allow any deprecated GTK+/etc. features.]),
-set_enable_deprecated="$enableval",[
-if test -f $srcdir/autogen.sh; then
- is_cvs_version=true
- set_enable_deprecated=no
-else
- set_enable_deprecated=yes
- fi
-])
-AC_MSG_CHECKING([whether to disable deprecated glib/gtk+/etc. features])
-if test "$set_enable_deprecated" != "yes"; then
- AC_MSG_RESULT(yes)
- EVINCE_DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED"
-else
- AC_MSG_RESULT(no)
- EVINCE_DISABLE_DEPRECATED=""
+
+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
+
+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])
+
+ DBUS_VERSION=`$PKG_CONFIG --modversion dbus-glib-1 | sed 's/0\.\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\)/\1/'`
+ AC_DEFINE_UNQUOTED(DBUS_VERSION, $DBUS_VERSION, [DBUS version.])
+fi
+
+SHELL_CFLAGS="$SHELL_CORE_CFLAGS $DBUS_CFLAGS"
+SHELL_LIBS="$SHELL_CORE_LIBS $DBUS_LIBS -lz"
+AC_SUBST(SHELL_CFLAGS)
+AC_SUBST(SHELL_LIBS)
+
+FRONTEND_CFLAGS="$FRONTEND_CORE_CFLAGS"
+FRONTEND_LIBS="$FRONTEND_CORE_LIBS -lz"
+AC_SUBST(FRONTEND_CFLAGS)
+AC_SUBST(FRONTEND_LIBS)
+
+AM_CONDITIONAL([ENABLE_DBUS], [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,
+ AC_HELP_STRING([--enable-nautilus],[compile the nautilus plugin]),
+ [case "${enableval}" in
+ yes) ENABLE_NAUTILUS=yes ;;
+ no) ENABLE_NAUTILUS=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-nautilus) ;;
+ esac],
+ [ENABLE_NAUTILUS=yes]) dnl Default value
+
+if test x$ENABLE_NAUTILUS = "xyes" ; then
+ PKG_CHECK_MODULES(NAUTILUS, gtk+-x11-2.0 $MM gthread-2.0 libnautilus-extension,
+ [HAVE_NAUTILUS=yes], [HAVE_NAUTILUS=no])
+fi
+
+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])