1 AC_INIT(Empathy, 2.27.5, 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=25
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 MISSION_CONTROL_REQUIRED=4.61
34 ENCHANT_REQUIRED=1.2.0
35 ISO_CODES_REQUIRED=0.35
36 LIBNOTIFY_REQUIRED=0.4.4
37 LIBCANBERRA_GTK_REQUIRED=0.4
38 LIBCHAMPLAIN_REQUIRED=0.3.3
39 LIBCHAMPLAIN_GTK_REQUIRED=0.3.3
40 CLUTTER_GTK_REQUIRED=0.8.2
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
98 libmissioncontrol >= $MISSION_CONTROL_REQUIRED
104 PKG_CHECK_MODULES(LIBEMPATHYGTK,
106 glib-2.0 >= $GLIB_REQUIRED
108 gio-2.0 >= $GLIB_REQUIRED
109 gconf-2.0 >= $GCONF_REQUIRED
111 gtk+-2.0 >= $GTK_REQUIRED
112 libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
113 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
114 libmissioncontrol >= $MISSION_CONTROL_REQUIRED
117 gstreamer-interfaces-0.10
120 PKG_CHECK_MODULES(EMPATHY,
122 glib-2.0 >= $GLIB_REQUIRED
124 gio-2.0 >= $GLIB_REQUIRED
126 gtk+-2.0 >= $GTK_REQUIRED
129 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
130 libmissioncontrol >= $MISSION_CONTROL_REQUIRED
135 PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
137 # -----------------------------------------------------------
139 # -----------------------------------------------------------
142 AC_HELP_STRING([--disable-debug],[compile without debug code]),
143 enable_debug=$enableval, enable_debug=yes )
145 if test x$enable_debug = xyes; then
146 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
149 # -----------------------------------------------------------
151 # -----------------------------------------------------------
153 GETTEXT_PACKAGE=empathy
154 AC_SUBST(GETTEXT_PACKAGE)
155 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
159 # -----------------------------------------------------------
161 # -----------------------------------------------------------
162 AC_ARG_ENABLE(network-manager,
163 AS_HELP_STRING([--enable-network-manager=@<:@no/yes/auto@:>@],
164 [build with network-manager support]), ,
165 enable_network_manager=auto)
167 if test "x$enable_network_manager" != "xno"; then
168 PKG_CHECK_MODULES(NETWORK_MANAGER,
170 libnm_glib >= $NETWORK_MANAGER_REQUIRED
171 ], have_nm="yes", have_nm="no")
173 if test "x$have_nm" = "xyes"; then
174 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
180 if test "x$enable_network_manager" = "xyes" -a "x$have_nm" != "xyes"; then
181 AC_MSG_ERROR([Couldn't find libnm-glib dependencies.])
183 AM_CONDITIONAL(HAVE_NM, test "x$have_NM" = "xyes")
185 # -----------------------------------------------------------
187 # -----------------------------------------------------------
188 AC_ARG_ENABLE(webkit,
189 AS_HELP_STRING([--enable-webkit=@<:@no/yes/auto@:>@],
190 [build with webkit support]), ,
193 if test "x$enable_webkit" != "xno"; then
194 PKG_CHECK_MODULES(WEBKIT,
196 webkit-1.0 >= $WEBKIT_REQUIRED
197 ], have_webkit="yes", have_webkit="no")
199 if test "x$have_webkit" = "xyes"; then
200 AC_DEFINE(HAVE_WEBKIT, 1, [Define if you have libwebkitgtk])
206 if test "x$enable_webkit" = "xyes" -a "x$have_webkit" != "xyes"; then
207 AC_MSG_ERROR([Couldn't find webkit dependencies.])
209 AM_CONDITIONAL(HAVE_WEBKIT, test "x$have_webkit" = "xyes")
211 # -----------------------------------------------------------
212 # spellchecking checks: enchant and iso-codes
213 # -----------------------------------------------------------
215 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
216 [Enable spell checking]), ,
219 if test "x$enable_spell" != "xno"; then
220 PKG_CHECK_MODULES(ENCHANT,
222 enchant >= $ENCHANT_REQUIRED,
223 iso-codes >= $ISO_CODES_REQUIRED
224 ], have_enchant="yes", have_enchant="no")
226 if test "x$have_enchant" = "xyes"; then
227 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
228 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
229 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
230 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
231 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
237 AC_MSG_RESULT([$result])
243 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
244 AC_MSG_ERROR([Couldn't find spell dependencies.])
247 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
249 # -----------------------------------------------------------
250 # Map view checks: libchamplain
251 # -----------------------------------------------------------
253 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
254 [Enable map view]), ,
257 if test "x$enable_map" != "xno"; then
258 PKG_CHECK_MODULES(LIBCHAMPLAIN,
260 champlain-0.3 >= $LIBCHAMPLAIN_REQUIRED,
261 champlain-gtk-0.3 >= $LIBCHAMPLAIN_GTK_REQUIRED
262 clutter-gtk-0.8 >= $CLUTTER_GTK_REQUIRED
263 ], have_libchamplain="yes", have_libchamplain="no")
265 if test "x$have_libchamplain" = "xyes"; then
266 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
272 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
273 AC_MSG_ERROR([Couldn't find map view dependencies.])
276 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
278 # -----------------------------------------------------------
279 # location checks: geoclue
280 # -----------------------------------------------------------
281 AC_ARG_ENABLE(location,
282 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
283 [Enable location awareness]), ,
284 enable_location=auto)
286 if test "x$enable_location" != "xno"; then
287 PKG_CHECK_MODULES(GEOCLUE,
289 geoclue >= $GEOCLUE_REQUIRED
290 ], have_geoclue="yes", have_geoclue="no")
292 if test "x$have_geoclue" = "xyes"; then
293 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
299 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
300 AC_MSG_ERROR([Couldn't find location dependencies.])
303 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
304 AC_SUBST(GEOCLUE_CFLAGS)
305 AC_SUBST(GEOCLUE_LIBS)
307 # -----------------------------------------------------------
309 # -----------------------------------------------------------
310 AC_ARG_ENABLE(megaphone,
311 AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
312 [build megaphone applet]), ,
313 enable_megaphone=auto)
315 if test "x$enable_megaphone" != "xno"; then
316 PKG_CHECK_MODULES(MEGAPHONE,
318 libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
319 glib-2.0 >= $GLIB_REQUIRED
320 gtk+-2.0 >= $GTK_REQUIRED
321 gconf-2.0 >= $GCONF_REQUIRED
322 libmissioncontrol >= $MISSION_CONTROL_REQUIRED
323 ], have_megaphone="yes", have_megaphone="no")
328 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
329 AC_MSG_ERROR([Couldn't find megaphone dependencies.])
332 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
334 # -----------------------------------------------------------
336 # -----------------------------------------------------------
337 AC_ARG_ENABLE(nothere,
338 AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
339 [build nothere applet]), ,
342 if test "x$enable_nothere" != "xno"; then
343 PKG_CHECK_MODULES(NOTHERE,
345 libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
346 glib-2.0 >= $GLIB_REQUIRED
347 gtk+-2.0 >= $GTK_REQUIRED
348 gconf-2.0 >= $GCONF_REQUIRED
349 libmissioncontrol >= $MISSION_CONTROL_REQUIRED
350 ], have_nothere="yes", have_nothere="no")
355 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
356 AC_MSG_ERROR([Couldn't find nothere dependencies.])
359 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
361 # -----------------------------------------------------------
363 # -----------------------------------------------------------
365 AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
369 if test "x$enable_tests" != "xno"; then
370 PKG_CHECK_MODULES(CHECK,
373 ], have_check="yes", have_check="no")
378 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
379 AC_MSG_ERROR([Couldn't find check dependencies.])
382 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
384 # -----------------------------------------------------------
386 # -----------------------------------------------------------
387 AC_ARG_ENABLE(python,
388 AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
389 [build python bindings to libempathy and libempathy-gtk]), ,
392 if test "x$enable_python" != "xno"; then
393 PKG_CHECK_MODULES(PYTHON_BINDING,
396 glib-2.0 >= $GLIB_REQUIRED
398 gconf-2.0 >= $GCONF_REQUIRED
400 libmissioncontrol >= $MISSION_CONTROL_REQUIRED
401 gtk+-2.0 >= $GTK_REQUIRED
403 gstreamer-interfaces-0.10
405 ], have_python="yes", have_python="no")
406 if test "x$have_python" = "xyes" ; then
407 AM_CHECK_PYTHON_HEADERS(,have_python="no")
408 AC_CHECK_PROGS([PYGOBJECTCODEGEN], [pygobject-codegen-2.0 pygtk-codegen-2.0])
414 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
415 AC_MSG_ERROR([Couldn't find python.])
418 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
420 # -----------------------------------------------------------
421 # Coding style checks
422 # -----------------------------------------------------------
423 AC_ARG_ENABLE(coding-style-checks,
424 AC_HELP_STRING([--disable-coding-style-checks],
425 [don't check coding style using grep]),
426 [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=yes])
428 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
429 # -----------------------------------------------------------
436 data/empathy.desktop.in
441 libempathy/libempathy.pc
442 libempathy-gtk/Makefile
443 libempathy-gtk/libempathy-gtk.pc
446 megaphone/src/Makefile
447 megaphone/data/Makefile
450 nothere/data/Makefile
452 docs/libempathy/Makefile
453 docs/libempathy/version.xml
454 docs/libempathy-gtk/Makefile
455 docs/libempathy-gtk/version.xml
458 python/pyempathy/Makefile
459 python/pyempathygtk/Makefile
470 Compiler....................: ${CC}
471 Compiler Flags..............: ${CFLAGS}
472 Prefix......................: ${prefix}
473 Shaved build................: ${enable_shave}
474 Tests.......................: ${have_check}
475 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
478 Spell checking (enchant)....: ${have_enchant}
479 Display maps (libchamplain).: ${have_libchamplain}
480 Location awareness (Geoclue): ${have_geoclue}
481 Adium themes (Webkit).......: ${have_webkit}
482 NetworkManager integration..: ${have_nm}
485 Documentation...............: ${enable_gtk_doc}
486 Python bindings.............: ${have_python}
487 Megaphone applet............: ${have_megaphone}
488 Nothere applet..............: ${have_nothere}