1 dnl Process this file with autoconf to produce a configure script.
4 AC_INIT([Evince],[2.23.6],[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=0.4.0
52 LIBGNOMEUI_REQUIRED=2.14.0
53 LIBGNOME_REQUIRED=2.14.0
54 GNOME_ICON_THEME_REQUIRED=2.17.1
57 PKG_CHECK_MODULES(LIB, gtk+-2.0 >= $GTK_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED gio-2.0 >= $GLIB_REQUIRED)
58 PKG_CHECK_MODULES(BACKEND, gtk+-2.0 >= $GTK_REQUIRED)
59 PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-2.0 >= $GTK_REQUIRED libglade-2.0 gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
60 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 libglade-2.0 gconf-2.0)
62 BACKEND_LIBTOOL_FLAGS="-module -avoid-version"
63 AC_SUBST(BACKEND_LIBTOOL_FLAGS)
65 dnl ===== Check special functions
66 evince_save_LIBS=$LIBS
67 LIBS="$LIBS $BACKEND_LIBS"
68 AC_CHECK_FUNCS(cairo_format_stride_for_width)
69 LIBS=$evince_save_LIBS
72 AC_HELP_STRING([--without-keyring],[disable the use of gnome-keyring]),
74 yes) WITH_KEYRING=yes ;;
75 no) WITH_KEYRING=no ;;
76 *) AC_MSG_ERROR(bad value ${withval} for --with-keyring) ;;
78 [WITH_KEYRING=yes]) dnl Default value
79 AM_CONDITIONAL(WITH_KEYRING, test x$WITH_KEYRING = "xyes")
81 if test x$WITH_KEYRING = "xyes"; then
82 PKG_CHECK_MODULES(KEYRING, gnome-keyring-1 >= $KEYRING_REQUIRED)
83 AC_DEFINE([WITH_KEYRING],[1],[Define if KEYRING support is enabled])
87 AC_HELP_STRING([--without-libgnome],[disable the use of libgnome]),
89 yes) WITH_GNOME=yes ;;
91 *) AC_MSG_ERROR(bad value ${withval} for --with-libgnome) ;;
93 [WITH_GNOME=yes]) dnl Default value
94 AM_CONDITIONAL(WITH_GNOME, test x$WITH_GNOME = "xyes")
96 if test x$WITH_GNOME = "xyes"; then
97 PKG_CHECK_MODULES(GNOME, libgnome-2.0 >= $LIBGNOME_REQUIRED)
98 PKG_CHECK_MODULES(GNOMEUI, libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
99 AC_DEFINE([WITH_GNOME],[1],[Define if GNOME support is enabled])
102 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
103 AC_SUBST(GLIB_GENMARSHAL)
105 dnl ========= Check for DBUS
107 [AC_HELP_STRING([--enable-dbus], [Compile with support for dbus])],
108 enable_dbus="$enableval",enable_dbus=yes)
109 if test "x$enable_dbus" != "xno"; then
110 PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_GLIB_REQUIRED],
111 [enable_dbus=yes],[enable_dbus=no])
113 if test "x$enable_dbus" = "xno"; then
114 AC_MSG_WARN([DBUS support is disabled since dbus $DBUS_GLIB_REQUIRED or higher was not found])
117 if test "x$enable_dbus" = "xyes" ; then
118 AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
120 if test x$DBUS_BINDING_TOOL = "xno" ; then
121 AC_MSG_ERROR([dbus-binding-tool executable not found in your path - should be installed with dbus glib bindings])
124 AC_DEFINE([ENABLE_DBUS],[1],[Define if DBUS support is enabled])
128 AC_SUBST([DBUS_CFLAGS])
129 AC_SUBST([DBUS_LIBS])
131 AM_CONDITIONAL([ENABLE_DBUS], [test "x$enable_dbus" = "xyes"])
132 AM_CONDITIONAL([DBUS_TOOL_NO_PREFIX], [test "x$DBUS_VERSION" = "x33"])
135 AC_ARG_ENABLE([debug],
136 AC_HELP_STRING([--enable-debug],
137 [Turn on evince debug mode]),,
140 if test "x$enable_debug" = "xyes"; then
141 DEBUG_FLAGS="-DEV_ENABLE_DEBUG"
145 LIB_CFLAGS="$LIB_CFLAGS $GNOME_CFLAGS $DEBUG_FLAGS"
146 LIB_LIBS="$LIB_LIBS $GNOME_LIBS"
150 BACKEND_CFLAGS="$BACKEND_CFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE $DEBUG_FLAGS"
151 AC_SUBST(BACKEND_CFLAGS)
152 AC_SUBST(BACKEND_LIBS)
154 SHELL_CFLAGS="$SHELL_CORE_CFLAGS $DBUS_CFLAGS $GNOMEUI_CFLAGS $KEYRING_CFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE $DEBUG_FLAGS"
155 SHELL_LIBS="$SHELL_CORE_LIBS $DBUS_LIBS $GNOMEUI_LIBS $KEYRING_LIBS -lz"
156 AC_SUBST(SHELL_CFLAGS)
159 FRONTEND_CFLAGS="$FRONTEND_CORE_CFLAGS $GNOME_CFLAGS $DEBUG_FLAGS"
160 FRONTEND_LIBS="$FRONTEND_CORE_LIBS $GNOME_LIBS -lz"
161 AC_SUBST(FRONTEND_CFLAGS)
162 AC_SUBST(FRONTEND_LIBS)
164 dnl Check for Nautilus property page build
165 AC_ARG_ENABLE(nautilus,
166 AC_HELP_STRING([--enable-nautilus],[compile the nautilus plugin]),
167 [case "${enableval}" in
168 yes) ENABLE_NAUTILUS=yes ;;
169 no) ENABLE_NAUTILUS=no ;;
170 *) AC_MSG_ERROR(bad value ${enableval} for --enable-nautilus) ;;
172 [ENABLE_NAUTILUS=yes]) dnl Default value
174 if test x$ENABLE_NAUTILUS = "xyes" ; then
175 PKG_CHECK_MODULES(NAUTILUS, gtk+-x11-2.0 $MM gthread-2.0 libnautilus-extension,
176 [HAVE_NAUTILUS=yes], [HAVE_NAUTILUS=no])
177 NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
178 AC_SUBST(NAUTILUS_EXTENSION_DIR)
181 AC_SUBST(NAUTILUS_CFLAGS)
182 AC_SUBST(NAUTILUS_LIBS)
183 if test x$HAVE_NAUTILUS = "xyes"; then
184 AC_DEFINE(HAVE_NAUTILUS, 1, [defined if you build the nautilus plugin])
186 AM_CONDITIONAL(HAVE_NAUTILUS, test x$HAVE_NAUTILUS = "xyes")
189 dnl Check for thumbnailer build
190 AC_ARG_ENABLE(thumbnailer,
191 AC_HELP_STRING([--disable-thumbnailer],[disable the GNOME thumbnailer]),
192 [case "${enableval}" in
193 yes) ENABLE_THUMBNAILER=yes ;;
194 no) ENABLE_THUMBNAILER=no ;;
195 *) AC_MSG_ERROR(bad value ${enableval} for --enable-thumbnailer) ;;
197 [ENABLE_THUMBNAILER=yes]) dnl Default value
198 AM_CONDITIONAL(ENABLE_THUMBNAILER, test x$ENABLE_THUMBNAILER = "xyes")
200 dnl GConf configuration
203 AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])
204 if test "x$GCONFTOOL" = "xno"; then
205 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
208 dnl ================== portability checks ===========================================
211 AC_CHECK_HEADERS([execinfo.h])
213 AC_CHECK_DECL([_NL_MEASUREMENT_MEASUREMENT],[
214 AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT],[1],[Define if _NL_MEASUREMENT_MEASUREMENT is available])
215 ],[],[#include <langinfo.h>])
217 dnl ================== pdf checks ===================================================
219 [AC_HELP_STRING([--enable-pdf], [Compile with pdf support])],enable_pdf="$enableval",enable_pdf=yes)
221 if test "x$enable_pdf" = "xyes"; then
222 POPPLER_REQUIRED=0.8.0
223 PKG_CHECK_MODULES(POPPLER, poppler-glib >= $POPPLER_REQUIRED,enable_pdf=yes,enable_pdf=no)
225 if test "x$enable_pdf" = "xyes"; then
226 AC_DEFINE([ENABLE_PDF], [1], [Enable pdf support.])
227 SHELL_LIBS="$SHELL_LIBS $POPPLER_LIBS"
228 SHELL_CFLAGS="$SHELL_CFLAGS $POPPLER_CFLAGS"
230 evince_save_LIBS=$LIBS
231 LIBS="$LIBS $POPPLER_LIBS"
232 AC_CHECK_FUNCS(poppler_page_render)
233 LIBS=$evince_save_LIBS
235 PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, enable_cairo_pdf=yes, enable_cairo_pdf=no)
236 if test x$enable_cairo_pdf = xyes; then
237 AC_DEFINE([HAVE_CAIRO_PDF], [1], [defined if cairo-pdf is available])
240 PKG_CHECK_MODULES(CAIRO_PS, cairo-ps, enable_cairo_ps=yes, enable_cairo_ps=no)
241 if test x$enable_cairo_ps = xyes; then
242 AC_DEFINE([HAVE_CAIRO_PS], [1], [defined if cairo-ps is available])
245 AC_MSG_WARN("PDF support is disabled since poppler-glib library version $POPPLER_REQUIRED or newer not found")
249 AM_CONDITIONAL(ENABLE_PDF, test x$enable_pdf = xyes)
250 dnl ================== end of pdf checks ============================================
252 dnl libspectre (used by ps and dvi backends)
253 SPECTRE_REQUIRED=0.2.0
254 PKG_CHECK_MODULES(SPECTRE, libspectre >= $SPECTRE_REQUIRED,have_spectre=yes,have_spectre=no)
255 AM_CONDITIONAL(HAVE_SPECTRE, test x$have_spectre = xyes)
256 if test "x$have_spectre" = "xyes"; then
257 AC_DEFINE([HAVE_SPECTRE], [1], [Have libspectre])
260 dnl ================== ps checks ====================================================
262 [AC_HELP_STRING([--disable-ps], [Compile without PostScript backend])],enable_ps=$enableval,enable_ps="yes")
264 if test "x$enable_ps" = "xyes"; then
265 if test "x$have_spectre" = "xyes"; then
266 AC_DEFINE([ENABLE_PS], [1], [Enable support for PostScript files.])
269 AC_MSG_WARN([PS support is disabled since libspectre (version >= $SPECTRE_REQUIRED) is needed])
272 AM_CONDITIONAL(ENABLE_PS, test x$enable_ps = xyes)
273 dnl ======================== End of ps checks ===================================
275 dnl ================== tiff checks ===================================================
277 [AC_HELP_STRING([--enable-tiff], [Compile with support of multipage tiff])],enable_tiff="$enableval",enable_tiff=yes)
279 if test "x$enable_tiff" = "xyes"; then
280 AC_CHECK_HEADERS([tiff.h],enable_tiff=yes,enable_tiff=no,)
281 if test "x$enable_tiff" = "xyes"; then
282 AC_CHECK_LIB([tiff],TIFFOpen,enable_tiff=yes,enable_tiff=no,"-lz")
283 AC_CHECK_LIB([tiff],TIFFReadRGBAImageOriented,enable_tiff=yes,enable_tiff=no,"-lz")
285 if test "x$enable_tiff" = "xyes"; then
286 AC_DEFINE([ENABLE_TIFF], [1], [Enable multipage tiff support.])
288 AC_MSG_WARN("Tiff support is disabled since tiff library version 3.6 or newer not found")
292 AM_CONDITIONAL(ENABLE_TIFF, test x$enable_tiff = xyes)
293 dnl ================== end of tiff checks ============================================
295 dnl ================== djvu checks ===================================================
298 [AC_HELP_STRING([--enable-djvu], [Compile with support of djvu viewer])],enable_djvu="$enableval",enable_djvu=yes)
300 if test "x$enable_djvu" = "xyes"; then
301 DJVULIBRE_REQUIRED=3.5.17
302 PKG_CHECK_MODULES(DJVU, ddjvuapi >= $DJVULIBRE_REQUIRED, enable_djvu=yes, enable_djvu=no)
304 if test "x$enable_djvu" = "xyes"; then
305 AC_DEFINE([ENABLE_DJVU], [1], [Enable djvu viewer support.])
308 ** Djvu support is disabled since a recent version of the djvulibre
309 ** library was not found. You need at least djvulibre-3.5.17 which
310 ** can be found on http://djvulibre.djvuzone.org
315 AM_CONDITIONAL(ENABLE_DJVU, test x$enable_djvu = xyes)
317 dnl ================== End of djvu checks ===================================================
319 dnl ================== dvi checks ===================================================
322 [AC_HELP_STRING([--enable-dvi], [Compile with support of dvi viewer])],enable_dvi="$enableval",enable_dvi=yes)
325 [AC_HELP_STRING([--enable-t1lib], [Compile with support of t1lib for type1 fonts in dvi])],enable_type1_fonts="$enableval",enable_type1_fonts=no)
327 if test "x$enable_dvi" = "xyes"; then
331 AC_CHECK_SIZEOF(long, 4)
332 AC_CHECK_SIZEOF(int, 4)
333 AC_CHECK_SIZEOF(short, 2)
334 AC_CHECK_SIZEOF(void *, 4)
335 AC_CHECK_LIB([kpathsea],[kpse_init_prog],[enable_dvi=yes],[enable_dvi=no])
337 if test "x$enable_dvi" = "xyes"; then
338 AC_DEFINE([ENABLE_DVI], [1], [Enable dvi viewer support.])
340 AC_MSG_WARN("Dvi support is disabled since kpathsea library is not found. Check your TeX installation.")
343 AM_CONDITIONAL(ENABLE_DVI, test x$enable_dvi = xyes)
345 if test "x$enable_dvi" = "xyes"; then
346 if test "x$enable_type1_fonts" = "xyes"; then
347 AC_CHECK_LIB([t1],T1_InitLib,enable_type1_fonts=yes,enable_type1_fonts=no,[-lm])
350 if test "x$enable_type1_fonts" = xyes; then
351 AC_DEFINE([WITH_TYPE1_FONTS], [1], [Enable t1lib support in dvi.])
354 enable_type1_fonts=no
356 AM_CONDITIONAL(WITH_TYPE1_FONTS, test x$enable_type1_fonts = xyes)
358 dnl ================== End of dvi checks ===================================================
360 dnl ================== pixbuf checks ===================================================
362 AC_ARG_ENABLE(pixbuf,
363 [AC_HELP_STRING([--enable-pixbuf], [Compile with support of pixbuf])],enable_pixbuf="$enableval",enable_pixbuf=no)
364 if test "x$enable_pixbuf" = "xyes"; then
365 AC_DEFINE([ENABLE_PIXBUF], [1], [Enable pixbuf support.])
367 AM_CONDITIONAL(ENABLE_PIXBUF, test x$enable_pixbuf = xyes)
369 dnl ================== End of pixbuf checks ===================================================
371 dnl ================== comic book checks ===================================================
373 AC_ARG_ENABLE(comics,
374 [AC_HELP_STRING([--enable-comics], [Compile with support for comic book archives])],enable_comics="$enableval",enable_comics=yes)
375 if test "x$enable_comics" = "xyes"; then
376 AC_DEFINE([ENABLE_COMICS], [1], [Enable support for comics.])
378 AM_CONDITIONAL(ENABLE_COMICS, test x$enable_comics = xyes)
380 dnl ================== End of comic book checks ============================================
382 dnl ================== impress book checks ===================================================
384 AC_ARG_ENABLE(impress,
385 [AC_HELP_STRING([--enable-impress], [Compile with support for impress presentations])],enable_impress="$enableval",enable_impress=no)
386 if test "x$enable_impress" = "xyes"; then
387 AC_DEFINE([ENABLE_IMPRESS], [1], [Enable support for impress.])
389 AM_CONDITIONAL(ENABLE_IMPRESS, test x$enable_impress = xyes)
391 dnl ================== End of impress book checks ============================================
393 dnl =================== Mime types list ====================================================
395 if test "x$enable_pdf" = "xyes" ; then
396 EVINCE_MIME_TYPES="application/pdf;application/x-bzpdf;application/x-gzpdf;"
398 if test "x$enable_ps" = "xyes" ; then
399 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/postscript;application/x-bzpostscript;application/x-gzpostscript;image/x-eps;image/x-bzeps;image/x-gzeps;"
401 if test "x$enable_dvi" = "xyes"; then
402 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-dvi;application/x-bzdvi;application/x-gzdvi;"
404 if test "x$enable_djvu" = "xyes"; then
405 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}image/vnd.djvu;"
407 if test "x$enable_tiff" = "xyes"; then
408 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}image/tiff;"
410 if test "x$enable_comics" = "xyes"; then
411 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-cbr;application/x-cbz;application/x-cb7;"
413 if test "x$enable_pixbuf" = "xyes"; then
414 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}image/*;"
416 if test "x$enable_impress" = "xyes"; then
417 EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/vnd.sun.xml.impress;application/vnd.oasis.opendocument.presentation;"
419 AC_SUBST(EVINCE_MIME_TYPES)
423 backend/comics/Makefile
424 backend/djvu/Makefile
426 backend/dvi/mdvi-lib/Makefile
427 backend/impress/Makefile
429 backend/pixbuf/Makefile
431 backend/tiff/Makefile
433 cut-n-paste/evmountoperation/Makefile
434 cut-n-paste/gedit-message-area/Makefile
435 cut-n-paste/toolbar-editor/Makefile
436 cut-n-paste/zoom-control/Makefile
437 cut-n-paste/totem-screensaver/Makefile
438 data/evince.desktop.in
441 data/icons/16x16/Makefile
442 data/icons/16x16/apps/Makefile
443 data/icons/16x16/actions/Makefile
444 data/icons/22x22/Makefile
445 data/icons/22x22/apps/Makefile
446 data/icons/22x22/actions/Makefile
447 data/icons/24x24/Makefile
448 data/icons/24x24/apps/Makefile
449 data/icons/24x24/actions/Makefile
450 data/icons/32x32/Makefile
451 data/icons/32x32/actions/Makefile
452 data/icons/48x48/Makefile
453 data/icons/48x48/apps/Makefile
454 data/icons/48x48/actions/Makefile
455 data/icons/scalable/Makefile
456 data/icons/scalable/apps/Makefile
458 help/reference/Makefile
459 help/reference/version.xml
473 GNOME Support......: $WITH_GNOME
474 Keyring Support....: $WITH_KEYRING
475 DBUS Support.......: $enable_dbus
476 Nautilus Plugin....: $HAVE_NAUTILUS
477 Thumbnailer........: $ENABLE_THUMBNAILER
478 Gtk-Doc Support....: $enable_gtk_doc
479 Debug mode.........: $enable_debug
481 PDF Backend........: $enable_pdf
482 PostScript Backend.: $enable_ps
483 TIFF Backend.......: $enable_tiff
484 DJVU Backend.......: $enable_djvu
485 DVI Backend........: $enable_dvi
486 Pixbuf Backend.....: $enable_pixbuf
487 Comics Backend.....: $enable_comics
488 Impress Backend....: $enable_impress