1 dnl Process this file with autoconf to produce a configure script.
5 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
7 dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
8 AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
10 AM_CONFIG_HEADER(config.h)
22 AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
23 AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
27 ALL_LINGUAS="bg ca cs da de el en_CA en_GB es eu fi fr hu ja ko lt nb nl no pt_BR ru rw sk sv th uk wa zh_CN zh_TW"
31 GETTEXT_PACKAGE=AC_PACKAGE_NAME
32 AC_SUBST(GETTEXT_PACKAGE)
33 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
35 POPPLER_REQUIRED=0.3.3
36 DBUS_GLIB_REQUIRED=0.33
38 PKG_CHECK_MODULES(LIBEVPRIVATE, gtk+-2.0 >= 2.4.0)
39 PKG_CHECK_MODULES(TOOLBAR_EDITOR, gtk+-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.4.0)
40 PKG_CHECK_MODULES(RECENT_FILES, gtk+-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.4.0)
41 PKG_CHECK_MODULES(ZOOM_CONTROL, gtk+-2.0 >= 2.4.0)
42 PKG_CHECK_MODULES(SHELL, gtk+-2.0 >= 2.6.0 libgnomeui-2.0 >= 2.6.0 gnome-vfs-2.0 libgnomeprint-2.2 >= 2.5.1 libgnomeprintui-2.2 libglade-2.0 gconf-2.0 poppler-glib >= $POPPLER_REQUIRED)
43 PKG_CHECK_MODULES(THUMBNAILER, gtk+-2.0 >= 2.6.0 gnome-vfs-2.0 poppler-glib >= $POPPLER_REQUIRED)
44 PKG_CHECK_MODULES(PROPERTIES, gtk+-2.0 >= 2.6.0 libglade-2.0 poppler-glib >= $POPPLER_REQUIRED)
45 PKG_CHECK_MODULES(DVI, gtk+-2.0 >= 2.6.0)
46 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6.0)
47 PKG_CHECK_MODULES(PS, gtk+-2.0 >= 2.6.0 gnome-vfs-2.0 libgnomeui-2.0)
48 PKG_CHECK_MODULES(POPPLER_GLIB, poppler-glib >= $POPPLER_REQUIRED)
50 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
51 AC_SUBST(GLIB_GENMARSHAL)
53 PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= $DBUS_GLIB_REQUIRED],
54 [enable_dbus=yes],[enable_dbus=no])
55 AC_SUBST([DBUS_CFLAGS])
58 if test "x$enable_dbus" = "xno"; then
59 AC_MSG_WARN([DBUS support is disabled since dbus $DBUS_GLIB_REQUIRED or higher was not found])
62 if test "x$enable_dbus" = "xyes" ; then
63 AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
65 if test x$DBUS_BINDING_TOOL = "xno" ; then
66 AC_MSG_ERROR([dbus-binding-tool executable not found in your path - should be installed with dbus glib bindings])
69 AC_DEFINE([ENABLE_DBUS],[1],[Define if DBUS support is enabled])
70 AC_DEFINE([ENABLE_METADATA],[1],[Define if metadata support is enabled])
72 DBUS_VERSION=`$PKG_CONFIG --modversion dbus-glib-1 | sed 's/0.\([[0-9]]*\)/\1/'`
73 AC_DEFINE_UNQUOTED(DBUS_VERSION, $DBUS_VERSION, [DBUS version.])
76 AM_CONDITIONAL([ENABLE_DBUS], [test "x$enable_dbus" = "xyes"])
77 AM_CONDITIONAL([ENABLE_METADATA], [test "x$enable_dbus" = "xyes"])
78 AM_CONDITIONAL([DBUS_TOOL_NO_PREFIX], [test "x$DBUS_VERSION" = "x33"])
80 dnl Check for Nautilus property page build
81 AC_ARG_ENABLE(nautilus,
82 AC_HELP_STRING([--enable-nautilus],[compile the nautilus plugin]),
83 [case "${enableval}" in
84 yes) ENABLE_NAUTILUS=yes ;;
85 no) ENABLE_NAUTILUS=no ;;
86 *) AC_MSG_ERROR(bad value ${enableval} for --enable-nautilus) ;;
88 [ENABLE_NAUTILUS=yes]) dnl Default value
90 if test x$ENABLE_NAUTILUS = "xyes" ; then
91 PKG_CHECK_MODULES(NAUTILUS, gtk+-x11-2.0 $MM gthread-2.0 libnautilus-extension,
92 [HAVE_NAUTILUS=yes], [HAVE_NAUTILUS=no])
95 AC_SUBST(NAUTILUS_CFLAGS)
96 AC_SUBST(NAUTILUS_LIBS)
97 if test x$HAVE_NAUTILUS = "xyes"; then
98 AC_DEFINE(HAVE_NAUTILUS, 1, [defined if you build the nautilus plugin])
100 AM_CONDITIONAL(HAVE_NAUTILUS, test x$HAVE_NAUTILUS = "xyes")
102 dnl Compile with disable-deprecated switches
104 AC_ARG_ENABLE(deprecated,
105 AC_HELP_STRING([--disable-deprecated],
106 [Don't allow any deprecated GTK+/etc. features.]),
107 set_enable_deprecated="$enableval",[
108 if test -f $srcdir/autogen.sh; then
110 set_enable_deprecated=no
112 set_enable_deprecated=yes
115 AC_MSG_CHECKING([whether to disable deprecated glib/gtk+/etc. features])
116 if test "$set_enable_deprecated" != "yes"; then
118 EVINCE_DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED"
121 EVINCE_DISABLE_DEPRECATED=""
123 AC_SUBST(EVINCE_DISABLE_DEPRECATED)
125 evince_save_LIBS=$LIBS
126 LIBS="$LIBS $GTK_LIBS"
127 AC_CHECK_FUNCS(gtk_icon_view_get_visible_range)
128 LIBS=$evince_save_LIBS
132 AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])
133 if test "x$GCONFTOOL" = "xno"; then
134 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
137 dnl ================== ggv checks ===================================================
139 [ --with-gs=dir Directory Where GhostScript package is installed.])
141 if test "x$with_gs" = "x"; then
142 AC_PATH_PROG(GS_PROG, gs)
143 if test -z "$GS_PROG"; then
144 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)
150 AC_DEFINE_UNQUOTED(GS_PATH, "$GS_PROG", [Path to the 'gs' executable.])
153 dnl check for GS version
154 AC_MSG_CHECKING(for Ghostscript version...)
155 GS_VERSION=`gs --version | head -n 1 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
156 AC_MSG_RESULT(found $GS_VERSION)
157 if test "$GS_VERSION" -lt "7"; then
158 AC_MSG_ERROR([You need Ghostscript version >= 7 in order to run evince])
160 AA_PARMS="-sDEVICE=x11alpha -dNOPLATFONTS"
161 AC_DEFINE_UNQUOTED(ALPHA_PARAMS, "$AA_PARMS", [Anti-aliasing parameters for Ghostscript.])
162 AC_MSG_RESULT(Antialiasing parameters for Ghostscript: $AA_PARMS)
163 dnl ======================== End of ggv checks =================================
165 dnl ================== tiff checks ===================================================
167 [AC_HELP_STRING([--enable-tiff], [Compile with support of multipage tiff])],enable_tiff="$enableval",enable_tiff=yes)
169 if test "x$enable_tiff" = "xyes"; then
170 AC_CHECK_HEADERS([tiff.h],enable_tiff=yes,enable_tiff=no,)
171 if test "x$enable_tiff" = "xyes"; then
172 AC_CHECK_LIB([tiff],TIFFOpen,enable_tiff=yes,enable_tiff=no,"-lz")
173 AC_CHECK_LIB([tiff],TIFFReadRGBAImageOriented,enable_tiff=yes,enable_tiff=no,"-lz")
175 if test "x$enable_tiff" = "xyes"; then
176 AC_DEFINE([ENABLE_TIFF], [1], [Enable multipage tiff support.])
178 AC_MSG_WARN("Tiff support is disabled since tiff library version 3.6 or newer not found")
182 AM_CONDITIONAL(ENABLE_TIFF, test x$enable_tiff = xyes)
183 dnl ================== end of tiff checks ============================================
185 dnl ================== djvu checks ===================================================
188 [AC_HELP_STRING([--enable-djvu], [Compile with support of djvu viewer])],enable_djvu="$enableval",enable_djvu=no)
190 if test "x$enable_djvu" = "xyes"; then
191 AC_CHECK_HEADERS([libdjvu/ddjvuapi.h],enable_djvu=yes,enable_djvu=no,)
193 if test "x$enable_djvu" = "xyes"; then
194 AC_CHECK_LIB([djvulibre],ddjvu_context_create,enable_djvu=yes,enable_djvu=no,"-lpthread")
195 AC_CHECK_LIB([djvulibre],ddjvu_document_get_pageinfo,enable_djvu=yes,enable_djvu=no,"-lpthread")
198 if test "x$enable_djvu" = "xyes"; then
199 AC_DEFINE([ENABLE_DJVU], [1], [Enable djvu viewer support.])
202 ** Djvu support is disabled since recent version of djvulibre
203 ** library was not found. To get proper djvu support you need to
204 ** install development version of djvulibre. You can get it from
205 ** anonymous CVS server on djvulibre.sf.net. Just use something
208 ** cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/djvu co djvulibre-3.5
213 AM_CONDITIONAL(ENABLE_DJVU, test x$enable_djvu = xyes)
215 dnl ================== End of djvu checks ===================================================
217 dnl ================== dvi checks ===================================================
220 [AC_HELP_STRING([--enable-dvi], [Compile with support of dvi viewer])],enable_dvi="$enableval",enable_dvi=no)
223 [AC_HELP_STRING([--enable-t1lib], [Compile with support of t1lib for type1 fonts in dvi])],enable_type1_fonts="$enableval",enable_type1_fonts=no)
225 if test "x$enable_dvi" = "xyes"; then
229 AC_CHECK_SIZEOF(long, 4)
230 AC_CHECK_SIZEOF(int, 4)
231 AC_CHECK_SIZEOF(short, 2)
232 AC_CHECK_SIZEOF(void *, 4)
233 AC_CHECK_LIB([kpathsea],[kpse_init_prog],[enable_dvi=yes],[enable_dvi=no])
235 if test "x$enable_dvi" = "xyes"; then
236 AC_DEFINE([ENABLE_DVI], [1], [Enable dvi viewer support.])
238 AC_MSG_WARN("Dvi support is disabled since kpathsea library is not found. Check your TeX installation.")
241 AM_CONDITIONAL(ENABLE_DVI, test x$enable_dvi = xyes)
243 if test "x$enable_dvi" = "xyes"; then
244 if test "x$enable_type1_fonts" = "xyes"; then
245 AC_CHECK_LIB([t1lib],T1_InitLib,enable_type1_fonts=yes,enable_type1_fonts=no)
248 if test "x$enable_type1_fonts" = xyes; then
249 AC_DEFINE([WITH_TYPE1_FONTS], [1], [Enable t1lib support in dvi.])
252 enable_type1_fonts=no
254 AM_CONDITIONAL(WITH_TYPE1_FONTS, test x$enable_type1_fonts = xyes)
256 dnl ================== End of dvi checks ===================================================
258 dnl =================== Mime types list ====================================================
260 EVINCE_MIME_TYPES="application/pdf;application/postscript;application/x-gzpostscript"
262 if test "x$enable_dvi" = "xyes"; then
263 EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;application/x-dvi"
265 if test "x$enable_djvu" = "xyes"; then
266 EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;image/vnd.djvu"
268 if test "x$enable_tiff" = "xyes"; then
269 EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;image/tiff"
271 AC_SUBST(EVINCE_MIME_TYPES)
273 dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
274 dnl stolen from nautilus and gnome-common
276 AC_ARG_ENABLE(more-warnings,
277 [ --enable-more-warnings Maximum compiler warnings],
278 set_more_warnings="$enableval",[
279 if test -f $srcdir/autogen.sh; then
281 set_more_warnings=yes
286 AC_MSG_CHECKING(for more warnings, including -Werror)
287 if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
288 AC_MSG_RESULT([yes, using gcc])
291 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
292 -Wnested-externs -Wpointer-arith \
293 -Wcast-align -Wsign-compare \
297 dnl case " $CFLAGS " in
298 dnl *[\ \ ]-ansi[\ \ ]*) ;;
299 dnl *) CFLAGS="$CFLAGS -ansi" ;;
301 dnl case " $CFLAGS " in
302 dnl *[\ \ ]-pedantic[\ \ ]*) ;;
303 dnl *) CFLAGS="$CFLAGS -pedantic" ;;
306 for option in -Wno-strict-aliasing -Wno-sign-compare; do
307 SAVE_CFLAGS="$CFLAGS"
308 CFLAGS="$CFLAGS $option"
309 AC_MSG_CHECKING([whether gcc understands $option])
310 AC_TRY_COMPILE([], [],
313 if test $has_option = no; then
314 CFLAGS="$SAVE_CFLAGS"
316 AC_MSG_RESULT($has_option)
328 cut-n-paste/recent-files/Makefile
329 cut-n-paste/zoom-control/Makefile
330 cut-n-paste/toolbar-editor/Makefile
332 data/evince.desktop.in
340 dvi/mdvi-lib/Makefile