1 dnl If not 1, append datestamp to the version number
2 m4_define(empathy_released, 0)
4 m4_define([empathy_major_version], [3])
5 m4_define([empathy_minor_version], [3])
6 m4_define([empathy_micro_version], [5])
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)
24 [http://bugzilla.gnome.org/browse.cgi?product=empathy],
26 [https://live.gnome.org/Empathy])
30 Copyright (C) 2003-2007 Imendio AB
31 Copyright (C) 2007-2010 Collabora Ltd.
34 # Minimal version required
41 GSTREAMER_REQUIRED=0.10.32
42 KEYRING_REQUIRED=2.26.0
44 LIBCANBERRA_GTK_REQUIRED=0.25
45 LIBNOTIFY_REQUIRED=0.7.0
46 TELEPATHY_FARSIGHT_REQUIRED=0.0.18
47 TELEPATHY_FARSTREAM_REQUIRED=0.2.1
48 TELEPATHY_GLIB_REQUIRED=0.17.5
49 TELEPATHY_LOGGER=0.2.10
50 WEBKIT_REQUIRED=1.3.13
54 CLUTTER_REQUIRED=1.7.14
55 CLUTTER_GTK_REQUIRED=0.90.3
56 ENCHANT_REQUIRED=1.2.0
58 ISO_CODES_REQUIRED=0.35
59 NAUTILUS_SENDTO_REQUIRED=2.90.0
60 NETWORK_MANAGER_REQUIRED=0.7.0
61 CHAMPLAIN_REQUIRED=0.12.1
63 # Use --enable-maintainer-mode to disable deprecated symbols,
64 # disable single include and enable GSEAL. If this is not a released empathy,
65 # maintainer mode is forced
66 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
67 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
68 #GNOME_MAINTAINER_MODE_DEFINES
70 # Disable GLib deprecation warnings for now; we don't want to bump the GLib dep
71 # and make things harder for contributiors without good reason. We'll re-enable
72 # those warnings later during the cycle (bgo #662662)
73 AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
76 AC_DEFINE(CLUTTER_DISABLE_DEPRECATION_WARNINGS, 1, [Build with Clutter deprecated])
78 AC_CONFIG_MACRO_DIR([m4])
79 AC_CONFIG_HEADERS([config.h])
80 AC_CONFIG_SRCDIR([configure.ac])
83 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
85 # Support silent build rules. Disable
86 # by either passing --disable-silent-rules to configure or passing V=1
88 AM_SILENT_RULES([yes])
101 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
103 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
104 AC_SUBST(GLIB_GENMARSHAL)
106 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
107 if test -z "$XSLTPROC"; then
108 AC_MSG_ERROR([xsltproc (from libxslt) is required])
110 AM_PATH_PYTHON([2.3])
115 # -----------------------------------------------------------
117 # -----------------------------------------------------------
118 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
119 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
121 AC_ARG_ENABLE(Werror,
122 AS_HELP_STRING([--disable-Werror],
123 [compile without -Werror (normally enabled in development builds)]),
124 werror=$enableval, :)
126 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
127 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
128 wno_missing_field_initializers=yes,
129 wno_missing_field_initializers=no)
130 AS_COMPILER_FLAG(-Wno-unused-parameter,
131 wno_unused_parameter=yes,
132 wno_unused_parameter=no)
134 ifelse(empathy_released, 1, [],
136 if test x$werror = xyes; then
137 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
139 if test x$wextra = xyes -a \
140 x$wno_missing_field_initializers = xyes -a \
141 x$wno_unused_parameter = xyes; then
142 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
146 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
147 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
148 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
149 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
150 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
152 AC_SUBST(ERROR_CFLAGS)
155 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
156 [build with support for gprof]),,
158 if test "x$enable_gprof" != "xno" ; then
160 LDFLAGS="$LDFLAGS -pg"
165 # -----------------------------------------------------------
166 # Pkg-Config dependency checks
167 # -----------------------------------------------------------
172 PKG_CHECK_MODULES(EMPATHY,
175 folks >= $FOLKS_REQUIRED
176 folks-telepathy >= $FOLKS_REQUIRED
177 glib-2.0 >= $GLIB_REQUIRED
178 gio-2.0 >= $GLIB_REQUIRED
179 gio-unix-2.0 >= $GLIB_REQUIRED
180 gnome-keyring-1 >= $KEYRING_REQUIRED
181 gnutls >= $GNUTLS_REQUIRED
184 gsettings-desktop-schemas
185 gstreamer-0.10 >= $GSTREAMER_REQUIRED
186 gstreamer-interfaces-0.10
188 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
189 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
191 gtk+-3.0 >= $GTK_REQUIRED
192 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
193 libnotify >= $LIBNOTIFY_REQUIRED
194 gcr-3 >= $GCR_REQUIRED
196 libpulse-mainloop-glib
197 webkitgtk-3.0 >= $WEBKIT_REQUIRED
201 PKG_CHECK_MODULES(EMPATHY_AV,
204 telepathy-farsight >= $TELEPATHY_FARSIGHT_REQUIRED
207 PKG_CHECK_MODULES(EMPATHY_CALL,
210 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
211 clutter-1.0 >= $CLUTTER_REQUIRED
216 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
217 [Name of provider for accounts imported from GOA])
219 # -----------------------------------------------------------
220 # Call support in tp-logger
221 # -----------------------------------------------------------
222 AC_ARG_ENABLE(call-logs,
223 AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
224 [build with call logs support]),,
225 [enable_call_logs=auto])
226 if test "x$enable_call_logs" != "xno" ; then
228 SAVE_CPPFLAGS=$CPPFLAGS
229 SAVE_LDFLAGS=$LDFLAGS
230 CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
231 CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
232 LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
234 AC_CHECK_HEADER(telepathy-logger/call-event.h,
235 have_call_logs="yes", have_call_logs="no")
238 CPPFLAGS=$SAVE_CPPFLAGS
239 LDFLAGS=$SAVE_LDFLAGS
241 if test "x$have_call_logs" = "xyes"; then
242 AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
248 if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
249 AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
250 built with --enable-call])
253 # -----------------------------------------------------------
254 # evolution-data-server (about-me)
255 # -----------------------------------------------------------
257 AS_HELP_STRING([--with-eds],
258 [build with evolution-data-server support]),,
260 if test x"$with_eds" = x"yes" ; then
261 PKG_CHECK_MODULES(EDS, [libebook-1.2])
262 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
265 # -----------------------------------------------------------
267 # -----------------------------------------------------------
270 AS_HELP_STRING([--disable-debug],
271 [compile without debug code]),
272 enable_debug=$enableval, enable_debug=yes )
274 if test x$enable_debug = xyes; then
275 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
278 # -----------------------------------------------------------
280 # -----------------------------------------------------------
281 IT_PROG_INTLTOOL([0.40.0])
283 AM_GNU_GETTEXT_VERSION([0.17])
284 AM_GNU_GETTEXT([external])
286 GETTEXT_PACKAGE=empathy
287 AC_SUBST(GETTEXT_PACKAGE)
288 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
290 # -----------------------------------------------------------
291 # Connectivity integration
292 # -----------------------------------------------------------
293 AC_ARG_WITH(connectivity,
294 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
295 [build with connectivity support]), ,
296 with_connectivity=auto)
298 if test "x$with_connectivity" = "xno"; then
302 elif test "x$with_connectivity" = "xconnman"; then
305 PKG_CHECK_MODULES(CONNMAN,
308 ], have_connman="yes", have_connman="no")
310 if test "x$have_connman" = "xyes"; then
311 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
317 PKG_CHECK_MODULES(NETWORK_MANAGER,
319 libnm-glib >= $NETWORK_MANAGER_REQUIRED
320 ], have_nm="yes", have_nm="no")
322 if test "x$have_nm" = "xyes"; then
323 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
327 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
328 AC_MSG_ERROR([Couldn't find connman dependencies:
330 $CONNMAN_PKG_ERRORS])
333 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
334 AC_MSG_ERROR([Couldn't find Network Manager dependencies:
336 $NETWORK_MANAGER_PKG_ERRORS])
339 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
340 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
342 # -----------------------------------------------------------
344 # -----------------------------------------------------------
346 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
347 [build with gudev support]), ,
350 if test "x$enable_gudev" != "xno"; then
352 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
353 have_gudev="yes", have_gudev="no")
355 if test "x$have_gudev" = "xyes"; then
356 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
362 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
363 AC_MSG_ERROR([Could not find gudev dependencies:
367 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
369 # -----------------------------------------------------------
370 # spellchecking checks: enchant and iso-codes
371 # -----------------------------------------------------------
373 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
374 [Enable spell checking]), ,
377 if test "x$enable_spell" != "xno"; then
378 PKG_CHECK_MODULES(ENCHANT,
380 enchant >= $ENCHANT_REQUIRED,
381 iso-codes >= $ISO_CODES_REQUIRED
382 ], have_enchant="yes", have_enchant="no")
384 if test "x$have_enchant" = "xyes"; then
385 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
386 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
387 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
388 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
389 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
395 AC_MSG_RESULT([$result])
401 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
402 AC_MSG_ERROR([Could not find spell-checking dependencies:
404 $ENCHANT_PKG_ERRORS])
407 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
409 # -----------------------------------------------------------
410 # Map view checks: libchamplain
411 # -----------------------------------------------------------
413 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
414 [Enable map view]), ,
417 if test "x$enable_map" != "xno"; then
419 PKG_CHECK_MODULES(LIBCHAMPLAIN,
423 champlain-0.12 >= $CHAMPLAIN_REQUIRED
424 ], have_libchamplain="yes", have_libchamplain="no")
426 if test "x$have_libchamplain" = "xyes"; then
427 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
433 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
434 AC_MSG_ERROR([Could not find map view dependencies:
436 $LIBCHAMPLAIN_PKG_ERRORS])
439 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
441 # -----------------------------------------------------------
442 # location checks: geoclue
443 # -----------------------------------------------------------
444 AC_ARG_ENABLE(location,
445 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
446 [Enable location awareness]), ,
447 enable_location=auto)
449 if test "x$enable_location" != "xno"; then
450 PKG_CHECK_MODULES(GEOCLUE,
452 geoclue >= $GEOCLUE_REQUIRED
453 ], have_geoclue="yes", have_geoclue="no")
455 if test "x$have_geoclue" = "xyes"; then
456 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
462 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
463 AC_MSG_ERROR([Could not find location dependencies:
465 $GEOCLUE_PKG_ERRORS])
468 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
469 AC_SUBST(GEOCLUE_CFLAGS)
470 AC_SUBST(GEOCLUE_LIBS)
472 # -----------------------------------------------------------
473 # location checks: geocode-glib
474 # -----------------------------------------------------------
475 AC_ARG_ENABLE(geocode,
476 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
477 [Enable geocode support]), ,
480 if test "x$enable_geocode" != "xno"; then
481 PKG_CHECK_MODULES(GEOCODE,
484 ], have_geocode="yes", have_geocode="no")
486 if test "x$have_geocode" = "xyes"; then
487 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
493 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
494 AC_MSG_ERROR([Could not find geocode dependencies:
496 $GEOCODE_PKG_ERRORS])
499 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
500 AC_SUBST(GEOCODE_CFLAGS)
501 AC_SUBST(GEOCODE_LIBS)
503 # -----------------------------------------------------------
504 # meego widgets support
505 # -----------------------------------------------------------
507 AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
508 [Enable meego widgets]), ,
511 if test "x$enable_meego" != "xno"; then
512 PKG_CHECK_MODULES(MEEGO,
516 ], have_meego="yes", have_meego="no")
518 if test "x$have_meego" = "xyes"; then
519 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
525 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
526 AC_MSG_ERROR([Could not find meego dependencies:
531 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
532 AC_SUBST(MEEGO_CFLAGS)
535 # -----------------------------------------------------------
537 # -----------------------------------------------------------
538 AC_ARG_ENABLE(nautilus-sendto,
539 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
540 [build nautilus-sendto plugin]), ,
541 enable_nautilus_sendto=auto)
543 if test "x$enable_nautilus_sendto" != "xno"; then
544 PKG_CHECK_MODULES(NST,
546 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
547 ], have_nst="yes", have_nst="no")
552 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
553 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
558 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
560 # -----------------------------------------------------------
562 # -----------------------------------------------------------
564 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
565 [build GOA MC plugin]), ,
568 if test "x$enable_goa" != "xno"; then
569 PKG_CHECK_MODULES(GOA,
571 mission-control-plugins
572 goa-1.0 >= $GOA_REQUIRED
573 ], have_goa="yes", have_goa="no")
575 AC_MSG_CHECKING([Mission Control plugins dir])
576 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
578 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
579 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
584 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
585 AC_MSG_ERROR([Could not find GOA dependencies.])
588 if test "x$have_goa" = "xyes"; then
589 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
592 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
594 # Optional dependency for avatar selection
595 AC_ARG_WITH([cheese],
596 AS_HELP_STRING([--with-cheese],
597 [enable cheese webcam support]),,
600 if test x"$with_cheese" != x"no" ; then
601 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
602 if test x${have_cheese} = xyes; then
603 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
605 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
606 AC_MSG_ERROR([Cheese configured but not found:
613 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
618 # -----------------------------------------------------------
619 # Coding style checks
620 # -----------------------------------------------------------
621 AC_ARG_ENABLE(coding-style-checks,
622 AS_HELP_STRING([--disable-coding-style-checks],
623 [do not check coding style using grep]),
624 [ENABLE_CODING_STYLE_CHECKS=$enableval],
625 [ENABLE_CODING_STYLE_CHECKS=yes])
627 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
628 # -----------------------------------------------------------
633 data/empathy.desktop.in
634 data/empathy-accounts.desktop.in
639 libempathy-gtk/Makefile
641 nautilus-sendto-plugin/Makefile
642 goa-mc-plugin/Makefile
645 tests/interactive/Makefile
654 Compiler....................: ${CC}
655 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
656 Linker Flags................: ${LDFLAGS}
657 Prefix......................: ${prefix}
658 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
661 Spell checking (enchant)....: ${have_enchant}
662 Display maps (libchamplain).: ${have_libchamplain}
663 Location awareness (Geoclue): ${have_geoclue}
664 Geocode support (Geocode)...: ${have_geocode}
665 Meego widgets...............: ${have_meego}
666 Cheese webcam support ......: ${have_cheese}
667 Camera monitoring...........: ${have_gudev}
670 NetworkManager integration..: ${have_nm}
671 ConnMan integration.........: ${have_connman}
674 Nautilus-sendto plugin......: ${have_nst}
675 GOA MC plugin...............: ${have_goa}
676 Salut E-D-S support.........: ${with_eds}
677 Exp. Call log support.......: ${have_call_logs}