-AC_DEFINE_UNQUOTED(SYSTEM_XPDFRC, "$system_xpdfrc",
- [Full path for the system-wide xpdfrc file.])
-
-dnl Checks for header files.
-AC_HEADER_DIRENT
-
-dnl Switch over to C++. This will make the checks below a little
-dnl bit stricter (requiring function prototypes in include files).
-dnl (99% of xpdf is written in C++.)
-AC_LANG_CPLUSPLUS
-
-dnl Look for header that defines select() and fd_set.
-AC_MSG_CHECKING([select() and fd_set in sys/select.h and sys/bsdtypes.h])
-AC_TRY_COMPILE([#include <stdlib.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <sys/types.h>],
- [fd_set fds;
-select(0, NULL, NULL, NULL, NULL);], xpdf_ok=yes, xpdf_ok=no)
-if test $xpdf_ok = yes; then
- AC_MSG_RESULT([not needed])
+
+SHELL_CFLAGS="$SHELL_CORE_CFLAGS $DBUS_CFLAGS"
+SHELL_LIBS="$SHELL_CORE_LIBS $DBUS_LIBS -ltiff -lz"
+AC_SUBST(SHELL_CFLAGS)
+AC_SUBST(SHELL_LIBS)
+
+FRONTEND_CFLAGS="$FRONTEND_CORE_CFLAGS"
+FRONTEND_LIBS="$FRONTEND_CORE_LIBS -ltiff -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])
+fi
+AM_CONDITIONAL(HAVE_NAUTILUS, test x$HAVE_NAUTILUS = "xyes")
+
+dnl Check for functions not present in gtk 2.6
+evince_save_LIBS=$LIBS
+LIBS="$LIBS $FRONTEND_CORE_LIBS"
+AC_CHECK_FUNCS(gtk_icon_view_get_visible_range)
+AC_CHECK_FUNCS(gtk_window_present_with_time)
+AC_CHECK_FUNCS(g_file_set_contents)
+LIBS=$evince_save_LIBS
+
+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])
+fi
+
+dnl ================== portability checks ===========================================
+
+dnl for backtrace()
+AC_CHECK_HEADERS([execinfo.h])
+
+dnl ================== ggv checks ===================================================
+AC_ARG_WITH(gs-pkg,
+ [ --with-gs=dir Directory Where GhostScript package is installed.])
+
+if test "x$with_gs" = "x"; then
+ AC_PATH_PROG(GS_PROG, gs)
+ if test -z "$GS_PROG"; then
+ AC_MSG_ERROR(Unable to find GhostScript in the PATH. Provide the full path for GhostScript(--with-gs=PATH). You need to have Ghostscript installed in order to run evince)
+ fi