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], [31])
6 m4_define([empathy_micro_version], [3])
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.7
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
51 # Use --enable-maintainer-mode to disable deprecated symbols,
52 # disable single include and enable GSEAL. If this is not a released empathy,
53 # maintainer mode is forced
54 ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
55 GNOME_MAINTAINER_MODE_DEFINES
56 if test $USE_MAINTAINER_MODE = yes; then
57 AC_DEFINE(GSEAL_ENABLE, [], [Seal public structs to force usage of accessors])
60 AC_CONFIG_MACRO_DIR([m4])
61 AC_CONFIG_HEADERS([config.h])
62 AC_CONFIG_SRCDIR([configure.ac])
67 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define -Wno-portability)
69 # Support silent build rules, requires at least automake-1.11. Disable
70 # by either passing --disable-silent-rules to configure or passing V=1
72 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
81 IT_PROG_INTLTOOL([0.35.0])
82 GNOME_DOC_INIT([0.17.3])
84 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
85 AC_PATH_PROG(GCONFTOOL, gconftool-2)
87 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
88 AC_SUBST(GLIB_GENMARSHAL)
89 CONTROL_CENTER_EXTENSIONDIR=`$PKG_CONFIG --variable=extensiondir libgnome-control-center-extension`
90 AC_SUBST(CONTROL_CENTER_EXTENSIONDIR)
92 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
93 if test -z "$XSLTPROC"; then
94 AC_MSG_ERROR([xsltproc (from libxslt) is required])
101 # -----------------------------------------------------------
103 # -----------------------------------------------------------
104 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
105 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
107 AC_ARG_ENABLE(Werror,
108 AC_HELP_STRING([--disable-Werror],[compile without -Werror (normally enabled in development builds)]),
109 werror=$enableval, :)
111 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
112 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
113 wno_missing_field_initializers=yes,
114 wno_missing_field_initializers=no)
115 AS_COMPILER_FLAG(-Wno-unused-parameter,
116 wno_unused_parameter=yes,
117 wno_unused_parameter=no)
119 ifelse(empathy_released, 1, [],
121 if test x$werror = xyes; then
122 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
124 if test x$wextra = xyes -a \
125 x$wno_missing_field_initializers = xyes -a \
126 x$wno_unused_parameter = xyes; then
127 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
131 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
132 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
133 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
134 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
135 # Disabled because some GTK+ headers (like gtkitemfactory.h) are bugged :(
136 #AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
138 AC_SUBST(ERROR_CFLAGS)
140 # -----------------------------------------------------------
142 # -----------------------------------------------------------
144 # It needs to be defined before PKG_CHECK_MODULES calls
146 AC_HELP_STRING([--enable-tpl],[enable telepathy-logger code and disable the
147 empathy logger]), enable_tpl=$enableval, enable_tpl=no )
148 AM_CONDITIONAL(ENABLE_TPL, test "x$enable_tpl" = "xyes")
150 if test x${enable_tpl} = xyes; then
151 AC_DEFINE(ENABLE_TPL, [], [Enable TPL code])
154 if test "x$enable_tpl" = "xyes"; then
155 PKG_CHECK_MODULES(TPL,
157 telepathy-logger = $TELEPATHY_LOGGER
164 # -----------------------------------------------------------
165 # Pkg-Config dependency checks
166 # -----------------------------------------------------------
168 PKG_CHECK_MODULES(LIBEMPATHY,
170 glib-2.0 >= $GLIB_REQUIRED
172 gio-2.0 >= $GLIB_REQUIRED
173 gio-unix-2.0 >= $GLIB_REQUIRED
175 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
181 PKG_CHECK_MODULES(LIBEMPATHYGTK,
183 glib-2.0 >= $GLIB_REQUIRED
185 gio-2.0 >= $GLIB_REQUIRED
186 gconf-2.0 >= $GCONF_REQUIRED
188 gtk+-2.0 >= $GTK_REQUIRED
189 libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
190 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
193 gstreamer-interfaces-0.10
196 PKG_CHECK_MODULES(EMPATHY,
198 glib-2.0 >= $GLIB_REQUIRED
200 gio-2.0 >= $GLIB_REQUIRED
202 gtk+-2.0 >= $GTK_REQUIRED
205 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
209 unique-1.0 >= $UNIQUE_REQUIRED
210 gnome-keyring-1 >= $KEYRING_REQUIRED
213 PKG_CHECK_MODULES(LIBEMPATHY_ACCOUNTS_PANEL,
215 glib-2.0 >= $GLIB_REQUIRED
217 gio-2.0 >= $GLIB_REQUIRED
219 gtk+-2.0 >= $GTK_REQUIRED
222 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
223 unique-1.0 >= $UNIQUE_REQUIRED
224 gnome-keyring-1 >= $KEYRING_REQUIRED
227 PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
229 # -----------------------------------------------------------
231 # -----------------------------------------------------------
234 AC_HELP_STRING([--disable-debug],[compile without debug code]),
235 enable_debug=$enableval, enable_debug=yes )
237 if test x$enable_debug = xyes; then
238 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
241 # -----------------------------------------------------------
243 # -----------------------------------------------------------
245 GETTEXT_PACKAGE=empathy
246 AC_SUBST(GETTEXT_PACKAGE)
247 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
251 # -----------------------------------------------------------
252 # Connectivity integration
253 # -----------------------------------------------------------
254 AC_ARG_WITH(connectivity,
255 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
256 [build with connectivity support]), ,
257 with_connectivity=auto)
259 if test "x$with_connectivity" = "xno"; then
263 elif test "x$with_connectivity" = "xconnman"; then
265 PKG_CHECK_MODULES(CONNMAN,
268 ], have_connman="yes", have_connman="no")
270 if test "x$have_connman" = "xyes"; then
271 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
277 PKG_CHECK_MODULES(NETWORK_MANAGER,
279 libnm_glib >= $NETWORK_MANAGER_REQUIRED
280 ], have_nm="yes", have_nm="no")
282 if test "x$have_nm" = "xyes"; then
283 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
286 PKG_CHECK_MODULES(NETWORK_MANAGER,
288 libnm-glib >= $NETWORK_MANAGER_REQUIRED
289 ], have_nm="yes", have_nm="no")
291 if test "x$have_nm" = "xyes"; then
292 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
298 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
299 AC_MSG_ERROR([Couldn't find connman dependencies.])
302 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
303 AC_MSG_ERROR([Couldn't find libnm-glib dependencies.])
306 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
307 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
309 # -----------------------------------------------------------
311 # -----------------------------------------------------------
312 AC_ARG_ENABLE(webkit,
313 AS_HELP_STRING([--enable-webkit=@<:@no/yes/auto@:>@],
314 [build with webkit support]), ,
317 if test "x$enable_webkit" != "xno"; then
318 PKG_CHECK_MODULES(WEBKIT,
320 webkit-1.0 >= $WEBKIT_REQUIRED
321 ], have_webkit="yes", have_webkit="no")
323 if test "x$have_webkit" = "xyes"; then
324 AC_DEFINE(HAVE_WEBKIT, 1, [Define if you have libwebkitgtk])
330 if test "x$enable_webkit" = "xyes" -a "x$have_webkit" != "xyes"; then
331 AC_MSG_ERROR([Couldn't find webkit dependencies.])
333 AM_CONDITIONAL(HAVE_WEBKIT, test "x$have_webkit" = "xyes")
335 # -----------------------------------------------------------
336 # spellchecking checks: enchant and iso-codes
337 # -----------------------------------------------------------
339 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
340 [Enable spell checking]), ,
343 if test "x$enable_spell" != "xno"; then
344 PKG_CHECK_MODULES(ENCHANT,
346 enchant >= $ENCHANT_REQUIRED,
347 iso-codes >= $ISO_CODES_REQUIRED
348 ], have_enchant="yes", have_enchant="no")
350 if test "x$have_enchant" = "xyes"; then
351 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
352 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
353 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
354 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
355 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
361 AC_MSG_RESULT([$result])
367 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
368 AC_MSG_ERROR([Couldn't find spell dependencies.])
371 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
373 # -----------------------------------------------------------
374 # Map view checks: libchamplain
375 # -----------------------------------------------------------
377 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
378 [Enable map view]), ,
381 if test "x$enable_map" != "xno"; then
382 PKG_CHECK_MODULES(LIBCHAMPLAIN,
384 champlain-0.4 >= $LIBCHAMPLAIN_REQUIRED,
385 champlain-gtk-0.4 >= $LIBCHAMPLAIN_GTK_REQUIRED
386 clutter-gtk-0.10 >= $CLUTTER_GTK_REQUIRED
387 ], have_libchamplain="yes", have_libchamplain="no")
389 if test "x$have_libchamplain" = "xyes"; then
390 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
396 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
397 AC_MSG_ERROR([Couldn't find map view dependencies.])
400 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
402 # -----------------------------------------------------------
403 # location checks: geoclue
404 # -----------------------------------------------------------
405 AC_ARG_ENABLE(location,
406 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
407 [Enable location awareness]), ,
408 enable_location=auto)
410 if test "x$enable_location" != "xno"; then
411 PKG_CHECK_MODULES(GEOCLUE,
413 geoclue >= $GEOCLUE_REQUIRED
414 ], have_geoclue="yes", have_geoclue="no")
416 if test "x$have_geoclue" = "xyes"; then
417 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
423 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
424 AC_MSG_ERROR([Couldn't find location dependencies.])
427 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
428 AC_SUBST(GEOCLUE_CFLAGS)
429 AC_SUBST(GEOCLUE_LIBS)
431 # -----------------------------------------------------------
432 # meego widgets support
433 # -----------------------------------------------------------
435 AS_HELP_STRING([--enable-meego=@<:no/yes@:>@],
436 [Enable meego widgets]), ,
439 if test "x$enable_meego" != "xno"; then
440 PKG_CHECK_MODULES(MEEGO,
443 ], have_meego="yes", have_meego="no")
445 if test "x$have_meego" = "xyes"; then
446 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
447 chain_enable_favourite_contacts="yes"
453 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
454 AC_MSG_ERROR([Couldn't find meego dependencies.])
457 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
458 AC_SUBST(MEEGO_CFLAGS)
461 # -----------------------------------------------------------
462 # favourite contacts support
463 # -----------------------------------------------------------
464 AC_ARG_ENABLE(favourite_contacts,
465 AS_HELP_STRING([--enable-favourite-contacts=@<:no/yes@:>@],
466 [Enable favourite contacts]), ,
467 enable_favourite_contacts=no)
469 if test "x$enable_favourite_contacts" != "xno" || test "x$chain_enable_favourite_contacts" = "xyes"; then
470 PKG_CHECK_MODULES(TELEPATHY_LOGGER,
473 ], have_telepathy_logger="yes", have_telepathy_logger="no")
475 if test "x$have_telepathy_logger" = "xyes"; then
476 have_favourite_contacts="yes"
477 AC_DEFINE(HAVE_FAVOURITE_CONTACTS, 1, [Define if you want favourite contacts support])
480 have_favourite_contacts="no"
483 if test "x$enable_favourite_contacts" = "xyes" && test "x$have_favourite_contacts" != "xyes"; then
484 AC_MSG_ERROR([Couldn't find favourite contacts dependencies.])
487 AM_CONDITIONAL(HAVE_FAVOURITE_CONTACTS, test "x$have_telepathy_logger" = "xyes")
489 # -----------------------------------------------------------
491 # -----------------------------------------------------------
492 AC_ARG_ENABLE(nautilus-sendto,
493 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
494 [build nautilus-sendto plugin]), ,
495 enable_nautilus_sendto=auto)
497 if test "x$enable_nautilus_sendto" != "xno"; then
498 PKG_CHECK_MODULES(NST,
500 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
501 ], have_nst="yes", have_nst="no")
506 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
507 AC_MSG_ERROR([Couldn't find nautilus-sendto dependencies.])
510 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
512 # -----------------------------------------------------------
513 # new, single-window control center
514 # -----------------------------------------------------------
515 AC_ARG_ENABLE(control_center_embedding,
516 AS_HELP_STRING([--enable-control-center-embedding=@<:@no/yes/auto@:>@],
517 [Enable support for single-window control center]),
518 , enable_control_center_embedding=auto)
520 if test "x$enable_control_center_embedding" != "xno"; then
521 PKG_CHECK_MODULES(CONTROL_CENTER_EMBEDDING,
523 libgnome-control-center-extension
524 ], have_control_center_embedding="yes", have_control_center_embedding="no")
526 if test "x$have_control_center_embedding" = "xyes"; then
527 AC_DEFINE(HAVE_CONTROL_CENTER_EMBEDDING, 1, [Define if you have the single-window control center])
530 have_control_center_embedding="no"
533 if test "x$enable_control_center_embedding" = "xyes" -a "x$have_control_center_embedding" != "xyes"; then
534 AC_MSG_ERROR([Couldn't find single-window control center dependencies.])
537 AM_CONDITIONAL(HAVE_CONTROL_CENTER_EMBEDDING, test "x$have_control_center_embedding" = "xyes")
538 AC_SUBST(CONTROL_CENTER_EMBEDDING_CFLAGS)
539 AC_SUBST(CONTROL_CENTER_EMBEDDING_LIBS)
541 # -----------------------------------------------------------
542 # Coding style checks
543 # -----------------------------------------------------------
544 AC_ARG_ENABLE(coding-style-checks,
545 AC_HELP_STRING([--disable-coding-style-checks],
546 [don't check coding style using grep]),
547 [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=yes])
549 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
550 # -----------------------------------------------------------
555 data/empathy.desktop.in
556 data/empathy-accounts.desktop.in
561 libempathy-gtk/Makefile
563 nautilus-sendto-plugin/Makefile
566 tests/interactive/Makefile
574 Compiler....................: ${CC}
575 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
576 Prefix......................: ${prefix}
577 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
580 Spell checking (enchant)....: ${have_enchant}
581 Display maps (libchamplain).: ${have_libchamplain}
582 Location awareness (Geoclue): ${have_geoclue}
583 Adium themes (Webkit).......: ${have_webkit}
584 Meego widgets ..............: ${have_meego}
585 Favourite contacts .........: ${have_favourite_contacts}
586 Control center embedding....: ${have_control_center_embedding}
589 Telepathy Logger............: ${enable_tpl}
592 NetworkManager integration..: ${have_nm}
593 ConnMan integration.........: ${have_connman}
596 Nautilus-sendto plugin......: ${have_nst}