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.34
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.6
38 LIBCHAMPLAIN_GTK_REQUIRED=0.3.6
39 CLUTTER_GTK_REQUIRED=0.10
43 NETWORK_MANAGER_REQUIRED=0.7.0
45 # Use --enable-maintainer-mode to disabled deprecated symbols
46 GNOME_MAINTAINER_MODE_DEFINES
48 # Uncomment that to build with single include disabled
49 #AC_DEFINE(G_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GLib])
50 #AC_DEFINE(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GDK pixbuf])
51 #AC_DEFINE(GTK_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GTK])
53 AC_CONFIG_MACRO_DIR([m4])
54 AC_CONFIG_HEADERS([config.h])
55 AC_CONFIG_SRCDIR([configure.ac])
60 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define -Wno-portability)
68 IT_PROG_INTLTOOL([0.35.0])
72 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
73 AC_PATH_PROG(GCONFTOOL, gconftool-2)
75 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
76 AC_SUBST(GLIB_GENMARSHAL)
78 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
79 if test -z "$XSLTPROC"; then
80 AC_MSG_ERROR([xsltproc (from libxslt) is required])
86 # -----------------------------------------------------------
87 # Pkg-Config dependency checks
88 # -----------------------------------------------------------
90 PKG_CHECK_MODULES(LIBEMPATHY,
92 glib-2.0 >= $GLIB_REQUIRED
94 gio-2.0 >= $GLIB_REQUIRED
95 gio-unix-2.0 >= $GLIB_REQUIRED
97 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
103 PKG_CHECK_MODULES(LIBEMPATHYGTK,
105 glib-2.0 >= $GLIB_REQUIRED
107 gio-2.0 >= $GLIB_REQUIRED
108 gconf-2.0 >= $GCONF_REQUIRED
110 gtk+-2.0 >= $GTK_REQUIRED
111 libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
112 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
115 gstreamer-interfaces-0.10
118 PKG_CHECK_MODULES(EMPATHY,
120 glib-2.0 >= $GLIB_REQUIRED
122 gio-2.0 >= $GLIB_REQUIRED
124 gtk+-2.0 >= $GTK_REQUIRED
127 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
131 gnome-keyring-1 >= $KEYRING_REQUIRED
134 PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
136 # -----------------------------------------------------------
138 # -----------------------------------------------------------
141 AC_HELP_STRING([--disable-debug],[compile without debug code]),
142 enable_debug=$enableval, enable_debug=yes )
144 if test x$enable_debug = xyes; then
145 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
148 # -----------------------------------------------------------
150 # -----------------------------------------------------------
152 GETTEXT_PACKAGE=empathy
153 AC_SUBST(GETTEXT_PACKAGE)
154 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
158 # -----------------------------------------------------------
159 # Connectivity integration
160 # -----------------------------------------------------------
161 AC_ARG_WITH(connectivity,
162 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
163 [build with connectivity support]), ,
164 with_connectivity=auto)
166 if test "x$with_connectivity" = "xno"; then
170 elif test "x$with_connectivity" = "xconnman"; then
172 PKG_CHECK_MODULES(CONNMAN,
175 ], have_connman="yes", have_connman="no")
177 if test "x$have_connman" = "xyes"; then
178 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
184 PKG_CHECK_MODULES(NETWORK_MANAGER,
186 libnm_glib >= $NETWORK_MANAGER_REQUIRED
187 ], have_nm="yes", have_nm="no")
189 if test "x$have_nm" = "xyes"; then
190 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
195 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
196 AC_MSG_ERROR([Couldn't find connman dependencies.])
199 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
200 AC_MSG_ERROR([Couldn't find libnm-glib dependencies.])
203 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
204 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
206 # -----------------------------------------------------------
208 # -----------------------------------------------------------
209 AC_ARG_ENABLE(webkit,
210 AS_HELP_STRING([--enable-webkit=@<:@no/yes/auto@:>@],
211 [build with webkit support]), ,
214 if test "x$enable_webkit" != "xno"; then
215 PKG_CHECK_MODULES(WEBKIT,
217 webkit-1.0 >= $WEBKIT_REQUIRED
218 ], have_webkit="yes", have_webkit="no")
220 if test "x$have_webkit" = "xyes"; then
221 AC_DEFINE(HAVE_WEBKIT, 1, [Define if you have libwebkitgtk])
227 if test "x$enable_webkit" = "xyes" -a "x$have_webkit" != "xyes"; then
228 AC_MSG_ERROR([Couldn't find webkit dependencies.])
230 AM_CONDITIONAL(HAVE_WEBKIT, test "x$have_webkit" = "xyes")
232 # -----------------------------------------------------------
233 # spellchecking checks: enchant and iso-codes
234 # -----------------------------------------------------------
236 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
237 [Enable spell checking]), ,
240 if test "x$enable_spell" != "xno"; then
241 PKG_CHECK_MODULES(ENCHANT,
243 enchant >= $ENCHANT_REQUIRED,
244 iso-codes >= $ISO_CODES_REQUIRED
245 ], have_enchant="yes", have_enchant="no")
247 if test "x$have_enchant" = "xyes"; then
248 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
249 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
250 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
251 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
252 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
258 AC_MSG_RESULT([$result])
264 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
265 AC_MSG_ERROR([Couldn't find spell dependencies.])
268 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
270 # -----------------------------------------------------------
271 # Map view checks: libchamplain
272 # -----------------------------------------------------------
274 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
275 [Enable map view]), ,
278 if test "x$enable_map" != "xno"; then
279 PKG_CHECK_MODULES(LIBCHAMPLAIN,
281 champlain-0.3 >= $LIBCHAMPLAIN_REQUIRED,
282 champlain-gtk-0.3 >= $LIBCHAMPLAIN_GTK_REQUIRED
283 clutter-gtk-0.10 >= $CLUTTER_GTK_REQUIRED
284 ], have_libchamplain="yes", have_libchamplain="no")
286 if test "x$have_libchamplain" = "xyes"; then
287 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
293 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
294 AC_MSG_ERROR([Couldn't find map view dependencies.])
297 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
299 # -----------------------------------------------------------
300 # location checks: geoclue
301 # -----------------------------------------------------------
302 AC_ARG_ENABLE(location,
303 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
304 [Enable location awareness]), ,
305 enable_location=auto)
307 if test "x$enable_location" != "xno"; then
308 PKG_CHECK_MODULES(GEOCLUE,
310 geoclue >= $GEOCLUE_REQUIRED
311 ], have_geoclue="yes", have_geoclue="no")
313 if test "x$have_geoclue" = "xyes"; then
314 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
320 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
321 AC_MSG_ERROR([Couldn't find location dependencies.])
324 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
325 AC_SUBST(GEOCLUE_CFLAGS)
326 AC_SUBST(GEOCLUE_LIBS)
328 # -----------------------------------------------------------
330 # -----------------------------------------------------------
331 AC_ARG_ENABLE(megaphone,
332 AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
333 [build megaphone applet]), ,
334 enable_megaphone=auto)
336 if test "x$enable_megaphone" != "xno"; then
337 PKG_CHECK_MODULES(MEGAPHONE,
339 libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
340 glib-2.0 >= $GLIB_REQUIRED
341 gtk+-2.0 >= $GTK_REQUIRED
342 gconf-2.0 >= $GCONF_REQUIRED
343 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
344 ], have_megaphone="yes", have_megaphone="no")
349 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
350 AC_MSG_ERROR([Couldn't find megaphone dependencies.])
353 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
355 # -----------------------------------------------------------
357 # -----------------------------------------------------------
358 AC_ARG_ENABLE(nothere,
359 AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
360 [build nothere applet]), ,
363 if test "x$enable_nothere" != "xno"; then
364 PKG_CHECK_MODULES(NOTHERE,
366 libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
367 glib-2.0 >= $GLIB_REQUIRED
368 gtk+-2.0 >= $GTK_REQUIRED
369 gconf-2.0 >= $GCONF_REQUIRED
370 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
371 ], have_nothere="yes", have_nothere="no")
376 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
377 AC_MSG_ERROR([Couldn't find nothere dependencies.])
380 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
382 # -----------------------------------------------------------
384 # -----------------------------------------------------------
386 AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
390 if test "x$enable_tests" != "xno"; then
391 PKG_CHECK_MODULES(CHECK,
394 ], have_check="yes", have_check="no")
399 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
400 AC_MSG_ERROR([Couldn't find check dependencies.])
403 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
405 # -----------------------------------------------------------
407 # -----------------------------------------------------------
408 AC_ARG_ENABLE(python,
409 AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
410 [build python bindings to libempathy and libempathy-gtk]), ,
413 if test "x$enable_python" != "xno"; then
414 PKG_CHECK_MODULES(PYTHON_BINDING,
417 glib-2.0 >= $GLIB_REQUIRED
419 gconf-2.0 >= $GCONF_REQUIRED
421 gtk+-2.0 >= $GTK_REQUIRED
423 gstreamer-interfaces-0.10
425 ], have_python="yes", have_python="no")
426 if test "x$have_python" = "xyes" ; then
427 AM_CHECK_PYTHON_HEADERS(,have_python="no")
428 AC_CHECK_PROGS([PYGOBJECTCODEGEN], [pygobject-codegen-2.0 pygtk-codegen-2.0])
434 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
435 AC_MSG_ERROR([Couldn't find python.])
438 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
440 # -----------------------------------------------------------
441 # Coding style checks
442 # -----------------------------------------------------------
443 AC_ARG_ENABLE(coding-style-checks,
444 AC_HELP_STRING([--disable-coding-style-checks],
445 [don't check coding style using grep]),
446 [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=yes])
448 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
449 # -----------------------------------------------------------
456 data/empathy.desktop.in
461 libempathy/libempathy.pc
462 libempathy-gtk/Makefile
463 libempathy-gtk/libempathy-gtk.pc
466 megaphone/src/Makefile
467 megaphone/data/Makefile
470 nothere/data/Makefile
472 docs/libempathy/Makefile
473 docs/libempathy/version.xml
474 docs/libempathy-gtk/Makefile
475 docs/libempathy-gtk/version.xml
478 python/pyempathy/Makefile
479 python/pyempathygtk/Makefile
490 Compiler....................: ${CC}
491 Compiler Flags..............: ${CFLAGS}
492 Prefix......................: ${prefix}
493 Shaved build................: ${enable_shave}
494 Tests.......................: ${have_check}
495 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
498 Spell checking (enchant)....: ${have_enchant}
499 Display maps (libchamplain).: ${have_libchamplain}
500 Location awareness (Geoclue): ${have_geoclue}
501 Adium themes (Webkit).......: ${have_webkit}
504 NetworkManager integration..: ${have_nm}
505 ConnMan integration.........: ${have_connman}
508 Documentation...............: ${enable_gtk_doc}
509 Python bindings.............: ${have_python}
510 Megaphone applet............: ${have_megaphone}
511 Nothere applet..............: ${have_nothere}