1 dnl Process this file with autoconf to produce a configure script.
5 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
7 AM_CONFIG_HEADER(config.h)
19 AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
20 AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
24 GNOME_MAINTAINER_MODE_DEFINES
25 GNOME_COMPILE_WARNINGS
29 ALL_LINGUAS="bg ca cs da de el en_CA en_GB es et eu fi fr gl gu he hi hu id it ja ko lt nb ne nl no pa pl pt pt_BR ro ru rw sk sq sr sr@Latn sv th tr uk wa zh_CN zh_TW"
33 GETTEXT_PACKAGE=AC_PACKAGE_NAME
34 AC_SUBST(GETTEXT_PACKAGE)
35 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
37 dnl Check dependencies
39 # LIB_CFLAGS for helpers and generic widgets. (lib, cut-and-paste)
40 # BACKEND_CFLAGS for backend implementations.
41 # FRONTEND_CFLAGS for frontend implementations. (properties, thumbnailer)
43 # SHELL_CFLAGS for shell implementation.
46 POPPLER_REQUIRED=0.4.1
47 DBUS_GLIB_REQUIRED=0.33
49 LIBGNOMEUI_REQUIRED=2.6.0
50 KEYRING_REQUIRED=0.4.2
52 PKG_CHECK_MODULES(LIB, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
53 PKG_CHECK_MODULES(BACKEND, gtk+-2.0 >= $GTK_REQUIRED)
54 PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libglade-2.0 poppler-glib >= $POPPLER_REQUIRED)
55 PKG_CHECK_MODULES(POPPLER, poppler-glib >= $POPPLER_REQUIRED)
56 PKG_CHECK_MODULES(SHELL_CORE, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gnome-vfs-2.0 libgnomeprint-2.2 >= 2.5.1 libgnomeprintui-2.2 libglade-2.0 gconf-2.0 poppler-glib >= $POPPLER_REQUIRED gnome-keyring-1 >= $KEYRING_REQUIRED)
58 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
59 AC_SUBST(GLIB_GENMARSHAL)
61 PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_GLIB_REQUIRED],
62 [enable_dbus=yes],[enable_dbus=no])
63 AC_SUBST([DBUS_CFLAGS])
66 if test "x$enable_dbus" = "xno"; then
67 AC_MSG_WARN([DBUS support is disabled since dbus $DBUS_GLIB_REQUIRED or higher was not found])
70 if test "x$enable_dbus" = "xyes" ; then
71 AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
73 if test x$DBUS_BINDING_TOOL = "xno" ; then
74 AC_MSG_ERROR([dbus-binding-tool executable not found in your path - should be installed with dbus glib bindings])
77 AC_DEFINE([ENABLE_DBUS],[1],[Define if DBUS support is enabled])
79 DBUS_VERSION=`$PKG_CONFIG --modversion dbus-glib-1 | sed 's/0\.\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\)/\1/'`
80 AC_DEFINE_UNQUOTED(DBUS_VERSION, $DBUS_VERSION, [DBUS version.])
83 SHELL_CFLAGS="$SHELL_CORE_CFLAGS $DBUS_CFLAGS"
84 SHELL_LIBS="$SHELL_CORE_LIBS $DBUS_LIBS -ltiff -lz"
85 AC_SUBST(SHELL_CFLAGS)
88 FRONTEND_CFLAGS="$FRONTEND_CORE_CFLAGS"
89 FRONTEND_LIBS="$FRONTEND_CORE_LIBS -ltiff -lz"
90 AC_SUBST(FRONTEND_CFLAGS)
91 AC_SUBST(FRONTEND_LIBS)
93 AM_CONDITIONAL([ENABLE_DBUS], [test "x$enable_dbus" = "xyes"])
94 AM_CONDITIONAL([DBUS_TOOL_NO_PREFIX], [test "x$DBUS_VERSION" = "x33"])
96 dnl Check for Nautilus property page build
97 AC_ARG_ENABLE(nautilus,
98 AC_HELP_STRING([--enable-nautilus],[compile the nautilus plugin]),
99 [case "${enableval}" in
100 yes) ENABLE_NAUTILUS=yes ;;
101 no) ENABLE_NAUTILUS=no ;;
102 *) AC_MSG_ERROR(bad value ${enableval} for --enable-nautilus) ;;
104 [ENABLE_NAUTILUS=yes]) dnl Default value
106 if test x$ENABLE_NAUTILUS = "xyes" ; then
107 PKG_CHECK_MODULES(NAUTILUS, gtk+-x11-2.0 $MM gthread-2.0 libnautilus-extension,
108 [HAVE_NAUTILUS=yes], [HAVE_NAUTILUS=no])
111 AC_SUBST(NAUTILUS_CFLAGS)
112 AC_SUBST(NAUTILUS_LIBS)
113 if test x$HAVE_NAUTILUS = "xyes"; then
114 AC_DEFINE(HAVE_NAUTILUS, 1, [defined if you build the nautilus plugin])
116 AM_CONDITIONAL(HAVE_NAUTILUS, test x$HAVE_NAUTILUS = "xyes")
118 dnl Check for functions not present in gtk 2.6
119 evince_save_LIBS=$LIBS
120 LIBS="$LIBS $FRONTEND_CORE_LIBS"
121 AC_CHECK_FUNCS(gtk_icon_view_get_visible_range)
122 AC_CHECK_FUNCS(gtk_window_present_with_time)
123 AC_CHECK_FUNCS(g_file_set_contents)
124 LIBS=$evince_save_LIBS
126 dnl GConf configuration
129 AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])
130 if test "x$GCONFTOOL" = "xno"; then
131 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
134 dnl ================== portability checks ===========================================
137 AC_CHECK_HEADERS([execinfo.h])
139 dnl ================== ggv checks ===================================================
141 [ --with-gs=dir Directory Where GhostScript package is installed.])
143 if test "x$with_gs" = "x"; then
144 AC_PATH_PROG(GS_PROG, gs)
145 if test -z "$GS_PROG"; then
146 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)
152 AC_DEFINE_UNQUOTED(GS_PATH, "$GS_PROG", [Path to the 'gs' executable.])
155 dnl check for GS version
156 AC_MSG_CHECKING(for Ghostscript version...)
157 GS_VERSION=`gs --version | head -n 1 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
158 AC_MSG_RESULT(found $GS_VERSION)
159 if test "$GS_VERSION" -lt "7"; then
160 AC_MSG_ERROR([You need Ghostscript version >= 7 in order to run evince])
162 AA_PARMS="-sDEVICE=x11alpha -dNOPLATFONTS"
163 AC_DEFINE_UNQUOTED(ALPHA_PARAMS, "$AA_PARMS", [Anti-aliasing parameters for Ghostscript.])
164 AC_MSG_RESULT(Antialiasing parameters for Ghostscript: $AA_PARMS)
165 dnl ======================== End of ggv checks =================================
167 dnl ================== tiff checks ===================================================
169 [AC_HELP_STRING([--enable-tiff], [Compile with support of multipage tiff])],enable_tiff="$enableval",enable_tiff=yes)
171 if test "x$enable_tiff" = "xyes"; then
172 AC_CHECK_HEADERS([tiff.h],enable_tiff=yes,enable_tiff=no,)
173 if test "x$enable_tiff" = "xyes"; then
174 AC_CHECK_LIB([tiff],TIFFOpen,enable_tiff=yes,enable_tiff=no,"-lz")
175 AC_CHECK_LIB([tiff],TIFFReadRGBAImageOriented,enable_tiff=yes,enable_tiff=no,"-lz")
177 if test "x$enable_tiff" = "xyes"; then
178 AC_DEFINE([ENABLE_TIFF], [1], [Enable multipage tiff support.])
180 AC_MSG_WARN("Tiff support is disabled since tiff library version 3.6 or newer not found")
184 AM_CONDITIONAL(ENABLE_TIFF, test x$enable_tiff = xyes)
185 dnl ================== end of tiff checks ============================================
187 dnl ================== djvu checks ===================================================
190 [AC_HELP_STRING([--enable-djvu], [Compile with support of djvu viewer])],enable_djvu="$enableval",enable_djvu=no)
192 if test "x$enable_djvu" = "xyes"; then
193 AC_CHECK_HEADERS([libdjvu/ddjvuapi.h],enable_djvu=yes,enable_djvu=no,)
195 if test "x$enable_djvu" = "xyes"; then
196 AC_CHECK_LIB([djvulibre],ddjvu_context_create,enable_djvu=yes,enable_djvu=no,"-lpthread")
197 AC_CHECK_LIB([djvulibre],ddjvu_document_get_pageinfo,enable_djvu=yes,enable_djvu=no,"-lpthread")
200 if test "x$enable_djvu" = "xyes"; then
201 AC_DEFINE([ENABLE_DJVU], [1], [Enable djvu viewer support.])
204 ** Djvu support is disabled since a recent version of the djvulibre
205 ** library was not found. You need at least djvulibre-3.5.15 which
206 ** can be found on http://djvulibre.djvuzone.org
211 AM_CONDITIONAL(ENABLE_DJVU, test x$enable_djvu = xyes)
213 dnl ================== End of djvu checks ===================================================
215 dnl ================== dvi checks ===================================================
218 [AC_HELP_STRING([--enable-dvi], [Compile with support of dvi viewer])],enable_dvi="$enableval",enable_dvi=no)
221 [AC_HELP_STRING([--enable-t1lib], [Compile with support of t1lib for type1 fonts in dvi])],enable_type1_fonts="$enableval",enable_type1_fonts=no)
223 if test "x$enable_dvi" = "xyes"; then
227 AC_CHECK_SIZEOF(long, 4)
228 AC_CHECK_SIZEOF(int, 4)
229 AC_CHECK_SIZEOF(short, 2)
230 AC_CHECK_SIZEOF(void *, 4)
231 AC_CHECK_LIB([kpathsea],[kpse_init_prog],[enable_dvi=yes],[enable_dvi=no])
233 if test "x$enable_dvi" = "xyes"; then
234 AC_DEFINE([ENABLE_DVI], [1], [Enable dvi viewer support.])
236 AC_MSG_WARN("Dvi support is disabled since kpathsea library is not found. Check your TeX installation.")
239 AM_CONDITIONAL(ENABLE_DVI, test x$enable_dvi = xyes)
241 if test "x$enable_dvi" = "xyes"; then
242 if test "x$enable_type1_fonts" = "xyes"; then
243 AC_CHECK_LIB([t1],T1_InitLib,enable_type1_fonts=yes,enable_type1_fonts=no,[-lm])
246 if test "x$enable_type1_fonts" = xyes; then
247 AC_DEFINE([WITH_TYPE1_FONTS], [1], [Enable t1lib support in dvi.])
250 enable_type1_fonts=no
252 AM_CONDITIONAL(WITH_TYPE1_FONTS, test x$enable_type1_fonts = xyes)
254 dnl ================== End of dvi checks ===================================================
256 dnl ================== pixbuf checks ===================================================
258 AC_ARG_ENABLE(pixbuf,
259 [AC_HELP_STRING([--enable-pixbuf], [Compile with support of pixbuf])],enable_pixbuf="$enableval",enable_pixbuf=no)
260 if test "x$enable_pixbuf" = "xyes"; then
261 AC_DEFINE([ENABLE_PIXBUF], [1], [Enable pixbuf support.])
263 AM_CONDITIONAL(ENABLE_PIXBUF, test x$enable_pixbuf = xyes)
265 dnl ================== End of dvi checks ===================================================
267 dnl =================== Mime types list ====================================================
269 EVINCE_MIME_TYPES="application/pdf;application/postscript;application/x-gzpostscript"
271 if test "x$enable_dvi" = "xyes"; then
272 EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;application/x-dvi"
274 if test "x$enable_djvu" = "xyes"; then
275 EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;image/vnd.djvu"
277 if test "x$enable_tiff" = "xyes"; then
278 EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;image/tiff"
280 AC_SUBST(EVINCE_MIME_TYPES)
285 cut-n-paste/recent-files/Makefile
286 cut-n-paste/zoom-control/Makefile
287 cut-n-paste/toolbar-editor/Makefile
289 data/evince.desktop.in
297 dvi/mdvi-lib/Makefile