1 AC_INIT(Empathy, 2.27.90, http://bugzilla.gnome.org/browse.cgi?product=empathy)
4 Copyright (C) 2003-2007 Imendio AB
5 Copyright (C) 2007-2008 Collabora Ltd.
8 # LT Version numbers, remember to change them just *before* a release.
9 # (Interfaces removed: CURRENT++, AGE=0, REVISION=0)
10 # (Interfaces added: CURRENT++, AGE++, REVISION=0)
11 # (No interfaces changed: REVISION++)
16 LIBEMPATHY_GTK_CURRENT=26
18 LIBEMPATHY_GTK_REVISION=0
20 AC_SUBST(LIBEMPATHY_CURRENT)
21 AC_SUBST(LIBEMPATHY_AGE)
22 AC_SUBST(LIBEMPATHY_REVISION)
23 AC_SUBST(LIBEMPATHY_GTK_CURRENT)
24 AC_SUBST(LIBEMPATHY_GTK_AGE)
25 AC_SUBST(LIBEMPATHY_GTK_REVISION)
27 # Minimal version required
31 LIBPANELAPPLET_REQUIRED=2.10.0
32 TELEPATHY_GLIB_REQUIRED=0.7.31
33 ENCHANT_REQUIRED=1.2.0
34 ISO_CODES_REQUIRED=0.35
35 LIBNOTIFY_REQUIRED=0.4.4
36 LIBCANBERRA_GTK_REQUIRED=0.4
37 LIBCHAMPLAIN_REQUIRED=0.3.3
38 LIBCHAMPLAIN_GTK_REQUIRED=0.3.3
39 CLUTTER_GTK_REQUIRED=0.8.2
42 NETWORK_MANAGER_REQUIRED=0.7.0
44 # Use --enable-maintainer-mode to disabled deprecated symbols
45 GNOME_MAINTAINER_MODE_DEFINES
47 # Uncomment that to build with single include disabled
48 #AC_DEFINE(G_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GLib])
49 #AC_DEFINE(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GDK pixbuf])
50 #AC_DEFINE(GTK_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GTK])
52 AC_CONFIG_MACRO_DIR([m4])
53 AC_CONFIG_HEADERS([config.h])
54 AC_CONFIG_SRCDIR([configure.ac])
59 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define -Wno-portability)
67 IT_PROG_INTLTOOL([0.35.0])
71 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
72 AC_PATH_PROG(GCONFTOOL, gconftool-2)
74 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
75 AC_SUBST(GLIB_GENMARSHAL)
77 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
78 if test -z "$XSLTPROC"; then
79 AC_MSG_ERROR([xsltproc (from libxslt) is required])
85 # -----------------------------------------------------------
86 # Pkg-Config dependency checks
87 # -----------------------------------------------------------
89 PKG_CHECK_MODULES(LIBEMPATHY,
91 glib-2.0 >= $GLIB_REQUIRED
93 gio-2.0 >= $GLIB_REQUIRED
94 gio-unix-2.0 >= $GLIB_REQUIRED
96 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
102 PKG_CHECK_MODULES(LIBEMPATHYGTK,
104 glib-2.0 >= $GLIB_REQUIRED
106 gio-2.0 >= $GLIB_REQUIRED
107 gconf-2.0 >= $GCONF_REQUIRED
109 gtk+-2.0 >= $GTK_REQUIRED
110 libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
111 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
114 gstreamer-interfaces-0.10
117 PKG_CHECK_MODULES(EMPATHY,
119 glib-2.0 >= $GLIB_REQUIRED
121 gio-2.0 >= $GLIB_REQUIRED
123 gtk+-2.0 >= $GTK_REQUIRED
126 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
132 PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
134 # -----------------------------------------------------------
136 # -----------------------------------------------------------
139 AC_HELP_STRING([--disable-debug],[compile without debug code]),
140 enable_debug=$enableval, enable_debug=yes )
142 if test x$enable_debug = xyes; then
143 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
146 # -----------------------------------------------------------
148 # -----------------------------------------------------------
150 GETTEXT_PACKAGE=empathy
151 AC_SUBST(GETTEXT_PACKAGE)
152 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
156 # -----------------------------------------------------------
158 # -----------------------------------------------------------
159 AC_ARG_ENABLE(network-manager,
160 AS_HELP_STRING([--enable-network-manager=@<:@no/yes/auto@:>@],
161 [build with network-manager support]), ,
162 enable_network_manager=auto)
164 if test "x$enable_network_manager" != "xno"; then
165 PKG_CHECK_MODULES(NETWORK_MANAGER,
167 libnm_glib >= $NETWORK_MANAGER_REQUIRED
168 ], have_nm="yes", have_nm="no")
170 if test "x$have_nm" = "xyes"; then
171 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
177 if test "x$enable_network_manager" = "xyes" -a "x$have_nm" != "xyes"; then
178 AC_MSG_ERROR([Couldn't find libnm-glib dependencies.])
180 AM_CONDITIONAL(HAVE_NM, test "x$have_NM" = "xyes")
182 # -----------------------------------------------------------
184 # -----------------------------------------------------------
185 AC_ARG_ENABLE(webkit,
186 AS_HELP_STRING([--enable-webkit=@<:@no/yes/auto@:>@],
187 [build with webkit support]), ,
190 if test "x$enable_webkit" != "xno"; then
191 PKG_CHECK_MODULES(WEBKIT,
193 webkit-1.0 >= $WEBKIT_REQUIRED
194 ], have_webkit="yes", have_webkit="no")
196 if test "x$have_webkit" = "xyes"; then
197 AC_DEFINE(HAVE_WEBKIT, 1, [Define if you have libwebkitgtk])
203 if test "x$enable_webkit" = "xyes" -a "x$have_webkit" != "xyes"; then
204 AC_MSG_ERROR([Couldn't find webkit dependencies.])
206 AM_CONDITIONAL(HAVE_WEBKIT, test "x$have_webkit" = "xyes")
208 # -----------------------------------------------------------
209 # spellchecking checks: enchant and iso-codes
210 # -----------------------------------------------------------
212 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
213 [Enable spell checking]), ,
216 if test "x$enable_spell" != "xno"; then
217 PKG_CHECK_MODULES(ENCHANT,
219 enchant >= $ENCHANT_REQUIRED,
220 iso-codes >= $ISO_CODES_REQUIRED
221 ], have_enchant="yes", have_enchant="no")
223 if test "x$have_enchant" = "xyes"; then
224 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
225 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
226 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
227 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
228 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
234 AC_MSG_RESULT([$result])
240 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
241 AC_MSG_ERROR([Couldn't find spell dependencies.])
244 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
246 # -----------------------------------------------------------
247 # Map view checks: libchamplain
248 # -----------------------------------------------------------
250 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
251 [Enable map view]), ,
254 if test "x$enable_map" != "xno"; then
255 PKG_CHECK_MODULES(LIBCHAMPLAIN,
257 champlain-0.3 >= $LIBCHAMPLAIN_REQUIRED,
258 champlain-gtk-0.3 >= $LIBCHAMPLAIN_GTK_REQUIRED
259 clutter-gtk-0.8 >= $CLUTTER_GTK_REQUIRED
260 ], have_libchamplain="yes", have_libchamplain="no")
262 if test "x$have_libchamplain" = "xyes"; then
263 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
269 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
270 AC_MSG_ERROR([Couldn't find map view dependencies.])
273 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
275 # -----------------------------------------------------------
276 # location checks: geoclue
277 # -----------------------------------------------------------
278 AC_ARG_ENABLE(location,
279 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
280 [Enable location awareness]), ,
281 enable_location=auto)
283 if test "x$enable_location" != "xno"; then
284 PKG_CHECK_MODULES(GEOCLUE,
286 geoclue >= $GEOCLUE_REQUIRED
287 ], have_geoclue="yes", have_geoclue="no")
289 if test "x$have_geoclue" = "xyes"; then
290 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
296 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
297 AC_MSG_ERROR([Couldn't find location dependencies.])
300 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
301 AC_SUBST(GEOCLUE_CFLAGS)
302 AC_SUBST(GEOCLUE_LIBS)
304 # -----------------------------------------------------------
306 # -----------------------------------------------------------
307 AC_ARG_ENABLE(megaphone,
308 AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
309 [build megaphone applet]), ,
310 enable_megaphone=auto)
312 if test "x$enable_megaphone" != "xno"; then
313 PKG_CHECK_MODULES(MEGAPHONE,
315 libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
316 glib-2.0 >= $GLIB_REQUIRED
317 gtk+-2.0 >= $GTK_REQUIRED
318 gconf-2.0 >= $GCONF_REQUIRED
319 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
320 ], have_megaphone="yes", have_megaphone="no")
325 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
326 AC_MSG_ERROR([Couldn't find megaphone dependencies.])
329 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
331 # -----------------------------------------------------------
333 # -----------------------------------------------------------
334 AC_ARG_ENABLE(nothere,
335 AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
336 [build nothere applet]), ,
339 if test "x$enable_nothere" != "xno"; then
340 PKG_CHECK_MODULES(NOTHERE,
342 libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
343 glib-2.0 >= $GLIB_REQUIRED
344 gtk+-2.0 >= $GTK_REQUIRED
345 gconf-2.0 >= $GCONF_REQUIRED
346 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
347 ], have_nothere="yes", have_nothere="no")
352 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
353 AC_MSG_ERROR([Couldn't find nothere dependencies.])
356 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
358 # -----------------------------------------------------------
360 # -----------------------------------------------------------
362 AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
366 if test "x$enable_tests" != "xno"; then
367 PKG_CHECK_MODULES(CHECK,
370 ], have_check="yes", have_check="no")
375 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
376 AC_MSG_ERROR([Couldn't find check dependencies.])
379 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
381 # -----------------------------------------------------------
383 # -----------------------------------------------------------
384 AC_ARG_ENABLE(python,
385 AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
386 [build python bindings to libempathy and libempathy-gtk]), ,
389 if test "x$enable_python" != "xno"; then
390 PKG_CHECK_MODULES(PYTHON_BINDING,
393 glib-2.0 >= $GLIB_REQUIRED
395 gconf-2.0 >= $GCONF_REQUIRED
397 gtk+-2.0 >= $GTK_REQUIRED
399 gstreamer-interfaces-0.10
401 ], have_python="yes", have_python="no")
402 if test "x$have_python" = "xyes" ; then
403 AM_CHECK_PYTHON_HEADERS(,have_python="no")
404 AC_CHECK_PROGS([PYGOBJECTCODEGEN], [pygobject-codegen-2.0 pygtk-codegen-2.0])
410 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
411 AC_MSG_ERROR([Couldn't find python.])
414 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
416 # -----------------------------------------------------------
417 # Coding style checks
418 # -----------------------------------------------------------
419 AC_ARG_ENABLE(coding-style-checks,
420 AC_HELP_STRING([--disable-coding-style-checks],
421 [don't check coding style using grep]),
422 [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=yes])
424 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
425 # -----------------------------------------------------------
432 data/empathy.desktop.in
437 libempathy/libempathy.pc
438 libempathy-gtk/Makefile
439 libempathy-gtk/libempathy-gtk.pc
442 megaphone/src/Makefile
443 megaphone/data/Makefile
446 nothere/data/Makefile
448 docs/libempathy/Makefile
449 docs/libempathy/version.xml
450 docs/libempathy-gtk/Makefile
451 docs/libempathy-gtk/version.xml
454 python/pyempathy/Makefile
455 python/pyempathygtk/Makefile
466 Compiler....................: ${CC}
467 Compiler Flags..............: ${CFLAGS}
468 Prefix......................: ${prefix}
469 Shaved build................: ${enable_shave}
470 Tests.......................: ${have_check}
471 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
474 Spell checking (enchant)....: ${have_enchant}
475 Display maps (libchamplain).: ${have_libchamplain}
476 Location awareness (Geoclue): ${have_geoclue}
477 Adium themes (Webkit).......: ${have_webkit}
478 NetworkManager integration..: ${have_nm}
481 Documentation...............: ${enable_gtk_doc}
482 Python bindings.............: ${have_python}
483 Megaphone applet............: ${have_megaphone}
484 Nothere applet..............: ${have_nothere}