-AC_SUBST(EVINCE_DISABLE_DEPRECATED)
-
-dnl ================== Xpdf aconf.h.in checks ==================================
-
-AH_TEMPLATE([HAVE_LIBSM], [Define to 1 if you have session management.])
-AH_TEMPLATE([ENABLE_NLS], [Use Native Language Support.])
-AH_TEMPLATE([HAVE_CATGETS], [Use catgets functions.])
-AH_TEMPLATE([HAVE_GETTEXT], [Use gettext functions.])
-
-dnl Optional features.
-AH_TEMPLATE([A4_PAPER],
- [Use A4 paper size instead of Letter for PostScript output.])
-AC_ARG_ENABLE(a4-paper,
- AC_HELP_STRING([--enable-a4-paper],
- [use A4 paper size instead of Letter for
- PostScript output]),
- AC_DEFINE(A4_PAPER))
-
-dnl never define NO_TEXT_SELECT, just remember this Xpdf setting.
-AH_TEMPLATE([NO_TEXT_SELECT], [Do not allow text selection.])
-
-AH_TEMPLATE([OPI_SUPPORT],
- [Include support for OPI comments.])
-AC_ARG_ENABLE(opi,
- AC_HELP_STRING([--enable-opi],
- [include support for OPI comments]),
- AC_DEFINE(OPI_SUPPORT))
-
-dnl enable these unconditionally.
-AC_DEFINE([MULTITHREADED], [1], [Enable multithreading support.])
-AC_DEFINE([TEXTOUT_WORD_LIST], [1], [Enable word list support.])
-
-AH_TEMPLATE([APPDEFDIR],
- [Directory with the Xpdf app-defaults file.])
-AC_ARG_WITH(appdef-dir,
- AC_HELP_STRING([--with-appdef-dir],
- [set app-defaults directory]),
- AC_DEFINE_UNQUOTED(APPDEFDIR, "$with_appdef_dir"))
-
-dnl Path to xpdfrc.
-dnl This ugly kludge to get the sysconfdir path is needed because
-dnl autoconf doesn't actually set the prefix variable until later.
-if test "$sysconfdir" = '${prefix}/etc'; then
- if test "x$prefix" = xNONE; then
- system_xpdfrc="$ac_default_prefix/etc/xpdfrc"
- else
- system_xpdfrc="$prefix/etc/xpdfrc"
- fi
-else
- system_xpdfrc="$sysconfdir/xpdfrc"
+
+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])
+ AC_DEFINE([ENABLE_METADATA],[1],[Define if metadata support is enabled])
+
+ DBUS_VERSION=`$PKG_CONFIG --modversion dbus-glib-1 | sed 's/0.\([[0-9]]*\)/\1/'`
+ AC_DEFINE_UNQUOTED(DBUS_VERSION, $DBUS_VERSION, [DBUS version.])