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)
25 ALL_LINGUAS="bg ca cs da de el en_CA en_GB es fi fr hu ja ko lt nb nl no pt_BR ru rw sv uk wa zh_CN zh_TW"
29 GETTEXT_PACKAGE=AC_PACKAGE_NAME
30 AC_SUBST(GETTEXT_PACKAGE)
31 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
33 POPPLER_REQUIRED=0.3.2
35 PKG_CHECK_MODULES(LIBEVPRIVATE, gtk+-2.0 >= 2.4.0)
36 PKG_CHECK_MODULES(TOOLBAR_EDITOR, gtk+-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.4.0)
37 PKG_CHECK_MODULES(RECENT_FILES, gtk+-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.4.0)
38 PKG_CHECK_MODULES(ZOOM_CONTROL, gtk+-2.0 >= 2.4.0)
39 PKG_CHECK_MODULES(SHELL, gtk+-2.0 >= 2.6.0 libgnomeui-2.0 gnome-vfs-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libglade-2.0 gconf-2.0 poppler-glib >= $POPPLER_REQUIRED)
40 PKG_CHECK_MODULES(THUMBNAILER, gtk+-2.0 >= 2.6.0 gnome-vfs-2.0 poppler-glib >= $POPPLER_REQUIRED)
41 PKG_CHECK_MODULES(DVI, gtk+-2.0 >= 2.6.0)
42 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6.0)
43 PKG_CHECK_MODULES(PS, gtk+-2.0 >= 2.6.0 gnome-vfs-2.0 libgnomeui-2.0)
44 PKG_CHECK_MODULES(POPPLER_GLIB, poppler-glib >= $POPPLER_REQUIRED)
46 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
47 AC_SUBST(GLIB_GENMARSHAL)
49 dnl Compile with disable-deprecated switches
51 AC_ARG_ENABLE(deprecated,
52 AC_HELP_STRING([--disable-deprecated],
53 [Don't allow any deprecated GTK+/etc. features.]),
54 set_enable_deprecated="$enableval",[
55 if test -f $srcdir/autogen.sh; then
57 set_enable_deprecated=no
59 set_enable_deprecated=yes
62 AC_MSG_CHECKING([whether to disable deprecated glib/gtk+/etc. features])
63 if test "$set_enable_deprecated" != "yes"; then
65 EVINCE_DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED"
68 EVINCE_DISABLE_DEPRECATED=""
70 AC_SUBST(EVINCE_DISABLE_DEPRECATED)
74 AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])
75 if test "x$GCONFTOOL" = "xno"; then
76 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
79 dnl ================== ggv checks ===================================================
81 [ --with-gs=dir Directory Where GhostScript package is installed.])
83 if test "x$with_gs" = "x"; then
84 AC_PATH_PROG(GS_PROG, gs)
85 if test -z "$GS_PROG"; then
86 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)
92 AC_DEFINE_UNQUOTED(GS_PATH, "$GS_PROG", [Path to the 'gs' executable.])
95 dnl check for GS version
96 AC_MSG_CHECKING(for Ghostscript version...)
97 GS_VERSION=`gs --version | head -n 1 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
98 AC_MSG_RESULT(found $GS_VERSION)
99 if test "$GS_VERSION" -lt "7"; then
100 AC_MSG_ERROR([You need Ghostscript version >= 7 in order to run evince])
102 AA_PARMS="-sDEVICE=x11alpha -dNOPLATFONTS"
103 AC_DEFINE_UNQUOTED(ALPHA_PARAMS, "$AA_PARMS", [Anti-aliasing parameters for Ghostscript.])
104 AC_MSG_RESULT(Antialiasing parameters for Ghostscript: $AA_PARMS)
105 dnl ======================== End of ggv checks =================================
107 dnl ================== tiff checks ===================================================
109 [AC_HELP_STRING([--enable-tiff], [Compile with support of multipage tiff])],enable_tiff="$enableval",enable_tiff=yes)
111 if test "x$enable_tiff" = "xyes"; then
112 AC_CHECK_HEADERS([tiff.h],enable_tiff=yes,enable_tiff=no,)
113 if test "x$enable_tiff" = "xyes"; then
114 AC_CHECK_LIB([tiff],TIFFOpen,enable_tiff=yes,enable_tiff=no,"-lz")
115 AC_CHECK_LIB([tiff],TIFFReadRGBAImageOriented,enable_tiff=yes,enable_tiff=no,"-lz")
117 if test "x$enable_tiff" = "xyes"; then
118 AC_DEFINE([ENABLE_TIFF], [1], [Enable multipage tiff support.])
120 AC_MSG_WARN("Tiff support is disabled since tiff library version 3.6 or newer not found")
124 AM_CONDITIONAL(ENABLE_TIFF, test x$enable_tiff = xyes)
125 dnl ================== end of tiff checks ============================================
127 dnl ================== djvu checks ===================================================
130 [AC_HELP_STRING([--enable-djvu], [Compile with support of djvu viewer])],enable_djvu="$enableval",enable_djvu=no)
132 if test "x$enable_djvu" = "xyes"; then
133 AC_CHECK_HEADERS([libdjvu/ddjvuapi.h],enable_djvu=yes,enable_djvu=no,)
134 if test "x$enable_djvu" = "xyes"; then
135 AC_CHECK_LIB([djvulibre],ddjvu_context_create,enable_djvu=yes,enable_djvu=no,"-lpthread")
138 if test "x$enable_djvu" = "xyes"; then
139 AC_DEFINE([ENABLE_DJVU], [1], [Enable djvu viewer support.])
141 AC_MSG_WARN("Djvu support is disabled since djvulibre library version 3.5.14 or newer is not found")
145 AM_CONDITIONAL(ENABLE_DJVU, test x$enable_djvu = xyes)
147 dnl ================== End of djvu checks ===================================================
149 dnl ================== dvi checks ===================================================
152 [AC_HELP_STRING([--enable-dvi], [Compile with support of dvi viewer])],enable_dvi="$enableval",enable_dvi=no)
155 [AC_HELP_STRING([--enable-t1lib], [Compile with support of t1lib for type1 fonts in dvi])],enable_type1_fonts="$enableval",enable_type1_fonts=no)
157 if test "x$enable_dvi" = "xyes"; then
161 AC_CHECK_SIZEOF(long, 4)
162 AC_CHECK_SIZEOF(int, 4)
163 AC_CHECK_SIZEOF(short, 2)
164 AC_CHECK_SIZEOF(void *, 4)
165 AC_CHECK_LIB([kpathsea],[kpse_init_prog],[enable_dvi=yes],[enable_dvi=no])
167 if test "x$enable_dvi" = "xyes"; then
168 AC_DEFINE([ENABLE_DVI], [1], [Enable dvi viewer support.])
170 AC_MSG_WARN("Dvi support is disabled since kpathsea library is not found. Check your TeX installation.")
173 AM_CONDITIONAL(ENABLE_DVI, test x$enable_dvi = xyes)
175 if test "x$enable_dvi" = "xyes"; then
176 if test "x$enable_type1_fonts" = "xyes"; then
177 AC_CHECK_LIB([t1lib],T1_InitLib,enable_type1_fonts=yes,enable_type1_fonts=no)
180 if test "x$enable_type1_fonts" = xyes; then
181 AC_DEFINE([WITH_TYPE1_FONTS], [1], [Enable t1lib support in dvi.])
184 enable_type1_fonts=no
186 AM_CONDITIONAL(WITH_TYPE1_FONTS, test x$enable_type1_fonts = xyes)
188 dnl ================== End of dvi checks ===================================================
190 dnl =================== Mime types list ====================================================
192 EVINCE_MIME_TYPES="application/pdf;application/postscript;application/x-gzpostscript"
194 if test "x$enable_dvi" = "xyes"; then
195 EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;application/x-dvi"
197 if test "x$enable_djvu" = "xyes"; then
198 EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;image/vnd.djvu"
200 if test "x$enable_tiff" = "xyes"; then
201 EVINCE_MIME_TYPES="$EVINCE_MIME_TYPES;image/tiff"
203 AC_SUBST(EVINCE_MIME_TYPES)
205 dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
206 dnl stolen from nautilus and gnome-common
208 AC_ARG_ENABLE(more-warnings,
209 [ --enable-more-warnings Maximum compiler warnings],
210 set_more_warnings="$enableval",[
211 if test -f $srcdir/autogen.sh; then
213 set_more_warnings=yes
218 AC_MSG_CHECKING(for more warnings, including -Werror)
219 if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
220 AC_MSG_RESULT([yes, using gcc])
223 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
224 -Wnested-externs -Wpointer-arith \
225 -Wcast-align -Wsign-compare \
229 dnl case " $CFLAGS " in
230 dnl *[\ \ ]-ansi[\ \ ]*) ;;
231 dnl *) CFLAGS="$CFLAGS -ansi" ;;
233 dnl case " $CFLAGS " in
234 dnl *[\ \ ]-pedantic[\ \ ]*) ;;
235 dnl *) CFLAGS="$CFLAGS -pedantic" ;;
238 for option in -Wno-strict-aliasing -Wno-sign-compare; do
239 SAVE_CFLAGS="$CFLAGS"
240 CFLAGS="$CFLAGS $option"
241 AC_MSG_CHECKING([whether gcc understands $option])
242 AC_TRY_COMPILE([], [],
245 if test $has_option = no; then
246 CFLAGS="$SAVE_CFLAGS"
248 AC_MSG_RESULT($has_option)
260 cut-n-paste/recent-files/Makefile
261 cut-n-paste/zoom-control/Makefile
262 cut-n-paste/toolbar-editor/Makefile
264 data/evince.desktop.in
272 dvi/mdvi-lib/Makefile