-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=""
-fi
-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"
-fi
-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])
-else
- AC_TRY_COMPILE([#include <stdlib.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/select.h>],
- [fd_set fds;
-select(0, NULL, NULL, NULL, NULL);], xpdf_ok=yes, xpdf_ok=no)
- if test $xpdf_ok = yes; then
- AC_DEFINE(HAVE_SYS_SELECT_H, 1, [Have sys/select.h.])
- AC_MSG_RESULT([need sys/select.h])
- else
- AC_TRY_COMPILE([#include <stdlib.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/bsdtypes.h>],
- [fd_set fds;
-select(0, NULL, NULL, NULL, NULL);], xpdf_ok=yes, xpdf_ok=no)
- if test $xpdf_ok = yes; then
- AC_DEFINE(HAVE_SYS_BSDTYPES_H, 1, [Have sys/bsdtypes.h.])
- AC_MSG_RESULT([need sys/bsdtypes.h])
- else
- AC_MSG_RESULT([problem])
- fi
- fi