1 dnl Process this file with autoconf to produce a configure script.
4 AC_INIT([Evince],[2.25.2],[http://bugzilla.gnome.org/enter_bug.cgi?product=evince],[evince])
5 AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip])
8 AC_SUBST(EV_API_VERSION)
10 AM_CONFIG_HEADER(config.h)
21 IT_PROG_INTLTOOL([0.35.0])
22 AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
23 AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
27 GNOME_MAINTAINER_MODE_DEFINES
28 GNOME_COMPILE_WARNINGS
33 GETTEXT_PACKAGE=evince
34 AC_SUBST(GETTEXT_PACKAGE)
35 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
38 dnl Check dependencies
40 # LIB_CFLAGS for helpers and generic widgets. (libdocument, cut-and-paste)
41 # BACKEND_CFLAGS for backend implementations.
42 # FRONTEND_CFLAGS for frontend implementations. (properties, thumbnailer)
44 # SHELL_CFLAGS for shell implementation.
47 DBUS_GLIB_REQUIRED=0.70
50 KEYRING_REQUIRED=2.22.0
52 GNOME_ICON_THEME_REQUIRED=2.17.1
55 PKG_CHECK_MODULES(LIB, gtk+-2.0 >= $GTK_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED gio-2.0 >= $GLIB_REQUIRED)
56 PKG_CHECK_MODULES(BACKEND, gtk+-2.0 >= $GTK_REQUIRED)
57 PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-2.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
58 PKG_CHECK_MODULES(SHELL_CORE, libxml-2.0 >= $LIBXML_REQUIRED gtk+-2.0 >= $GTK_REQUIRED gtk+-unix-print-2.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED gthread-2.0 gconf-2.0)
60 PKG_CHECK_MODULES(SMCLIENT, gtk+-2.0 gthread-2.0)
61 AC_SUBST(SMCLIENT_CFLAGS)
62 AC_SUBST(SMCLIENT_LIBS)
64 BACKEND_LIBTOOL_FLAGS="-module -avoid-version"
65 AC_SUBST(BACKEND_LIBTOOL_FLAGS)
67 dnl ===== Check special functions
68 evince_save_LIBS=$LIBS
69 LIBS="$LIBS $BACKEND_LIBS"
70 AC_CHECK_FUNCS(cairo_format_stride_for_width)
71 LIBS=$evince_save_LIBS
74 AC_HELP_STRING([--without-keyring],[disable the use of gnome-keyring]),
76 yes) WITH_KEYRING=yes ;;
77 no) WITH_KEYRING=no ;;
78 *) AC_MSG_ERROR(bad value ${withval} for --with-keyring) ;;
80 [WITH_KEYRING=yes]) dnl Default value
81 AM_CONDITIONAL(WITH_KEYRING, test x$WITH_KEYRING = "xyes")
83 if test x$WITH_KEYRING = "xyes"; then
84 PKG_CHECK_MODULES(KEYRING, gnome-keyring-1 >= $KEYRING_REQUIRED)
85 AC_DEFINE([WITH_KEYRING],[1],[Define if KEYRING support is enabled])
88 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
89 AC_SUBST(GLIB_GENMARSHAL)
91 dnl ========= Check for DBUS
93 [AC_HELP_STRING([--enable-dbus], [Compile with support for dbus])],
94 enable_dbus="$enableval",enable_dbus=yes)
95 if test "x$enable_dbus" != "xno"; then
96 PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_GLIB_REQUIRED],
97 [enable_dbus=yes],[enable_dbus=no])
99 if test "x$enable_dbus" = "xno"; then
100 AC_MSG_WARN([DBUS support is disabled since dbus $DBUS_GLIB_REQUIRED or higher was not found])
103 if test "x$enable_dbus" = "xyes" ; then
104 AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
106 if test x$DBUS_BINDING_TOOL = "xno" ; then
107 AC_MSG_ERROR([dbus-binding-tool executable not found in your path - should be installed with dbus glib bindings])
110 AC_DEFINE([ENABLE_DBUS],[1],[Define if DBUS support is enabled])
114 AC_SUBST([DBUS_CFLAGS])
115 AC_SUBST([DBUS_LIBS])
117 AM_CONDITIONAL([ENABLE_DBUS], [test "x$enable_dbus" = "xyes"])
118 AM_CONDITIONAL([DBUS_TOOL_NO_PREFIX], [test "x$DBUS_VERSION" = "x33"])
121 AC_ARG_ENABLE([debug],
122 AC_HELP_STRING([--enable-debug],
123 [Turn on evince debug mode]),,
126 if test "x$enable_debug" = "xyes"; then
127 DEBUG_FLAGS="-DEV_ENABLE_DEBUG"
131 LIB_CFLAGS="$LIB_CFLAGS $DEBUG_FLAGS"
136 BACKEND_CFLAGS="$BACKEND_CFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE $DEBUG_FLAGS"
137 AC_SUBST(BACKEND_CFLAGS)
138 AC_SUBST(BACKEND_LIBS)
140 SHELL_CFLAGS="$SHELL_CORE_CFLAGS $DBUS_CFLAGS $KEYRING_CFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE $DEBUG_FLAGS"
141 SHELL_LIBS="$SHELL_CORE_LIBS $DBUS_LIBS $KEYRING_LIBS -lz"
142 AC_SUBST(SHELL_CFLAGS)
145 FRONTEND_CFLAGS="$FRONTEND_CORE_CFLAGS $DEBUG_FLAGS"
146 FRONTEND_LIBS="$FRONTEND_CORE_LIBS -lz"
147 AC_SUBST(FRONTEND_CFLAGS)
148 AC_SUBST(FRONTEND_LIBS)
150 dnl Check for Nautilus property page build
151 AC_ARG_ENABLE(nautilus,
152 AC_HELP_STRING([--enable-nautilus],[compile the nautilus plugin]),
153 [case "${enableval}" in
154 yes) ENABLE_NAUTILUS=yes ;;
155 no) ENABLE_NAUTILUS=no ;;
156 *) AC_MSG_ERROR(bad value ${enableval} for --enable-nautilus) ;;
158 [ENABLE_NAUTILUS=yes]) dnl Default value
160 if test x$ENABLE_NAUTILUS = "xyes" ; then
161 PKG_CHECK_MODULES(NAUTILUS, gtk+-x11-2.0 $MM gthread-2.0 libnautilus-extension,
162 [HAVE_NAUTILUS=yes], [HAVE_NAUTILUS=no])
163 NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
164 AC_SUBST(NAUTILUS_EXTENSION_DIR)
167 AC_SUBST(NAUTILUS_CFLAGS)
168 AC_SUBST(NAUTILUS_LIBS)
169 if test x$HAVE_NAUTILUS = "xyes"; then
170 AC_DEFINE(HAVE_NAUTILUS, 1, [defined if you build the nautilus plugin])
172 AM_CONDITIONAL(HAVE_NAUTILUS, test x$HAVE_NAUTILUS = "xyes")
175 dnl Check for thumbnailer build
176 AC_ARG_ENABLE(thumbnailer,
177 AC_HELP_STRING([--disable-thumbnailer],[disable the GNOME thumbnailer]),
178 [case "${enableval}" in
179 yes) ENABLE_THUMBNAILER=yes ;;
180 no) ENABLE_THUMBNAILER=no ;;
181 *) AC_MSG_ERROR(bad value ${enableval} for --enable-thumbnailer) ;;
183 [ENABLE_THUMBNAILER=yes]) dnl Default value
184 AM_CONDITIONAL(ENABLE_THUMBNAILER, test x$ENABLE_THUMBNAILER = "xyes")
186 dnl GConf configuration
189 AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])
190 if test "x$GCONFTOOL" = "xno"; then
191 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
194 dnl ================== portability checks ===========================================
197 AC_CHECK_HEADERS([execinfo.h])
199 AC_CHECK_DECL([_NL_MEASUREMENT_MEASUREMENT],[
200 AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT],[1],[Define if _NL_MEASUREMENT_MEASUREMENT is available])
201 ],[],[#include <langinfo.h>])
203 dnl ================== pdf checks ===================================================
205 [AC_HELP_STRING([--enable-pdf], [Compile with pdf support])],enable_pdf="$enableval",enable_pdf=yes)
207 if test "x$enable_pdf" = "xyes"; then
208 POPPLER_REQUIRED=0.8.0
209 PKG_CHECK_MODULES(POPPLER, poppler-glib >= $POPPLER_REQUIRED,enable_pdf=yes,enable_pdf=no)
211 if test "x$enable_pdf" = "xyes"; then
212 AC_DEFINE([ENABLE_PDF], [1], [Enable pdf support.])
213 SHELL_LIBS="$SHELL_LIBS $POPPLER_LIBS"
214 SHELL_CFLAGS="$SHELL_CFLAGS $POPPLER_CFLAGS"
216 evince_save_LIBS=$LIBS
217 LIBS="$LIBS $POPPLER_LIBS"
218 AC_CHECK_FUNCS(poppler_page_render)
219 AC_CHECK_FUNCS(poppler_layers_iter_new)
220 LIBS=$evince_save_LIBS
222 PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, enable_cairo_pdf=yes, enable_cairo_pdf=no)
223 if test x$enable_cairo_pdf = xyes; then
224 AC_DEFINE([HAVE_CAIRO_PDF], [1], [defined if cairo-pdf is available])
227 PKG_CHECK_MODULES(CAIRO_PS, cairo-ps, enable_cairo_ps=yes, enable_cairo_ps=no)
228 if test x$enable_cairo_ps = xyes; then
229 AC_DEFINE([HAVE_CAIRO_PS], [1], [defined if cairo-ps is available])
232 AC_MSG_WARN("PDF support is disabled since poppler-glib library version $POPPLER_REQUIRED or newer not found")
236 AM_CONDITIONAL(ENABLE_PDF, test x$enable_pdf = xyes)
237 dnl ================== end of pdf checks ============================================
239 dnl libspectre (used by ps and dvi backends)
240 SPECTRE_REQUIRED=0.2.0
241 PKG_CHECK_MODULES(SPECTRE, libspectre >= $SPECTRE_REQUIRED,have_spectre=yes,have_spectre=no)
242 AM_CONDITIONAL(HAVE_SPECTRE, test x$have_spectre = xyes)
243 if test "x$have_spectre" = "xyes"; then
244 AC_DEFINE([HAVE_SPECTRE], [1], [Have libspectre])
247 dnl ================== ps checks ====================================================
249 [AC_HELP_STRING([--disable-ps], [Compile without PostScript backend])],enable_ps=$enableval,enable_ps="yes")
251 if test "x$enable_ps" = "xyes"; then
252 if test "x$have_spectre" = "xyes"; then
253 AC_DEFINE([ENABLE_PS], [1], [Enable support for PostScript files.])
256 AC_MSG_WARN([PS support is disabled since libspectre (version >= $SPECTRE_REQUIRED) is needed])
259 AM_CONDITIONAL(ENABLE_PS, test x$enable_ps = xyes)
260 dnl ======================== End of ps checks ===================================
262 dnl ================== tiff checks ===================================================
264 [AC_HELP_STRING([--enable-tiff], [Compile with support of multipage tiff])],enable_tiff="$enableval",enable_tiff=yes)
266 if test "x$enable_tiff" = "xyes"; then
267 AC_CHECK_HEADERS([tiff.h],enable_tiff=yes,enable_tiff=no,)
268 if test "x$enable_tiff" = "xyes"; then
269 AC_CHECK_LIB([tiff],TIFFOpen,enable_tiff=yes,enable_tiff=no,"-lz")
270 AC_CHECK_LIB([tiff],TIFFReadRGBAImageOriented,enable_tiff=yes,enable_tiff=no,"-lz")
272 if test "x$enable_tiff" = "xyes"; then
273 AC_DEFINE([ENABLE_TIFF], [1], [Enable multipage tiff support.])
275 AC_MSG_WARN("Tiff support is disabled since tiff library version 3.6 or newer not found")
279 AM_CONDITIONAL(ENABLE_TIFF, test x$enable_tiff = xyes)
280 dnl ================== end of tiff checks ============================================
282 dnl ================== djvu checks ===================================================
285 [AC_HELP_STRING([--enable-djvu], [Compile with support of djvu viewer])],enable_djvu="$enableval",enable_djvu=yes)
287 if test "x$enable_djvu" = "xyes"; then
288 DJVULIBRE_REQUIRED=3.5.17
289 PKG_CHECK_MODULES(DJVU, ddjvuapi >= $DJVULIBRE_REQUIRED, enable_djvu=yes, enable_djvu=no)
291 if test "x$enable_djvu" = "xyes"; then
292 AC_DEFINE([ENABLE_DJVU], [1], [Enable djvu viewer support.])
295 ** Djvu support is disabled since a recent version of the djvulibre
296 ** library was not found. You need at least djvulibre-3.5.17 which
297 ** can be found on http://djvulibre.djvuzone.org
302 AM_CONDITIONAL(ENABLE_DJVU, test x$enable_djvu = xyes)
304 dnl ================== End of djvu checks ===================================================
306 dnl ================== dvi checks ===================================================
309 [AC_HELP_STRING([--enable-dvi], [Compile with support of dvi viewer])],enable_dvi="$enableval",enable_dvi=yes)
312 [AC_HELP_STRING([--enable-t1lib], [Compile with support of t1lib for type1 fonts in dvi])],enable_type1_fonts="$enableval",enable_type1_fonts=no)
314 if test "x$enable_dvi" = "xyes"; then
318 AC_CHECK_SIZEOF(long, 4)
319 AC_CHECK_SIZEOF(int, 4)
320 AC_CHECK_SIZEOF(short, 2)
321 AC_CHECK_SIZEOF(void *, 4)
322 AC_CHECK_LIB([kpathsea],[kpse_init_prog],[enable_dvi=yes],[enable_dvi=no])
324 if test "x$enable_dvi" = "xyes"; then
325 AC_DEFINE([ENABLE_DVI], [1], [Enable dvi viewer support.])
327 AC_MSG_WARN("Dvi support is disabled since kpathsea library is not found. Check your TeX installation.")
330 AM_CONDITIONAL(ENABLE_DVI, test x$enable_dvi = xyes)
332 if test "x$enable_dvi" = "xyes"; then
333 if test "x$enable_type1_fonts" = "xyes"; then
334 AC_CHECK_LIB([t1],T1_InitLib,enable_type1_fonts=yes,enable_type1_fonts=no,[-lm])
337 if test "x$enable_type1_fonts" = xyes; then
338 AC_DEFINE([WITH_TYPE1_FONTS], [1], [Enable t1lib support in dvi.])
341 enable_type1_fonts=no
343 AM_CONDITIONAL(WITH_TYPE1_FONTS, test x$enable_type1_fonts = xyes)
345 dnl ================== End of dvi checks ===================================================
347 dnl ================== pixbuf checks ===================================================
349 AC_ARG_ENABLE(pixbuf,
350 [AC_HELP_STRING([--enable-pixbuf], [Compile with support of pixbuf])],enable_pixbuf="$enableval",enable_pixbuf=no)
351 if test "x$enable_pixbuf" = "xyes"; then
352 AC_DEFINE([ENABLE_PIXBUF], [1], [Enable pixbuf support.])
354 AM_CONDITIONAL(ENABLE_PIXBUF, test x$enable_pixbuf = xyes)
356 dnl ================== End of pixbuf checks ===================================================
358 dnl ================== comic book checks ===================================================
360 AC_ARG_ENABLE(comics,
361 [AC_HELP_STRING([--enable-comics], [Compile with support for comic book archives])],enable_comics="$enableval",enable_comics=yes)
362 if test "x$enable_comics" = "xyes"; then
363 AC_DEFINE([ENABLE_COMICS], [1], [Enable support for comics.])
365 AM_CONDITIONAL(ENABLE_COMICS, test x$enable_comics = xyes)
367 dnl ================== End of comic book checks ============================================
369 dnl ================== impress book checks ===================================================
371 AC_ARG_ENABLE(impress,
372 [AC_HELP_STRING([--enable-impress], [Compile with support for impress presentations])],enable_impress="$enableval",enable_impress=no)
373 if test "x$enable_impress" = "xyes"; then
374 AC_DEFINE([ENABLE_IMPRESS], [1], [Enable support for impress.])
376 AM_CONDITIONAL(ENABLE_IMPRESS, test x$enable_impress = xyes)
378 dnl ================== End of impress book checks ============================================
380 dnl =================== Mime types list ====================================================
382 if test "x$enable_pdf" = "xyes" ; then
383 EVINCE_MIME_TYPES="application/pdf;application/x-bzpdf;application/x-gzpdf;"
385 if test "x$enable_ps" = "xyes" ; then
386 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/postscript;application/x-bzpostscript;application/x-gzpostscript;image/x-eps;image/x-bzeps;image/x-gzeps;"
388 if test "x$enable_dvi" = "xyes"; then
389 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-dvi;application/x-bzdvi;application/x-gzdvi;"
391 if test "x$enable_djvu" = "xyes"; then
392 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}image/vnd.djvu;"
394 if test "x$enable_tiff" = "xyes"; then
395 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}image/tiff;"
397 if test "x$enable_comics" = "xyes"; then
398 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-cbr;application/x-cbz;application/x-cb7;"
400 if test "x$enable_pixbuf" = "xyes"; then
401 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}image/*;"
403 if test "x$enable_impress" = "xyes"; then
404 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/vnd.sun.xml.impress;application/vnd.oasis.opendocument.presentation;"
406 AC_SUBST(EVINCE_MIME_TYPES)
410 backend/comics/Makefile
411 backend/djvu/Makefile
413 backend/dvi/mdvi-lib/Makefile
414 backend/impress/Makefile
416 backend/pixbuf/Makefile
418 backend/tiff/Makefile
420 cut-n-paste/evmountoperation/Makefile
421 cut-n-paste/gedit-message-area/Makefile
422 cut-n-paste/gimpcellrenderertoggle/Makefile
423 cut-n-paste/smclient/Makefile
424 cut-n-paste/toolbar-editor/Makefile
425 cut-n-paste/zoom-control/Makefile
426 cut-n-paste/totem-screensaver/Makefile
427 data/evince.desktop.in
430 data/icons/16x16/Makefile
431 data/icons/16x16/apps/Makefile
432 data/icons/16x16/actions/Makefile
433 data/icons/22x22/Makefile
434 data/icons/22x22/apps/Makefile
435 data/icons/22x22/actions/Makefile
436 data/icons/24x24/Makefile
437 data/icons/24x24/apps/Makefile
438 data/icons/24x24/actions/Makefile
439 data/icons/32x32/Makefile
440 data/icons/32x32/actions/Makefile
441 data/icons/48x48/Makefile
442 data/icons/48x48/apps/Makefile
443 data/icons/48x48/actions/Makefile
444 data/icons/scalable/Makefile
445 data/icons/scalable/apps/Makefile
447 help/reference/Makefile
448 help/reference/version.xml
462 Keyring Support....: $WITH_KEYRING
463 DBUS Support.......: $enable_dbus
464 Nautilus Plugin....: $HAVE_NAUTILUS
465 Thumbnailer........: $ENABLE_THUMBNAILER
466 Gtk-Doc Support....: $enable_gtk_doc
467 Debug mode.........: $enable_debug
469 PDF Backend........: $enable_pdf
470 PostScript Backend.: $enable_ps
471 TIFF Backend.......: $enable_tiff
472 DJVU Backend.......: $enable_djvu
473 DVI Backend........: $enable_dvi
474 Pixbuf Backend.....: $enable_pixbuf
475 Comics Backend.....: $enable_comics
476 Impress Backend....: $enable_impress