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], [1])
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.11.1
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 disable deprecated symbols and single include.
51 # If this is not a released empathy, maintainer mode is forced
52 ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
53 GNOME_MAINTAINER_MODE_DEFINES
55 AC_CONFIG_MACRO_DIR([m4])
56 AC_CONFIG_HEADERS([config.h])
57 AC_CONFIG_SRCDIR([configure.ac])
62 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define -Wno-portability)
64 # Support silent build rules, requires at least automake-1.11. Disable
65 # by either passing --disable-silent-rules to configure or passing V=1
67 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
76 IT_PROG_INTLTOOL([0.35.0])
77 GNOME_DOC_INIT([0.17.3])
79 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
80 AC_PATH_PROG(GCONFTOOL, gconftool-2)
82 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
83 AC_SUBST(GLIB_GENMARSHAL)
84 CONTROL_CENTER_EXTENSIONDIR=`$PKG_CONFIG --variable=extensiondir libgnome-control-center-extension`
85 AC_SUBST(CONTROL_CENTER_EXTENSIONDIR)
87 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
88 if test -z "$XSLTPROC"; then
89 AC_MSG_ERROR([xsltproc (from libxslt) is required])
96 # -----------------------------------------------------------
98 # -----------------------------------------------------------
99 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
100 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
102 AC_ARG_ENABLE(Werror,
103 AC_HELP_STRING([--disable-Werror],[compile without -Werror (normally enabled in development builds)]),
104 werror=$enableval, :)
106 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
107 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
108 wno_missing_field_initializers=yes,
109 wno_missing_field_initializers=no)
110 AS_COMPILER_FLAG(-Wno-unused-parameter,
111 wno_unused_parameter=yes,
112 wno_unused_parameter=no)
114 ifelse(empathy_released, 1, [],
116 if test x$werror = xyes; then
117 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
119 if test x$wextra = xyes -a \
120 x$wno_missing_field_initializers = xyes -a \
121 x$wno_unused_parameter = xyes; then
122 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
126 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
127 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
128 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
129 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
130 # Disabled because some GTK+ headers (like gtkitemfactory.h) are bugged :(
131 #AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
133 AC_SUBST(ERROR_CFLAGS)
135 # -----------------------------------------------------------
137 # -----------------------------------------------------------
139 # It needs to be defined before PKG_CHECK_MODULES calls
141 AC_HELP_STRING([--enable-tpl],[enable telepathy-logger code and disable the
142 empathy logger]), enable_tpl=$enableval, enable_tpl=no )
143 AM_CONDITIONAL(ENABLE_TPL, test "x$enable_tpl" = "xyes")
145 if test x${enable_tpl} = xyes; then
146 AC_DEFINE(ENABLE_TPL, [], [Enable TPL code])
149 if test "x$enable_tpl" = "xyes"; then
150 PKG_CHECK_MODULES(TPL,
152 telepathy-logger = $TELEPATHY_LOGGER
159 # -----------------------------------------------------------
160 # Pkg-Config dependency checks
161 # -----------------------------------------------------------
163 PKG_CHECK_MODULES(LIBEMPATHY,
165 glib-2.0 >= $GLIB_REQUIRED
167 gio-2.0 >= $GLIB_REQUIRED
168 gio-unix-2.0 >= $GLIB_REQUIRED
170 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
176 PKG_CHECK_MODULES(LIBEMPATHYGTK,
178 glib-2.0 >= $GLIB_REQUIRED
180 gio-2.0 >= $GLIB_REQUIRED
181 gconf-2.0 >= $GCONF_REQUIRED
183 gtk+-2.0 >= $GTK_REQUIRED
184 libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
185 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
188 gstreamer-interfaces-0.10
191 PKG_CHECK_MODULES(EMPATHY,
193 glib-2.0 >= $GLIB_REQUIRED
195 gio-2.0 >= $GLIB_REQUIRED
197 gtk+-2.0 >= $GTK_REQUIRED
200 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
205 gnome-keyring-1 >= $KEYRING_REQUIRED
208 PKG_CHECK_MODULES(LIBEMPATHY_ACCOUNTS_PANEL,
210 glib-2.0 >= $GLIB_REQUIRED
212 gio-2.0 >= $GLIB_REQUIRED
214 gtk+-2.0 >= $GTK_REQUIRED
217 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
219 gnome-keyring-1 >= $KEYRING_REQUIRED
222 PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
224 # -----------------------------------------------------------
226 # -----------------------------------------------------------
229 AC_HELP_STRING([--disable-debug],[compile without debug code]),
230 enable_debug=$enableval, enable_debug=yes )
232 if test x$enable_debug = xyes; then
233 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
236 # -----------------------------------------------------------
238 # -----------------------------------------------------------
240 GETTEXT_PACKAGE=empathy
241 AC_SUBST(GETTEXT_PACKAGE)
242 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
246 # -----------------------------------------------------------
247 # Connectivity integration
248 # -----------------------------------------------------------
249 AC_ARG_WITH(connectivity,
250 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
251 [build with connectivity support]), ,
252 with_connectivity=auto)
254 if test "x$with_connectivity" = "xno"; then
258 elif test "x$with_connectivity" = "xconnman"; then
260 PKG_CHECK_MODULES(CONNMAN,
263 ], have_connman="yes", have_connman="no")
265 if test "x$have_connman" = "xyes"; then
266 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
272 PKG_CHECK_MODULES(NETWORK_MANAGER,
274 libnm_glib >= $NETWORK_MANAGER_REQUIRED
275 ], have_nm="yes", have_nm="no")
277 if test "x$have_nm" = "xyes"; then
278 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
281 PKG_CHECK_MODULES(NETWORK_MANAGER,
283 libnm-glib >= $NETWORK_MANAGER_REQUIRED
284 ], have_nm="yes", have_nm="no")
286 if test "x$have_nm" = "xyes"; then
287 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
293 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
294 AC_MSG_ERROR([Couldn't find connman dependencies.])
297 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
298 AC_MSG_ERROR([Couldn't find libnm-glib dependencies.])
301 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
302 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
304 # -----------------------------------------------------------
306 # -----------------------------------------------------------
307 AC_ARG_ENABLE(webkit,
308 AS_HELP_STRING([--enable-webkit=@<:@no/yes/auto@:>@],
309 [build with webkit support]), ,
312 if test "x$enable_webkit" != "xno"; then
313 PKG_CHECK_MODULES(WEBKIT,
315 webkit-1.0 >= $WEBKIT_REQUIRED
316 ], have_webkit="yes", have_webkit="no")
318 if test "x$have_webkit" = "xyes"; then
319 AC_DEFINE(HAVE_WEBKIT, 1, [Define if you have libwebkitgtk])
325 if test "x$enable_webkit" = "xyes" -a "x$have_webkit" != "xyes"; then
326 AC_MSG_ERROR([Couldn't find webkit dependencies.])
328 AM_CONDITIONAL(HAVE_WEBKIT, test "x$have_webkit" = "xyes")
330 # -----------------------------------------------------------
331 # spellchecking checks: enchant and iso-codes
332 # -----------------------------------------------------------
334 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
335 [Enable spell checking]), ,
338 if test "x$enable_spell" != "xno"; then
339 PKG_CHECK_MODULES(ENCHANT,
341 enchant >= $ENCHANT_REQUIRED,
342 iso-codes >= $ISO_CODES_REQUIRED
343 ], have_enchant="yes", have_enchant="no")
345 if test "x$have_enchant" = "xyes"; then
346 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
347 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
348 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
349 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
350 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
356 AC_MSG_RESULT([$result])
362 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
363 AC_MSG_ERROR([Couldn't find spell dependencies.])
366 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
368 # -----------------------------------------------------------
369 # Map view checks: libchamplain
370 # -----------------------------------------------------------
372 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
373 [Enable map view]), ,
376 if test "x$enable_map" != "xno"; then
377 PKG_CHECK_MODULES(LIBCHAMPLAIN,
379 champlain-0.4 >= $LIBCHAMPLAIN_REQUIRED,
380 champlain-gtk-0.4 >= $LIBCHAMPLAIN_GTK_REQUIRED
381 clutter-gtk-0.10 >= $CLUTTER_GTK_REQUIRED
382 ], have_libchamplain="yes", have_libchamplain="no")
384 if test "x$have_libchamplain" = "xyes"; then
385 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
391 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
392 AC_MSG_ERROR([Couldn't find map view dependencies.])
395 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
397 # -----------------------------------------------------------
398 # location checks: geoclue
399 # -----------------------------------------------------------
400 AC_ARG_ENABLE(location,
401 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
402 [Enable location awareness]), ,
403 enable_location=auto)
405 if test "x$enable_location" != "xno"; then
406 PKG_CHECK_MODULES(GEOCLUE,
408 geoclue >= $GEOCLUE_REQUIRED
409 ], have_geoclue="yes", have_geoclue="no")
411 if test "x$have_geoclue" = "xyes"; then
412 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
418 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
419 AC_MSG_ERROR([Couldn't find location dependencies.])
422 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
423 AC_SUBST(GEOCLUE_CFLAGS)
424 AC_SUBST(GEOCLUE_LIBS)
426 # -----------------------------------------------------------
427 # meego widgets support
428 # -----------------------------------------------------------
430 AS_HELP_STRING([--enable-meego=@<:no/yes@:>@],
431 [Enable meego widgets]), ,
434 if test "x$enable_meego" != "xno"; then
435 PKG_CHECK_MODULES(MEEGO,
438 ], have_meego="yes", have_meego="no")
440 if test "x$have_meego" = "xyes"; then
441 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
442 chain_enable_favourite_contacts="yes"
448 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
449 AC_MSG_ERROR([Couldn't find meego dependencies.])
452 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
453 AC_SUBST(MEEGO_CFLAGS)
456 # -----------------------------------------------------------
457 # favourite contacts support
458 # -----------------------------------------------------------
459 AC_ARG_ENABLE(favourite_contacts,
460 AS_HELP_STRING([--enable-favourite-contacts=@<:no/yes@:>@],
461 [Enable favourite contacts]), ,
462 enable_favourite_contacts=no)
464 if test "x$enable_favourite_contacts" != "xno" -o "x$chain_enable_favourite_contacts" == "xyes"; then
465 PKG_CHECK_MODULES(TELEPATHY_LOGGER,
468 ], have_telepathy_logger="yes", have_telepathy_logger="no")
470 if test "x$have_telepathy_logger" = "xyes"; then
471 have_favourite_contacts="yes"
472 AC_DEFINE(HAVE_FAVOURITE_CONTACTS, 1, [Define if you want favourite contacts support])
475 have_favourite_contacts="no"
478 if test "x$enable_favourite_contacts" = "xyes" -a "x$have_favourite_contacts" != "xyes"; then
479 AC_MSG_ERROR([Couldn't find favourite contacts dependencies.])
482 AM_CONDITIONAL(HAVE_FAVOURITE_CONTACTS, test "x$have_telepathy_logger" = "xyes")
484 # -----------------------------------------------------------
486 # -----------------------------------------------------------
487 AC_ARG_ENABLE(nautilus-sendto,
488 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
489 [build nautilus-sendto plugin]), ,
490 enable_nautilus_sendto=auto)
492 if test "x$enable_nautilus_sendto" != "xno"; then
493 PKG_CHECK_MODULES(NST,
495 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
496 ], have_nst="yes", have_nst="no")
501 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
502 AC_MSG_ERROR([Couldn't find nautilus-sendto dependencies.])
505 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
507 # -----------------------------------------------------------
508 # new, single-window control center
509 # -----------------------------------------------------------
510 AC_ARG_ENABLE(control_center_embedding,
511 AS_HELP_STRING([--enable-control-center-embedding=@<:@no/yes/auto@:>@],
512 [Enable support for single-window control center]),
513 , enable_control_center_embedding=auto)
515 if test "x$enable_control_center_embedding" != "xno"; then
516 PKG_CHECK_MODULES(CONTROL_CENTER_EMBEDDING,
518 libgnome-control-center-extension
519 ], have_control_center_embedding="yes", have_control_center_embedding="no")
521 if test "x$have_control_center_embedding" = "xyes"; then
522 AC_DEFINE(HAVE_CONTROL_CENTER_EMBEDDING, 1, [Define if you have the single-window control center])
525 have_control_center_embedding="no"
528 if test "x$enable_control_center_embedding" = "xyes" -a "x$have_control_center_embedding" != "xyes"; then
529 AC_MSG_ERROR([Couldn't find single-window control center dependencies.])
532 AM_CONDITIONAL(HAVE_CONTROL_CENTER_EMBEDDING, test "x$have_control_center_embedding" = "xyes")
533 AC_SUBST(CONTROL_CENTER_EMBEDDING_CFLAGS)
534 AC_SUBST(CONTROL_CENTER_EMBEDDING_LIBS)
536 # -----------------------------------------------------------
537 # Coding style checks
538 # -----------------------------------------------------------
539 AC_ARG_ENABLE(coding-style-checks,
540 AC_HELP_STRING([--disable-coding-style-checks],
541 [don't check coding style using grep]),
542 [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=yes])
544 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
545 # -----------------------------------------------------------
550 data/empathy.desktop.in
551 data/empathy-accounts.desktop.in
556 libempathy-gtk/Makefile
558 nautilus-sendto-plugin/Makefile
561 tests/interactive/Makefile
569 Compiler....................: ${CC}
570 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
571 Prefix......................: ${prefix}
572 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
575 Spell checking (enchant)....: ${have_enchant}
576 Display maps (libchamplain).: ${have_libchamplain}
577 Location awareness (Geoclue): ${have_geoclue}
578 Adium themes (Webkit).......: ${have_webkit}
579 Meego widgets ..............: ${have_meego}
580 Favourite contacts .........: ${have_favourite_contacts}
581 Control center embedding....: ${have_control_center_embedding}
584 Telepathy Logger............: ${enable_tpl}
587 NetworkManager integration..: ${have_nm}
588 ConnMan integration.........: ${have_connman}
591 Nautilus-sendto plugin......: ${have_nst}