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.8.2) |
---|
8 | |
---|
9 | dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work |
---|
10 | AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS") |
---|
11 | |
---|
12 | AM_MAINTAINER_MODE |
---|
13 | |
---|
14 | dnl ================= Requirements ================================================ |
---|
15 | |
---|
16 | GNOME_VFS_REQUIRED=2.5.91 |
---|
17 | LIBGNOMEUI_REQUIRED=2.5.92 |
---|
18 | LIBGLADE_REQUIRED=2.3.6 |
---|
19 | GDKPIXBUF_REQUIRED=2.4.0 |
---|
20 | LIBEXIF_REQUIRED=0.5.12 |
---|
21 | LIBGNOMECANVAS_REQUIRED=2.5.92 |
---|
22 | GCONF_REQUIRED=2.5.90 |
---|
23 | LIBART_REQUIRED=2.3.16 |
---|
24 | GTK_REQUIRED=2.4.0 |
---|
25 | |
---|
26 | dnl =============================================================================== |
---|
27 | |
---|
28 | AC_PROG_CC |
---|
29 | AC_ISC_POSIX |
---|
30 | AC_HEADER_STDC |
---|
31 | AC_ARG_PROGRAM |
---|
32 | AC_PROG_RANLIB |
---|
33 | |
---|
34 | dnl ================= translation ============================================= |
---|
35 | |
---|
36 | GETTEXT_PACKAGE=eog |
---|
37 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE") |
---|
38 | AC_SUBST(GETTEXT_PACKAGE) |
---|
39 | |
---|
40 | ALL_LINGUAS="af am ar az be bg bn bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu id is it ja kn ko lt lv mk ml mn ms nb ne nl nn no nso or pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta th tk tr uk vi wa zh_CN zh_TW zu" |
---|
41 | AM_GLIB_GNU_GETTEXT |
---|
42 | AC_PROG_INTLTOOL |
---|
43 | |
---|
44 | dnl =============================================================================== |
---|
45 | |
---|
46 | GNOME_COMPILE_WARNINGS(yes) |
---|
47 | |
---|
48 | AC_SUBST(CFLAGS) |
---|
49 | AC_SUBST(CPPFLAGS) |
---|
50 | AC_SUBST(LDFLAGS) |
---|
51 | |
---|
52 | dnl ================= gnome libs check ==================================== |
---|
53 | |
---|
54 | EOG_MODULES="gtk+-2.0 >= $GTK_REQUIRED gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED libart-2.0 >= $LIBART_REQUIRED" |
---|
55 | |
---|
56 | dnl ============== optional exif support ==================== |
---|
57 | |
---|
58 | AC_ARG_WITH(libexif, [ --without-libexif disable special EXIF support]) |
---|
59 | have_exif=no |
---|
60 | have_old_libexif=no |
---|
61 | if test x$with_libexif != xno; then |
---|
62 | PKG_CHECK_MODULES(EXIF, libexif >= $LIBEXIF_REQUIRED, have_exif=yes, have_exif=no) |
---|
63 | PKG_CHECK_MODULES(EXIF, libexif = $LIBEXIF_REQUIRED, have_old_libexif=yes, have_old_libexif=no) |
---|
64 | fi |
---|
65 | |
---|
66 | if test "x$have_exif" = "xyes"; then |
---|
67 | AC_DEFINE(HAVE_EXIF,1) |
---|
68 | EOG_MODULES="$EOG_MODULES libexif >= $LIBEXIF_REQUIRED" |
---|
69 | fi |
---|
70 | |
---|
71 | if test "x$have_old_libexif" = "xyes"; then |
---|
72 | AC_DEFINE(HAVE_OLD_LIBEXIF,1) |
---|
73 | EOG_MODULES="$EOG_MODULES libexif = $LIBEXIF_REQUIRED" |
---|
74 | fi |
---|
75 | |
---|
76 | dnl ============== semi optional libjpeg support ==================== |
---|
77 | AC_ARG_WITH(libjpeg, [ --without-libjpeg disable special JPEG support]) |
---|
78 | have_jpeg=no |
---|
79 | if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then |
---|
80 | AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, |
---|
81 | have_jpeg=yes, |
---|
82 | have_jpeg=no |
---|
83 | AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***)) |
---|
84 | if test "$have_jpeg" = yes; then |
---|
85 | AC_MSG_CHECKING([for jpeglib.h]) |
---|
86 | AC_TRY_CPP( |
---|
87 | [#include <stdio.h> |
---|
88 | #undef PACKAGE |
---|
89 | #undef VERSION |
---|
90 | #undef HAVE_STDLIB_H |
---|
91 | #include <jpeglib.h>], |
---|
92 | have_jpeg=yes, |
---|
93 | have_jpeg=no) |
---|
94 | AC_MSG_RESULT($have_jpeg) |
---|
95 | if test "$have_jpeg" = yes; then |
---|
96 | LIBJPEG='-ljpeg' |
---|
97 | AC_DEFINE(HAVE_JPEG, 1) |
---|
98 | AC_DEFINE(HAVE_LIBJPEG, 1) |
---|
99 | AC_CHECK_LIB(jpeg, jpeg_simple_progression, |
---|
100 | AC_DEFINE(HAVE_PROGRESSIVE_JPEG), |
---|
101 | AC_MSG_WARN(JPEG library does not support progressive saving.)) |
---|
102 | else |
---|
103 | AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***) |
---|
104 | fi |
---|
105 | fi |
---|
106 | fi |
---|
107 | |
---|
108 | if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then |
---|
109 | AC_MSG_ERROR([ |
---|
110 | *** Checks for JPEG loader failed. You can build without it by passing |
---|
111 | *** --without-libjpeg to configure but some programs using GTK+ may |
---|
112 | *** not work properly]) |
---|
113 | fi |
---|
114 | AC_SUBST(LIBJPEG) |
---|
115 | AM_CONDITIONAL(ENABLE_JPEG, test x$have_jpeg = xyes) |
---|
116 | |
---|
117 | dnl ============ CFLAGS & LIBS initialization =============== |
---|
118 | |
---|
119 | PKG_CHECK_MODULES(EOG, $EOG_MODULES) |
---|
120 | AC_SUBST(EOG_CFLAGS) |
---|
121 | AC_SUBST(EOG_LIBS) |
---|
122 | |
---|
123 | # glib-genmarshal |
---|
124 | AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) |
---|
125 | |
---|
126 | dnl ================= GConf ================================================= |
---|
127 | |
---|
128 | AC_PATH_PROG(GCONFTOOL, gconftool-2) |
---|
129 | AM_GCONF_SOURCE_2 |
---|
130 | |
---|
131 | dnl ****************************************************** |
---|
132 | dnl X development libraries check |
---|
133 | dnl ****************************************************** |
---|
134 | # |
---|
135 | # If Pango included the shared library dependencies from X11 in |
---|
136 | # the pkg-config output, then we use that (to avoid duplicates). |
---|
137 | # but if they were omitted to avoid binary compatibility problems |
---|
138 | # then we need to repeat the checks. |
---|
139 | # |
---|
140 | if $PKG_CONFIG --exists pangoxft ; then |
---|
141 | PANGO_PACKAGES="pangox pangoxft" |
---|
142 | else |
---|
143 | PANGO_PACKAGES="pangox" |
---|
144 | fi |
---|
145 | |
---|
146 | x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`" |
---|
147 | case x_libs in |
---|
148 | *-lX11*) pango_omitted_x_deps=no ;; |
---|
149 | *) pango_omitted_x_deps=yes ;; |
---|
150 | esac |
---|
151 | |
---|
152 | if test $pango_omitted_x_deps = yes ; then |
---|
153 | AC_PATH_XTRA |
---|
154 | |
---|
155 | if test x$no_x = xyes ; then |
---|
156 | AC_MSG_ERROR([X development libraries not found]) |
---|
157 | else |
---|
158 | X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" |
---|
159 | fi |
---|
160 | fi |
---|
161 | |
---|
162 | AC_SUBST(X_LIBS) |
---|
163 | |
---|
164 | dnl ****************************************************** |
---|
165 | dnl Check for Sunkeysym.h |
---|
166 | dnl ****************************************************** |
---|
167 | AC_CHECK_HEADERS(X11/Sunkeysym.h, AC_DEFINE(HAVE_SUNKEYSYM_H)) |
---|
168 | |
---|
169 | dnl ================= popt =============================== |
---|
170 | |
---|
171 | AC_CHECK_LIB(popt, poptGetArgs, [POPT_LIBS="-lpopt"], |
---|
172 | AC_MSG_ERROR([popt is required to build eog. |
---|
173 | You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])) |
---|
174 | AC_SUBST(POPT_LIBS) |
---|
175 | |
---|
176 | AC_OUTPUT([ |
---|
177 | Makefile |
---|
178 | eog.spec |
---|
179 | art/Makefile |
---|
180 | libeog/Makefile |
---|
181 | libeog/cursors/Makefile |
---|
182 | jpegutils/Makefile |
---|
183 | help/Makefile |
---|
184 | help/C/Makefile |
---|
185 | help/de/Makefile |
---|
186 | help/es/Makefile |
---|
187 | help/eu/Makefile |
---|
188 | help/fr/Makefile |
---|
189 | help/it/Makefile |
---|
190 | help/sv/Makefile |
---|
191 | help/ja/Makefile |
---|
192 | help/ko/Makefile |
---|
193 | help/zh_CN/Makefile |
---|
194 | help/zh_TW/Makefile |
---|
195 | shell/Makefile |
---|
196 | shell/recent-files/Makefile |
---|
197 | po/Makefile.in |
---|
198 | ]) |
---|
199 | |
---|
200 | |
---|
201 | |
---|
202 | echo " |
---|
203 | Configuration: |
---|
204 | |
---|
205 | Source code location: ${srcdir} |
---|
206 | Compiler: ${CC} |
---|
207 | |
---|
208 | Extra Compiler Warnings: ${WARN_CFLAGS} |
---|
209 | Special EXIF support: ${have_exif} |
---|
210 | Use libexif = 0.5.12: ${have_old_libexif} |
---|
211 | Special JPEG support: ${have_jpeg} |
---|
212 | " |
---|