1 dnl If not 1, append datestamp to the version number
2 m4_define(empathy_released, 0)
4 m4_define([empathy_major_version], [2])
5 m4_define([empathy_minor_version], [30])
6 m4_define([empathy_micro_version], [0])
7 m4_define([empathy_nano_version], [0])
9 dnl Display the nano_version only if it's not '0'
10 m4_define([empathy_base_version],
11 [empathy_major_version.empathy_minor_version.empathy_micro_version])
12 m4_define([empathy_full_version],
13 [m4_if(empathy_nano_version, 0, [empathy_base_version],
14 [empathy_base_version].[empathy_nano_version])])
16 m4_define(empathy_maybe_datestamp,
17 m4_esyscmd([if test x]empathy_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi]))
19 m4_define(empathy_version, empathy_full_version[]empathy_maybe_datestamp)
22 AC_INIT(Empathy, empathy_version, http://bugzilla.gnome.org/browse.cgi?product=empathy)
27 Copyright (C) 2003-2007 Imendio AB
28 Copyright (C) 2007-2008 Collabora Ltd.
31 # Minimal version required
35 TELEPATHY_GLIB_REQUIRED=0.9.2
36 TELEPATHY_LOGGER=0.1.1
37 ENCHANT_REQUIRED=1.2.0
38 ISO_CODES_REQUIRED=0.35
39 LIBNOTIFY_REQUIRED=0.4.4
40 LIBCANBERRA_GTK_REQUIRED=0.4
41 LIBCHAMPLAIN_REQUIRED=0.4
42 LIBCHAMPLAIN_GTK_REQUIRED=0.4
43 CLUTTER_GTK_REQUIRED=0.10
45 WEBKIT_REQUIRED=1.1.15
47 NETWORK_MANAGER_REQUIRED=0.7.0
48 NAUTILUS_SENDTO_REQUIRED=2.28.1
50 # Use --enable-maintainer-mode to disabled deprecated symbols
51 GNOME_MAINTAINER_MODE_DEFINES
53 # Warning if GLib/GDK/GTK headers are included
54 AC_DEFINE(G_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GLib])
55 AC_DEFINE(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GDK pixbuf])
56 AC_DEFINE(GTK_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GTK])
58 AC_CONFIG_MACRO_DIR([m4])
59 AC_CONFIG_HEADERS([config.h])
60 AC_CONFIG_SRCDIR([configure.ac])
65 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define -Wno-portability)
67 # Support silent build rules, requires at least automake-1.11. Disable
68 # by either passing --disable-silent-rules to configure or passing V=1
70 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
79 IT_PROG_INTLTOOL([0.35.0])
80 GNOME_DOC_INIT([0.17.3])
82 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
83 AC_PATH_PROG(GCONFTOOL, gconftool-2)
85 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
86 AC_SUBST(GLIB_GENMARSHAL)
87 CONTROL_CENTER_EXTENSIONDIR=`$PKG_CONFIG --variable=extensiondir libgnome-control-center-extension`
88 AC_SUBST(CONTROL_CENTER_EXTENSIONDIR)
90 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
91 if test -z "$XSLTPROC"; then
92 AC_MSG_ERROR([xsltproc (from libxslt) is required])
99 # -----------------------------------------------------------
101 # -----------------------------------------------------------
102 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
103 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
105 AC_ARG_ENABLE(Werror,
106 AC_HELP_STRING([--disable-Werror],[compile without -Werror (normally enabled in development builds)]),
107 werror=$enableval, :)
109 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
110 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
111 wno_missing_field_initializers=yes,
112 wno_missing_field_initializers=no)
113 AS_COMPILER_FLAG(-Wno-unused-parameter,
114 wno_unused_parameter=yes,
115 wno_unused_parameter=no)
117 ifelse(empathy_released, 1, [],
119 if test x$werror = xyes; then
120 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
122 if test x$wextra = xyes -a \
123 x$wno_missing_field_initializers = xyes -a \
124 x$wno_unused_parameter = xyes; then
125 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
129 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
130 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
131 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
132 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
133 # Disabled because some GTK+ headers (like gtkitemfactory.h) are bugged :(
134 #AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
136 AC_SUBST(ERROR_CFLAGS)
138 # -----------------------------------------------------------
140 # -----------------------------------------------------------
142 # It needs to be defined before PKG_CHECK_MODULES calls
144 AC_HELP_STRING([--enable-tpl],[enable telepathy-logger code and disable the
145 empathy logger]), enable_tpl=$enableval, enable_tpl=no )
146 AM_CONDITIONAL(ENABLE_TPL, test "x$enable_tpl" = "xyes")
148 if test x${enable_tpl} = xyes; then
149 AC_DEFINE(ENABLE_TPL, [], [Enable TPL code])
152 if test "x$enable_tpl" = "xyes"; then
153 PKG_CHECK_MODULES(TPL,
155 telepathy-logger = $TELEPATHY_LOGGER
162 # -----------------------------------------------------------
163 # Pkg-Config dependency checks
164 # -----------------------------------------------------------
166 PKG_CHECK_MODULES(LIBEMPATHY,
168 glib-2.0 >= $GLIB_REQUIRED
170 gio-2.0 >= $GLIB_REQUIRED
171 gio-unix-2.0 >= $GLIB_REQUIRED
173 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
179 PKG_CHECK_MODULES(LIBEMPATHYGTK,
181 glib-2.0 >= $GLIB_REQUIRED
183 gio-2.0 >= $GLIB_REQUIRED
184 gconf-2.0 >= $GCONF_REQUIRED
186 gtk+-2.0 >= $GTK_REQUIRED
187 libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
188 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
191 gstreamer-interfaces-0.10
194 PKG_CHECK_MODULES(EMPATHY,
196 glib-2.0 >= $GLIB_REQUIRED
198 gio-2.0 >= $GLIB_REQUIRED
200 gtk+-2.0 >= $GTK_REQUIRED
203 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
208 gnome-keyring-1 >= $KEYRING_REQUIRED
211 PKG_CHECK_MODULES(LIBEMPATHY_ACCOUNTS_PANEL,
213 glib-2.0 >= $GLIB_REQUIRED
215 gio-2.0 >= $GLIB_REQUIRED
217 gtk+-2.0 >= $GTK_REQUIRED
220 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
222 gnome-keyring-1 >= $KEYRING_REQUIRED
225 PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
227 # -----------------------------------------------------------
229 # -----------------------------------------------------------
232 AC_HELP_STRING([--disable-debug],[compile without debug code]),
233 enable_debug=$enableval, enable_debug=yes )
235 if test x$enable_debug = xyes; then
236 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
239 # -----------------------------------------------------------
241 # -----------------------------------------------------------
243 GETTEXT_PACKAGE=empathy
244 AC_SUBST(GETTEXT_PACKAGE)
245 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
249 # -----------------------------------------------------------
250 # Connectivity integration
251 # -----------------------------------------------------------
252 AC_ARG_WITH(connectivity,
253 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
254 [build with connectivity support]), ,
255 with_connectivity=auto)
257 if test "x$with_connectivity" = "xno"; then
261 elif test "x$with_connectivity" = "xconnman"; then
263 PKG_CHECK_MODULES(CONNMAN,
266 ], have_connman="yes", have_connman="no")
268 if test "x$have_connman" = "xyes"; then
269 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
275 PKG_CHECK_MODULES(NETWORK_MANAGER,
277 libnm_glib >= $NETWORK_MANAGER_REQUIRED
278 ], have_nm="yes", have_nm="no")
280 if test "x$have_nm" = "xyes"; then
281 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
284 PKG_CHECK_MODULES(NETWORK_MANAGER,
286 libnm-glib >= $NETWORK_MANAGER_REQUIRED
287 ], have_nm="yes", have_nm="no")
289 if test "x$have_nm" = "xyes"; then
290 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
296 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
297 AC_MSG_ERROR([Couldn't find connman dependencies.])
300 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
301 AC_MSG_ERROR([Couldn't find libnm-glib dependencies.])
304 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
305 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
307 # -----------------------------------------------------------
309 # -----------------------------------------------------------
310 AC_ARG_ENABLE(webkit,
311 AS_HELP_STRING([--enable-webkit=@<:@no/yes/auto@:>@],
312 [build with webkit support]), ,
315 if test "x$enable_webkit" != "xno"; then
316 PKG_CHECK_MODULES(WEBKIT,
318 webkit-1.0 >= $WEBKIT_REQUIRED
319 ], have_webkit="yes", have_webkit="no")
321 if test "x$have_webkit" = "xyes"; then
322 AC_DEFINE(HAVE_WEBKIT, 1, [Define if you have libwebkitgtk])
328 if test "x$enable_webkit" = "xyes" -a "x$have_webkit" != "xyes"; then
329 AC_MSG_ERROR([Couldn't find webkit dependencies.])
331 AM_CONDITIONAL(HAVE_WEBKIT, test "x$have_webkit" = "xyes")
333 # -----------------------------------------------------------
334 # spellchecking checks: enchant and iso-codes
335 # -----------------------------------------------------------
337 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
338 [Enable spell checking]), ,
341 if test "x$enable_spell" != "xno"; then
342 PKG_CHECK_MODULES(ENCHANT,
344 enchant >= $ENCHANT_REQUIRED,
345 iso-codes >= $ISO_CODES_REQUIRED
346 ], have_enchant="yes", have_enchant="no")
348 if test "x$have_enchant" = "xyes"; then
349 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
350 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
351 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
352 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
353 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
359 AC_MSG_RESULT([$result])
365 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
366 AC_MSG_ERROR([Couldn't find spell dependencies.])
369 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
371 # -----------------------------------------------------------
372 # Map view checks: libchamplain
373 # -----------------------------------------------------------
375 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
376 [Enable map view]), ,
379 if test "x$enable_map" != "xno"; then
380 PKG_CHECK_MODULES(LIBCHAMPLAIN,
382 champlain-0.4 >= $LIBCHAMPLAIN_REQUIRED,
383 champlain-gtk-0.4 >= $LIBCHAMPLAIN_GTK_REQUIRED
384 clutter-gtk-0.10 >= $CLUTTER_GTK_REQUIRED
385 ], have_libchamplain="yes", have_libchamplain="no")
387 if test "x$have_libchamplain" = "xyes"; then
388 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
394 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
395 AC_MSG_ERROR([Couldn't find map view dependencies.])
398 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
400 # -----------------------------------------------------------
401 # location checks: geoclue
402 # -----------------------------------------------------------
403 AC_ARG_ENABLE(location,
404 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
405 [Enable location awareness]), ,
406 enable_location=auto)
408 if test "x$enable_location" != "xno"; then
409 PKG_CHECK_MODULES(GEOCLUE,
411 geoclue >= $GEOCLUE_REQUIRED
412 ], have_geoclue="yes", have_geoclue="no")
414 if test "x$have_geoclue" = "xyes"; then
415 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
421 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
422 AC_MSG_ERROR([Couldn't find location dependencies.])
425 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
426 AC_SUBST(GEOCLUE_CFLAGS)
427 AC_SUBST(GEOCLUE_LIBS)
429 # -----------------------------------------------------------
430 # meego widgets support
431 # -----------------------------------------------------------
433 AS_HELP_STRING([--enable-meego=@<:no/yes@:>@],
434 [Enable meego widgets]), ,
437 if test "x$enable_meego" != "xno"; then
438 PKG_CHECK_MODULES(MEEGO,
441 ], have_meego="yes", have_meego="no")
443 if test "x$have_meego" = "xyes"; then
444 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
445 chain_enable_favourite_contacts="yes"
451 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
452 AC_MSG_ERROR([Couldn't find meego dependencies.])
455 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
456 AC_SUBST(MEEGO_CFLAGS)
459 # -----------------------------------------------------------
460 # favourite contacts support
461 # -----------------------------------------------------------
462 AC_ARG_ENABLE(favourite_contacts,
463 AS_HELP_STRING([--enable-favourite-contacts=@<:no/yes@:>@],
464 [Enable favourite contacts]), ,
465 enable_favourite_contacts=no)
467 if test "x$enable_favourite_contacts" != "xno" -o "x$chain_enable_favourite_contacts" == "xyes"; then
468 PKG_CHECK_MODULES(TELEPATHY_LOGGER,
471 ], have_telepathy_logger="yes", have_telepathy_logger="no")
473 if test "x$have_telepathy_logger" = "xyes"; then
474 have_favourite_contacts="yes"
475 AC_DEFINE(HAVE_FAVOURITE_CONTACTS, 1, [Define if you want favourite contacts support])
478 have_favourite_contacts="no"
481 if test "x$enable_favourite_contacts" = "xyes" -a "x$have_favourite_contacts" != "xyes"; then
482 AC_MSG_ERROR([Couldn't find favourite contacts dependencies.])
485 AM_CONDITIONAL(HAVE_FAVOURITE_CONTACTS, test "x$have_telepathy_logger" = "xyes")
487 # -----------------------------------------------------------
489 # -----------------------------------------------------------
490 AC_ARG_ENABLE(nautilus-sendto,
491 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
492 [build nautilus-sendto plugin]), ,
493 enable_nautilus_sendto=auto)
495 if test "x$enable_nautilus_sendto" != "xno"; then
496 PKG_CHECK_MODULES(NST,
498 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
499 ], have_nst="yes", have_nst="no")
504 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
505 AC_MSG_ERROR([Couldn't find nautilus-sendto dependencies.])
508 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
510 # -----------------------------------------------------------
511 # new, single-window control center
512 # -----------------------------------------------------------
513 AC_ARG_ENABLE(control_center_embedding,
514 AS_HELP_STRING([--enable-control-center-embedding=@<:@no/yes/auto@:>@],
515 [Enable support for single-window control center]),
516 , enable_control_center_embedding=auto)
518 if test "x$enable_control_center_embedding" != "xno"; then
519 PKG_CHECK_MODULES(CONTROL_CENTER_EMBEDDING,
521 libgnome-control-center-extension
522 ], have_control_center_embedding="yes", have_control_center_embedding="no")
524 if test "x$have_control_center_embedding" = "xyes"; then
525 AC_DEFINE(HAVE_CONTROL_CENTER_EMBEDDING, 1, [Define if you have the single-window control center])
528 have_control_center_embedding="no"
531 if test "x$enable_control_center_embedding" = "xyes" -a "x$have_control_center_embedding" != "xyes"; then
532 AC_MSG_ERROR([Couldn't find single-window control center dependencies.])
535 AM_CONDITIONAL(HAVE_CONTROL_CENTER_EMBEDDING, test "x$have_control_center_embedding" = "xyes")
536 AC_SUBST(CONTROL_CENTER_EMBEDDING_CFLAGS)
537 AC_SUBST(CONTROL_CENTER_EMBEDDING_LIBS)
539 # -----------------------------------------------------------
540 # Coding style checks
541 # -----------------------------------------------------------
542 AC_ARG_ENABLE(coding-style-checks,
543 AC_HELP_STRING([--disable-coding-style-checks],
544 [don't check coding style using grep]),
545 [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=yes])
547 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
548 # -----------------------------------------------------------
553 data/empathy.desktop.in
554 data/empathy-accounts.desktop.in
559 libempathy-gtk/Makefile
561 nautilus-sendto-plugin/Makefile
564 tests/interactive/Makefile
572 Compiler....................: ${CC}
573 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
574 Prefix......................: ${prefix}
575 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
578 Spell checking (enchant)....: ${have_enchant}
579 Display maps (libchamplain).: ${have_libchamplain}
580 Location awareness (Geoclue): ${have_geoclue}
581 Adium themes (Webkit).......: ${have_webkit}
582 Meego widgets ..............: ${have_meego}
583 Favourite contacts .........: ${have_favourite_contacts}
584 Control center embedding....: ${have_control_center_embedding}
587 Telepathy Logger............: ${enable_tpl}
590 NetworkManager integration..: ${have_nm}
591 ConnMan integration.........: ${have_connman}
594 Nautilus-sendto plugin......: ${have_nst}