source: trunk/third/eog/configure.in @ 19173

Revision 19173, 8.7 KB checked in by ghudson, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r19172, which included commits to RCS files with non-trunk default branches.
Line 
1dnl Configure script for the Eye of Gnome image viewer
2
3AC_INIT(shell/main.c)
4
5AM_CONFIG_HEADER(config.h)
6
7AM_INIT_AUTOMAKE(eog, 2.2.2)
8
9AM_MAINTAINER_MODE
10
11GNOME_PLATFORM_GNOME_2(yes)
12
13dnl ================= Requirements ================================================
14
15GNOME_VFS_REQUIRED=2.0.4
16LIBGNOMEUI_REQUIRED=2.0.6
17LIBBONOBOUI_REQUIRED=2.0.3
18BONOBO_ACTIVATION_REQUIRED=1.0.3
19LIBRSVG_REQUIRED=2.0.1
20LIBGLADE_REQUIRED=2.0.1
21EEL_REQUIRED=2.2.0
22
23dnl ===============================================================================
24
25AC_PROG_CC
26AC_ISC_POSIX
27AC_HEADER_STDC
28AC_ARG_PROGRAM
29AC_PROG_RANLIB
30
31GNOME_COMPILE_WARNINGS
32
33dnl ================= Translation Stuf ==============================================
34
35GETTEXT_PACKAGE=eog
36AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
37AC_SUBST(GETTEXT_PACKAGE)
38
39ALL_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"
40AM_GLIB_GNU_GETTEXT
41AC_PROG_INTLTOOL
42
43dnl ===============================================================================
44
45AC_SUBST(CFLAGS)
46AC_SUBST(CPPFLAGS)
47AC_SUBST(LDFLAGS)
48
49# glib-genmarshal
50AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
51
52AC_PATH_PROG(GCONFTOOL, gconftool-2)
53dnl Specify the gconf configuration source,
54dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults
55
56GCONF_CONFIG_SOURCE=
57
58AC_ARG_ENABLE(gconf-source, [  --enable-gconf-source=sourceaddress Where to install schema files.], GCONF_CONFIG_SOURCE=$enable_gconf_source,)
59if test "x$GCONF_CONFIG_SOURCE" = "x"; then
60        GCONF_CONFIG_SOURCE="xml::\${sysconfdir}/gconf/gconf.xml.defaults"
61fi
62
63AC_SUBST(GCONF_CONFIG_SOURCE)
64AC_SUBST(INSTALL_GCONF_CONFIG_SOURCE)
65
66dnl ******************************************************
67dnl Check if the collection component should be build
68dnl ******************************************************
69collection=no
70AC_ARG_ENABLE(collection,
71             [  --enable-collection     Build collection component.],
72             if test x$enableval = xyes; then
73                     collection=yes
74             fi)
75AM_CONDITIONAL(ENABLE_COLLECTION, test x$collection = xyes)
76
77dnl ******************************************************
78dnl Check if we have libpreview when the collection is desired
79dnl ******************************************************
80
81libpreview=no
82if 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)
87fi
88AM_CONDITIONAL(ENABLE_LIBPREVIEW, test x$libpreview = xyes)
89
90dnl *******************************************************
91dnl Check for evolution
92dnl *******************************************************
93dnl --> Reenable this if evolution is ported to gnome 2 <--
94dnl *******************************************************
95dnl  try_evolution=false
96dnl  evolution=no
97dnl  AC_ARG_WITH(evolution,
98dnl          [  --{with,without}-evolution          Use evolution to send images.],
99dnl          if test x$withval = xno; then
100dnl                  try_evolution=false
101dnl          fi
102dnl  )
103dnl  try_evolution=false
104dnl  if $try_evolution; then
105dnl          path_to_composer_idl=`gnome-config --datadir`/idl/Evolution-Composer.idl
106dnl          AC_CHECK_FILE($path_to_composer_idl, evolution=yes, evolution=no)
107dnl          if test x"$evolution" = "xyes"; then
108dnl                  AC_DEFINE(ENABLE_EVOLUTION)
109dnl          fi
110dnl  fi
111evolution=no
112AM_CONDITIONAL(ENABLE_EVOLUTION, false)
113
114dnl *******************************************************
115dnl Check for GnoCam
116dnl *******************************************************
117dnl --> Reenable this if GnoCam is ported to gnome 2 and
118dnl     someone has tested this <--
119dnl *******************************************************
120dnl  try_gnocam=true
121dnl  gnocam=no
122dnl  AC_ARG_WITH(gnocam,
123dnl          [  --{with,without}-gnocam             Use gnocam to acquire images.],
124dnl          if test x$withval = xno; then
125dnl                  try_gnocam=false
126dnl          fi
127dnl  )
128dnl  if $try_gnocam; then
129dnl          path_to_gnocam_idl=`gnome-config --datadir`/idl/GnoCam.idl
130dnl          AC_CHECK_FILE($path_to_gnocam_idl, gnocam=yes, gnocam=no)
131dnl          if test x"$gnocam" = "xyes"; then
132dnl                  AC_DEFINE(ENABLE_GNOCAM)
133dnl          fi
134dnl  fi
135dnl  AM_CONDITIONAL(ENABLE_GNOCAM, test x"$gnocam" = "xyes")
136gnocam=no
137AM_CONDITIONAL(ENABLE_GNOCAM, false)
138
139EOG_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"
140PKG_CHECK_MODULES(EOG, $EOG_MODULES)
141AC_SUBST(EOG_CFLAGS)
142AC_SUBST(EOG_LIBS)
143
144ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
145AC_SUBST(ORBIT_IDL)
146
147BONOBO_IDLDIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
148AC_SUBST(BONOBO_IDLDIR)
149
150BONOBO_ACT_IDLDIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
151AC_SUBST(BONOBO_ACT_IDLDIR)
152
153
154dnl
155dnl ******************************
156dnl Image Libraries
157dnl ******************************
158jpeg_ok=no
159dnl 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
187if test "x$jpeg_ok" = "xyes" ; then
188  AC_DEFINE(HAVE_JPEG)
189fi
190
191png_ok=no
192dnl 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
215if test "x$png_ok" = "xyes" ; then
216  AC_DEFINE(HAVE_PNG)
217fi
218
219AC_SUBST(LIBJPEG)
220AC_SUBST(LIBPNG)
221
222AC_CHECK_LIB(popt, poptGetArgs, [POPT_LIBS="-lpopt"],
223AC_MSG_ERROR([popt is required to build eog.
224You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))
225AC_SUBST(POPT_LIBS)
226
227dnl ******************************
228dnl More compiler warnings
229dnl ******************************
230
231AC_ARG_ENABLE(more-warnings,
232[  --enable-more-warnings  Maximum compiler warnings],
233set_more_warnings="$enableval",[set_more_warnings=no])
234warning_flags=
235realsave_CFLAGS="$CFLAGS"
236AC_MSG_CHECKING(for more warnings, including -Werror)
237if 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
258else
259        AC_MSG_RESULT(no)
260fi
261CFLAGS="$realsave_CFLAGS"
262EXTRA_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"
269AC_SUBST(EXTRA_WARNING_CFLAGS)
270
271AC_OUTPUT([
272Makefile
273eog.spec
274art/Makefile
275libeog/Makefile
276libeog/cursors/Makefile
277collection/Makefile
278viewer/Makefile
279idl/Makefile
280help/Makefile
281help/C/Makefile
282shell/Makefile
283po/Makefile.in
284omf-install/Makefile
285])
286
287
288
289echo "
290Configuration:
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"
Note: See TracBrowser for help on using the repository browser.