1 | AC_INIT(eel) |
---|
2 | |
---|
3 | dnl =========================================================================== |
---|
4 | |
---|
5 | ART_REQUIRED=2.3.8 |
---|
6 | GCONF_REQUIRED=1.1.11 |
---|
7 | GDK_PIXBUF_REQUIRED=2 |
---|
8 | GLIB_REQUIRED=2 |
---|
9 | GNOME_REQUIRED=2.0 |
---|
10 | GNOME_UI_REQUIRED=2.7.92 |
---|
11 | GNOME_VFS_REQUIRED=2.7.91 |
---|
12 | GTK_REQUIRED=2.3.0 |
---|
13 | POPT_REQUIRED=1.5 |
---|
14 | XML_REQUIRED=2.4.7 |
---|
15 | GAIL_REQUIRED=0.16 |
---|
16 | LIBGLADE_REQUIRED=2.0.0 |
---|
17 | |
---|
18 | AC_SUBST(ART_REQUIRED) |
---|
19 | AC_SUBST(GCONF_REQUIRED) |
---|
20 | AC_SUBST(GDK_PIXBUF_REQUIRED) |
---|
21 | AC_SUBST(GLIB_REQUIRED) |
---|
22 | AC_SUBST(GNOME_REQUIRED) |
---|
23 | AC_SUBST(GNOME_UI_REQUIRED) |
---|
24 | AC_SUBST(GNOME_VFS_REQUIRED) |
---|
25 | AC_SUBST(GTK_REQUIRED) |
---|
26 | AC_SUBST(POPT_REQUIRED) |
---|
27 | AC_SUBST(XML_REQUIRED) |
---|
28 | AC_SUBST(GAIL_REQUIRED) |
---|
29 | AC_SUBST(LIBGLADE_REQUIRED) |
---|
30 | |
---|
31 | dnl =========================================================================== |
---|
32 | |
---|
33 | EEL_MAJOR_VERSION=2 |
---|
34 | EEL_MINOR_VERSION=8 |
---|
35 | EEL_MICRO_VERSION=2 |
---|
36 | # If you need a modifier for the version number. |
---|
37 | # Normally empty, but can be used to make "fixup" releases. |
---|
38 | LIBGNOMEVFS_EXTRAVERSION= |
---|
39 | |
---|
40 | EEL_VERSION=$EEL_MAJOR_VERSION.$EEL_MINOR_VERSION.$EEL_MICRO_VERSION$LIBGNOMEVFS_EXTRAVERSION |
---|
41 | EEL_VERSION_INFO=`expr $EEL_MAJOR_VERSION + $EEL_MINOR_VERSION`:$EEL_MICRO_VERSION:$EEL_MINOR_VERSION |
---|
42 | |
---|
43 | AC_SUBST(EEL_MAJOR_VERSION) |
---|
44 | AC_SUBST(EEL_MINOR_VERSION) |
---|
45 | AC_SUBST(EEL_MICRO_VERSION) |
---|
46 | AC_SUBST(EEL_VERSION) |
---|
47 | AC_SUBST(EEL_VERSION_INFO) |
---|
48 | |
---|
49 | VERSION=$EEL_VERSION |
---|
50 | |
---|
51 | AM_INIT_AUTOMAKE(eel, $VERSION) |
---|
52 | AM_CONFIG_HEADER(config.h) |
---|
53 | |
---|
54 | AM_MAINTAINER_MODE |
---|
55 | |
---|
56 | AC_ISC_POSIX |
---|
57 | AC_PROG_CC |
---|
58 | AC_PROG_CPP |
---|
59 | AC_PROG_AWK |
---|
60 | AM_DISABLE_STATIC |
---|
61 | AC_LIBTOOL_WIN32_DLL |
---|
62 | AM_PROG_LIBTOOL |
---|
63 | AC_STDC_HEADERS |
---|
64 | AM_SANITY_CHECK |
---|
65 | AC_PROG_INSTALL |
---|
66 | AC_PROG_LN_S |
---|
67 | AC_PROG_MAKE_SET |
---|
68 | AC_C_CONST |
---|
69 | AC_C_BIGENDIAN |
---|
70 | |
---|
71 | PKG_CHECK_MODULES(EEL, [ |
---|
72 | gail >= $GAIL_REQUIRED |
---|
73 | gconf-2.0 >= $GCONF_REQUIRED |
---|
74 | gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED |
---|
75 | glib-2.0 >= $GLIB_REQUIRED |
---|
76 | gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED |
---|
77 | gnome-vfs-module-2.0 >= $GNOME_VFS_REQUIRED |
---|
78 | gthread-2.0 >= $GLIB_REQUIRED |
---|
79 | gtk+-2.0 >= $GTK_REQUIRED |
---|
80 | libart-2.0 >= $ART_REQUIRED |
---|
81 | libglade-2.0 >= $LIBGLADE_REQUIRED |
---|
82 | libgnome-2.0 >= $GNOME_REQUIRED |
---|
83 | libgnomeui-2.0 >= $GNOME_UI_REQUIRED |
---|
84 | libxml-2.0 >= $XML_REQUIRED |
---|
85 | ]) |
---|
86 | AC_SUBST(EEL_CFLAGS) |
---|
87 | AC_SUBST(EEL_LIBS) |
---|
88 | |
---|
89 | dnl =========================================================================== |
---|
90 | |
---|
91 | dnl strftime checks |
---|
92 | |
---|
93 | AC_TRY_RUN([#include <time.h> |
---|
94 | int main () |
---|
95 | { |
---|
96 | char buf[100]; |
---|
97 | struct tm tm = {0}; |
---|
98 | tm.tm_year = 99; |
---|
99 | if (strftime(buf, 100, "%EY", &tm) == 4 && |
---|
100 | strcmp (buf, "1999")==0) |
---|
101 | return 0; |
---|
102 | return 1; |
---|
103 | } |
---|
104 | ], |
---|
105 | AC_DEFINE(HAVE_STRFTIME_EXTENSION, 1, [Define if strftime supports %E and %O modifiers.]) |
---|
106 | ) |
---|
107 | |
---|
108 | dnl =========================================================================== |
---|
109 | |
---|
110 | dnl X development libraries check |
---|
111 | |
---|
112 | # |
---|
113 | # If Pango included the shared library dependencies from X11 in |
---|
114 | # the pkg-config output, then we use that (to avoid duplicates). |
---|
115 | # but if they were omitted to avoid binary compatibility problems |
---|
116 | # then we need to repeat the checks. |
---|
117 | # |
---|
118 | if $PKG_CONFIG --exists pangoxft ; then |
---|
119 | PANGO_PACKAGES="pangox pangoxft" |
---|
120 | else |
---|
121 | PANGO_PACKAGES="pangox" |
---|
122 | fi |
---|
123 | |
---|
124 | x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`" |
---|
125 | case x_libs in |
---|
126 | *-lX11*) pango_omitted_x_deps=no ;; |
---|
127 | *) pango_omitted_x_deps=yes ;; |
---|
128 | esac |
---|
129 | |
---|
130 | if test $pango_omitted_x_deps = yes ; then |
---|
131 | AC_PATH_XTRA |
---|
132 | |
---|
133 | if test x$no_x = xyes ; then |
---|
134 | AC_MSG_ERROR([X development libraries not found]) |
---|
135 | else |
---|
136 | X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" |
---|
137 | fi |
---|
138 | fi |
---|
139 | |
---|
140 | AC_SUBST(X_LIBS) |
---|
141 | |
---|
142 | dnl =========================================================================== |
---|
143 | |
---|
144 | ALL_LINGUAS="am ang ar az be bg bn br 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 li lt lv mk ml mn mr ms nb ne nl nn no or pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta th tr uk vi wa zh_CN zh_TW" |
---|
145 | |
---|
146 | GETTEXT_PACKAGE=eel-2.0 |
---|
147 | AC_SUBST(GETTEXT_PACKAGE) |
---|
148 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE") |
---|
149 | AC_DEFINE_UNQUOTED(GNOME_EXPLICIT_TRANSLATION_DOMAIN, "$GETTEXT_PACKAGE") |
---|
150 | |
---|
151 | AM_GLIB_GNU_GETTEXT |
---|
152 | |
---|
153 | # AM_GNOME2_GETTEXT above substs $DATADIRNAME |
---|
154 | # this is the directory where the *.{mo,gmo} files are installed |
---|
155 | gnomelocaledir='${prefix}/${DATADIRNAME}/locale' |
---|
156 | AC_SUBST(gnomelocaledir) |
---|
157 | |
---|
158 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
159 | |
---|
160 | dnl =========================================================================== |
---|
161 | |
---|
162 | AC_PROG_AWK |
---|
163 | AC_CHECK_PROGS(PERL, perl5 perl) |
---|
164 | AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) |
---|
165 | |
---|
166 | dnl =========================================================================== |
---|
167 | |
---|
168 | ENABLE_PROFILER= |
---|
169 | AC_ARG_ENABLE(profiler, |
---|
170 | [ --enable-profiler Enable profiler], |
---|
171 | ENABLE_PROFILER=1 |
---|
172 | AC_DEFINE(ENABLE_PROFILER)) |
---|
173 | |
---|
174 | if test "x$ENABLE_PROFILER" = "x1" |
---|
175 | then |
---|
176 | CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES" |
---|
177 | LDFLAGS="/gnome/PROFILE/lib/libprofiler.so -lpthread" |
---|
178 | fi |
---|
179 | |
---|
180 | AC_SUBST(ENABLE_PROFILER) |
---|
181 | AM_CONDITIONAL(ENABLE_PROFILER, test "x$ENABLE_PROFILER" = "x1") |
---|
182 | |
---|
183 | dnl =========================================================================== |
---|
184 | |
---|
185 | AC_CHECK_LIB(popt, poptParseArgvString, [POPT_LIBS="-lpopt"]) |
---|
186 | AC_SUBST(POPT_LIBS) |
---|
187 | |
---|
188 | dnl =========================================================================== |
---|
189 | |
---|
190 | AC_CHECK_FUNCS(setenv unsetenv putenv) |
---|
191 | |
---|
192 | dnl =========================================================================== |
---|
193 | |
---|
194 | |
---|
195 | # |
---|
196 | # Checks for Xft/XRender |
---|
197 | # |
---|
198 | have_render=false |
---|
199 | RENDER_LIBS="" |
---|
200 | |
---|
201 | AC_CHECK_LIB(Xrender, XRenderFindFormat, |
---|
202 | have_render=true,:,-lXext $EEL_LIBS) |
---|
203 | |
---|
204 | if $have_render ; then |
---|
205 | RENDER_LIBS="-lXrender -lXext" |
---|
206 | AC_DEFINE(HAVE_RENDER) |
---|
207 | fi |
---|
208 | |
---|
209 | AC_SUBST(RENDER_LIBS) |
---|
210 | |
---|
211 | |
---|
212 | dnl =========================================================================== |
---|
213 | |
---|
214 | dnl Turn on the additional warnings last, so -Werror doesn't affect other tests. |
---|
215 | |
---|
216 | AC_ARG_ENABLE(more-warnings, |
---|
217 | [ --enable-more-warnings Maximum compiler warnings], |
---|
218 | set_more_warnings="$enableval",[ |
---|
219 | if test -f $srcdir/CVSVERSION; then |
---|
220 | is_cvs_version=true |
---|
221 | set_more_warnings=yes |
---|
222 | else |
---|
223 | set_more_warnings=no |
---|
224 | fi |
---|
225 | ]) |
---|
226 | AC_MSG_CHECKING(for more warnings, including -Werror) |
---|
227 | if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then |
---|
228 | AC_MSG_RESULT(yes) |
---|
229 | CFLAGS="\ |
---|
230 | -Wall \ |
---|
231 | -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \ |
---|
232 | -Wnested-externs -Wpointer-arith \ |
---|
233 | -Wsign-compare \ |
---|
234 | -Werror \ |
---|
235 | $CFLAGS" |
---|
236 | |
---|
237 | for option in -Wno-strict-aliasing -Wno-sign-compare; do |
---|
238 | SAVE_CFLAGS="$CFLAGS" |
---|
239 | CFLAGS="$CFLAGS $option" |
---|
240 | AC_MSG_CHECKING([whether gcc understands $option]) |
---|
241 | AC_TRY_COMPILE([], [], |
---|
242 | has_option=yes, |
---|
243 | has_option=no,) |
---|
244 | if test $has_option = no; then |
---|
245 | CFLAGS="$SAVE_CFLAGS" |
---|
246 | fi |
---|
247 | AC_MSG_RESULT($has_option) |
---|
248 | unset has_option |
---|
249 | unset SAVE_CFLAGS |
---|
250 | done |
---|
251 | unset option |
---|
252 | else |
---|
253 | AC_MSG_RESULT(no) |
---|
254 | fi |
---|
255 | |
---|
256 | dnl =========================================================================== |
---|
257 | |
---|
258 | AC_OUTPUT([ |
---|
259 | Makefile |
---|
260 | eel-2.0.pc |
---|
261 | eel-2.0-uninstalled.pc |
---|
262 | eel.spec |
---|
263 | eel/Makefile |
---|
264 | eel/eel-features.h |
---|
265 | po/Makefile.in |
---|
266 | test/Makefile |
---|
267 | ]) |
---|