1 | dnl Configure script for the Eye of Gnome image viewer |
---|
2 | |
---|
3 | AC_INIT(shell/main.c) |
---|
4 | |
---|
5 | AM_CONFIG_HEADER(config.h) |
---|
6 | |
---|
7 | AM_INIT_AUTOMAKE(eog, 2.2.2) |
---|
8 | |
---|
9 | AM_MAINTAINER_MODE |
---|
10 | |
---|
11 | GNOME_PLATFORM_GNOME_2(yes) |
---|
12 | |
---|
13 | dnl ================= Requirements ================================================ |
---|
14 | |
---|
15 | GNOME_VFS_REQUIRED=2.0.4 |
---|
16 | LIBGNOMEUI_REQUIRED=2.0.6 |
---|
17 | LIBBONOBOUI_REQUIRED=2.0.3 |
---|
18 | BONOBO_ACTIVATION_REQUIRED=1.0.3 |
---|
19 | LIBRSVG_REQUIRED=2.0.1 |
---|
20 | LIBGLADE_REQUIRED=2.0.1 |
---|
21 | EEL_REQUIRED=2.2.0 |
---|
22 | |
---|
23 | dnl =============================================================================== |
---|
24 | |
---|
25 | AC_PROG_CC |
---|
26 | AC_ISC_POSIX |
---|
27 | AC_HEADER_STDC |
---|
28 | AC_ARG_PROGRAM |
---|
29 | AC_PROG_RANLIB |
---|
30 | |
---|
31 | GNOME_COMPILE_WARNINGS |
---|
32 | |
---|
33 | dnl ================= Translation Stuf ============================================== |
---|
34 | |
---|
35 | GETTEXT_PACKAGE=eog |
---|
36 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE") |
---|
37 | AC_SUBST(GETTEXT_PACKAGE) |
---|
38 | |
---|
39 | ALL_LINGUAS="am ar az be bg ca cs da de el es et fa fi fr ga gl he hu id it ja kn ko lt lv mk ml mn ms nl nn no pl pt pt_BR ro ru sl sk sq sv ta tr uk vi wa zh_CN zh_TW" |
---|
40 | AM_GLIB_GNU_GETTEXT |
---|
41 | AC_PROG_INTLTOOL |
---|
42 | |
---|
43 | dnl =============================================================================== |
---|
44 | |
---|
45 | AC_SUBST(CFLAGS) |
---|
46 | AC_SUBST(CPPFLAGS) |
---|
47 | AC_SUBST(LDFLAGS) |
---|
48 | |
---|
49 | # glib-genmarshal |
---|
50 | AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) |
---|
51 | |
---|
52 | AC_PATH_PROG(GCONFTOOL, gconftool-2) |
---|
53 | dnl Specify the gconf configuration source, |
---|
54 | dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults |
---|
55 | |
---|
56 | GCONF_CONFIG_SOURCE= |
---|
57 | |
---|
58 | AC_ARG_ENABLE(gconf-source, [ --enable-gconf-source=sourceaddress Where to install schema files.], GCONF_CONFIG_SOURCE=$enable_gconf_source,) |
---|
59 | if test "x$GCONF_CONFIG_SOURCE" = "x"; then |
---|
60 | GCONF_CONFIG_SOURCE="xml::\${sysconfdir}/gconf/gconf.xml.defaults" |
---|
61 | fi |
---|
62 | |
---|
63 | AC_SUBST(GCONF_CONFIG_SOURCE) |
---|
64 | AC_SUBST(INSTALL_GCONF_CONFIG_SOURCE) |
---|
65 | |
---|
66 | dnl ****************************************************** |
---|
67 | dnl Check if the collection component should be build |
---|
68 | dnl ****************************************************** |
---|
69 | collection=no |
---|
70 | AC_ARG_ENABLE(collection, |
---|
71 | [ --enable-collection Build collection component.], |
---|
72 | if test x$enableval = xyes; then |
---|
73 | collection=yes |
---|
74 | fi) |
---|
75 | AM_CONDITIONAL(ENABLE_COLLECTION, test x$collection = xyes) |
---|
76 | |
---|
77 | dnl ****************************************************** |
---|
78 | dnl Check if we have libpreview when the collection is desired |
---|
79 | dnl ****************************************************** |
---|
80 | |
---|
81 | libpreview=no |
---|
82 | if test x$collection = xyes; then |
---|
83 | LIBPREVIEW_MODULE="libpreview" |
---|
84 | PKG_CHECK_MODULES(LIBPREVIEW, $LIBPREVIEW_MODULE, libpreview=yes, libpreview=no) |
---|
85 | AC_SUBST(LIBPREVIEW_CFLAGS) |
---|
86 | AC_SUBST(LIBPREVIEW_LIBS) |
---|
87 | fi |
---|
88 | AM_CONDITIONAL(ENABLE_LIBPREVIEW, test x$libpreview = xyes) |
---|
89 | |
---|
90 | dnl ******************************************************* |
---|
91 | dnl Check for evolution |
---|
92 | dnl ******************************************************* |
---|
93 | dnl --> Reenable this if evolution is ported to gnome 2 <-- |
---|
94 | dnl ******************************************************* |
---|
95 | dnl try_evolution=false |
---|
96 | dnl evolution=no |
---|
97 | dnl AC_ARG_WITH(evolution, |
---|
98 | dnl [ --{with,without}-evolution Use evolution to send images.], |
---|
99 | dnl if test x$withval = xno; then |
---|
100 | dnl try_evolution=false |
---|
101 | dnl fi |
---|
102 | dnl ) |
---|
103 | dnl try_evolution=false |
---|
104 | dnl if $try_evolution; then |
---|
105 | dnl path_to_composer_idl=`gnome-config --datadir`/idl/Evolution-Composer.idl |
---|
106 | dnl AC_CHECK_FILE($path_to_composer_idl, evolution=yes, evolution=no) |
---|
107 | dnl if test x"$evolution" = "xyes"; then |
---|
108 | dnl AC_DEFINE(ENABLE_EVOLUTION) |
---|
109 | dnl fi |
---|
110 | dnl fi |
---|
111 | evolution=no |
---|
112 | AM_CONDITIONAL(ENABLE_EVOLUTION, false) |
---|
113 | |
---|
114 | dnl ******************************************************* |
---|
115 | dnl Check for GnoCam |
---|
116 | dnl ******************************************************* |
---|
117 | dnl --> Reenable this if GnoCam is ported to gnome 2 and |
---|
118 | dnl someone has tested this <-- |
---|
119 | dnl ******************************************************* |
---|
120 | dnl try_gnocam=true |
---|
121 | dnl gnocam=no |
---|
122 | dnl AC_ARG_WITH(gnocam, |
---|
123 | dnl [ --{with,without}-gnocam Use gnocam to acquire images.], |
---|
124 | dnl if test x$withval = xno; then |
---|
125 | dnl try_gnocam=false |
---|
126 | dnl fi |
---|
127 | dnl ) |
---|
128 | dnl if $try_gnocam; then |
---|
129 | dnl path_to_gnocam_idl=`gnome-config --datadir`/idl/GnoCam.idl |
---|
130 | dnl AC_CHECK_FILE($path_to_gnocam_idl, gnocam=yes, gnocam=no) |
---|
131 | dnl if test x"$gnocam" = "xyes"; then |
---|
132 | dnl AC_DEFINE(ENABLE_GNOCAM) |
---|
133 | dnl fi |
---|
134 | dnl fi |
---|
135 | dnl AM_CONDITIONAL(ENABLE_GNOCAM, test x"$gnocam" = "xyes") |
---|
136 | gnocam=no |
---|
137 | AM_CONDITIONAL(ENABLE_GNOCAM, false) |
---|
138 | |
---|
139 | EOG_MODULES="gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libbonoboui-2.0 >= $LIBBONOBOUI_REQUIRED bonobo-activation-2.0 >= $BONOBO_ACTIVATION_REQUIRED librsvg-2.0 >= $LIBRSVG_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED eel-2.0 >= $EEL_REQUIRED" |
---|
140 | PKG_CHECK_MODULES(EOG, $EOG_MODULES) |
---|
141 | AC_SUBST(EOG_CFLAGS) |
---|
142 | AC_SUBST(EOG_LIBS) |
---|
143 | |
---|
144 | ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`" |
---|
145 | AC_SUBST(ORBIT_IDL) |
---|
146 | |
---|
147 | BONOBO_IDLDIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`" |
---|
148 | AC_SUBST(BONOBO_IDLDIR) |
---|
149 | |
---|
150 | BONOBO_ACT_IDLDIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`" |
---|
151 | AC_SUBST(BONOBO_ACT_IDLDIR) |
---|
152 | |
---|
153 | |
---|
154 | dnl |
---|
155 | dnl ****************************** |
---|
156 | dnl Image Libraries |
---|
157 | dnl ****************************** |
---|
158 | jpeg_ok=no |
---|
159 | dnl Test for libjpeg |
---|
160 | if test -z "$LIBJPEG"; then |
---|
161 | AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, |
---|
162 | jpeg_ok=yes, |
---|
163 | jpeg_ok=no |
---|
164 | AC_MSG_WARN(*** JPEG saving code will not be built (JPEG library not found) ***)) |
---|
165 | if test "$jpeg_ok" = yes; then |
---|
166 | AC_MSG_CHECKING([for jpeglib.h]) |
---|
167 | AC_TRY_CPP( |
---|
168 | [#include <stdio.h> |
---|
169 | #undef PACKAGE |
---|
170 | #undef VERSION |
---|
171 | #undef HAVE_STDDEF_H |
---|
172 | #undef HAVE_STDLIB_H |
---|
173 | #include <jpeglib.h>], |
---|
174 | jpeg_ok=yes, |
---|
175 | jpeg_ok=no) |
---|
176 | AC_MSG_RESULT($jpeg_ok) |
---|
177 | if test "$jpeg_ok" = yes; then |
---|
178 | LIBJPEG='-ljpeg' |
---|
179 | AC_CHECK_LIB(jpeg, jpeg_simple_progression, |
---|
180 | AC_DEFINE(HAVE_PROGRESSIVE_JPEG), |
---|
181 | AC_MSG_WARN(JPEG library does not support progressive saving.)) |
---|
182 | else |
---|
183 | AC_MSG_WARN(*** JPEG saving code will not be built (JPEG header file not found) ***) |
---|
184 | fi |
---|
185 | fi |
---|
186 | fi |
---|
187 | if test "x$jpeg_ok" = "xyes" ; then |
---|
188 | AC_DEFINE(HAVE_JPEG) |
---|
189 | fi |
---|
190 | |
---|
191 | png_ok=no |
---|
192 | dnl Test for libpng |
---|
193 | if test -z "$LIBPNG"; then |
---|
194 | AC_CHECK_LIB(png, png_read_info, |
---|
195 | [ AC_CHECK_HEADER(png.h, |
---|
196 | png_ok=yes, |
---|
197 | png_ok=no) ], |
---|
198 | AC_MSG_WARN(*** PNG saving code will not be built (PNG library not found) ***), -lz -lm) |
---|
199 | if test "$png_ok" = yes; then |
---|
200 | AC_MSG_CHECKING([for png_structp in png.h]) |
---|
201 | AC_TRY_COMPILE([#include <png.h>], |
---|
202 | [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;], |
---|
203 | png_ok=yes, |
---|
204 | png_ok=no) |
---|
205 | AC_MSG_RESULT($png_ok) |
---|
206 | if test "$png_ok" = yes; then |
---|
207 | PNG='png'; LIBPNG='-lpng -lz' |
---|
208 | else |
---|
209 | AC_MSG_WARN(*** PNG saving code will not be built (PNG library is too old) ***) |
---|
210 | fi |
---|
211 | else |
---|
212 | AC_MSG_WARN(*** PNG saving code will not be built (PNG header file not found) ***) |
---|
213 | fi |
---|
214 | fi |
---|
215 | if test "x$png_ok" = "xyes" ; then |
---|
216 | AC_DEFINE(HAVE_PNG) |
---|
217 | fi |
---|
218 | |
---|
219 | AC_SUBST(LIBJPEG) |
---|
220 | AC_SUBST(LIBPNG) |
---|
221 | |
---|
222 | AC_CHECK_LIB(popt, poptGetArgs, [POPT_LIBS="-lpopt"], |
---|
223 | AC_MSG_ERROR([popt is required to build eog. |
---|
224 | You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])) |
---|
225 | AC_SUBST(POPT_LIBS) |
---|
226 | |
---|
227 | dnl ****************************** |
---|
228 | dnl More compiler warnings |
---|
229 | dnl ****************************** |
---|
230 | |
---|
231 | AC_ARG_ENABLE(more-warnings, |
---|
232 | [ --enable-more-warnings Maximum compiler warnings], |
---|
233 | set_more_warnings="$enableval",[set_more_warnings=no]) |
---|
234 | warning_flags= |
---|
235 | realsave_CFLAGS="$CFLAGS" |
---|
236 | AC_MSG_CHECKING(for more warnings, including -Werror) |
---|
237 | if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then |
---|
238 | AC_MSG_RESULT(yes) |
---|
239 | warning_flags="-Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Werror" |
---|
240 | CFLAGS="$warning_flags $CFLAGS" |
---|
241 | |
---|
242 | for option in -Wsign-promo -Wno-sign-compare; do |
---|
243 | SAVE_CFLAGS="$CFLAGS" |
---|
244 | CFLAGS="$CFLAGS $option" |
---|
245 | AC_MSG_CHECKING([whether gcc understands $option]) |
---|
246 | AC_TRY_COMPILE([], [], |
---|
247 | has_option=yes, |
---|
248 | has_option=no,) |
---|
249 | CFLAGS="$SAVE_CFLAGS" |
---|
250 | AC_MSG_RESULT($has_option) |
---|
251 | if test $has_option = yes; then |
---|
252 | warning_flags="$warning_flags $option" |
---|
253 | fi |
---|
254 | unset has_option |
---|
255 | unset SAVE_CFLAGS |
---|
256 | done |
---|
257 | unset option |
---|
258 | else |
---|
259 | AC_MSG_RESULT(no) |
---|
260 | fi |
---|
261 | CFLAGS="$realsave_CFLAGS" |
---|
262 | EXTRA_WARNING_CFLAGS=" \ |
---|
263 | -DG_DISABLE_DEPRECATED \ |
---|
264 | -DGDK_DISABLE_DEPRECATED \ |
---|
265 | -DGDK_PIXBUF_DISABLE_DEPRECATED \ |
---|
266 | -DGTK_DISABLE_DEPRECATED \ |
---|
267 | -DGNOME_DISABLE_DEPRECATED \ |
---|
268 | $warning_flags" |
---|
269 | AC_SUBST(EXTRA_WARNING_CFLAGS) |
---|
270 | |
---|
271 | AC_OUTPUT([ |
---|
272 | Makefile |
---|
273 | eog.spec |
---|
274 | art/Makefile |
---|
275 | libeog/Makefile |
---|
276 | libeog/cursors/Makefile |
---|
277 | collection/Makefile |
---|
278 | viewer/Makefile |
---|
279 | idl/Makefile |
---|
280 | help/Makefile |
---|
281 | help/C/Makefile |
---|
282 | shell/Makefile |
---|
283 | po/Makefile.in |
---|
284 | omf-install/Makefile |
---|
285 | ]) |
---|
286 | |
---|
287 | |
---|
288 | |
---|
289 | echo " |
---|
290 | Configuration: |
---|
291 | |
---|
292 | Source code location: ${srcdir} |
---|
293 | Compiler: ${CC} |
---|
294 | |
---|
295 | Extra Compiler Warnings: ${EXTRA_WARNING_CFLAGS} |
---|
296 | |
---|
297 | Build collection view (experimental): ${collection} |
---|
298 | Use libpreview: ${libpreview} |
---|
299 | " |
---|