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], [91])
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 AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_30, [Ignore post 2.30 deprecations])
42 AC_DEFINE(GLIB_VERSION_MAX_REQUIRED, GLIB_VERSION_2_30, [Prevent post 2.30 APIs])
45 AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_0, [Ignore post 3.0 deprecations])
46 AC_DEFINE(GDK_VERSION_MAX_REQUIRED, GDK_VERSION_3_0, [Prevent post 3.0 APIs])
48 GSTREAMER_REQUIRED=0.10.32
49 KEYRING_REQUIRED=2.26.0
51 LIBCANBERRA_GTK_REQUIRED=0.25
52 LIBNOTIFY_REQUIRED=0.7.0
53 TELEPATHY_FARSTREAM_REQUIRED=0.2.1
54 TELEPATHY_GLIB_REQUIRED=0.17.5
55 TELEPATHY_LOGGER=0.2.10
56 WEBKIT_REQUIRED=1.3.13
60 CLUTTER_REQUIRED=1.7.14
61 CLUTTER_GTK_REQUIRED=0.90.3
62 ENCHANT_REQUIRED=1.2.0
64 ISO_CODES_REQUIRED=0.35
65 NAUTILUS_SENDTO_REQUIRED=2.90.0
66 NETWORK_MANAGER_REQUIRED=0.7.0
67 CHAMPLAIN_REQUIRED=0.12.1
69 # Use --enable-maintainer-mode to disable deprecated symbols,
70 # disable single include and enable GSEAL. If this is not a released empathy,
71 # maintainer mode is forced
72 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
73 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
74 #GNOME_MAINTAINER_MODE_DEFINES
77 AC_DEFINE(CLUTTER_DISABLE_DEPRECATION_WARNINGS, 1, [Build with Clutter deprecated])
79 AC_CONFIG_MACRO_DIR([m4])
80 AC_CONFIG_HEADERS([config.h])
81 AC_CONFIG_SRCDIR([configure.ac])
84 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
86 # Support silent build rules. Disable
87 # by either passing --disable-silent-rules to configure or passing V=1
89 AM_SILENT_RULES([yes])
102 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
104 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
105 AC_SUBST(GLIB_GENMARSHAL)
107 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
108 if test -z "$XSLTPROC"; then
109 AC_MSG_ERROR([xsltproc (from libxslt) is required])
111 AM_PATH_PYTHON([2.3])
116 # -----------------------------------------------------------
118 # -----------------------------------------------------------
119 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
120 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
122 AC_ARG_ENABLE(Werror,
123 AS_HELP_STRING([--disable-Werror],
124 [compile without -Werror (normally enabled in development builds)]),
125 werror=$enableval, :)
127 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
128 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
129 wno_missing_field_initializers=yes,
130 wno_missing_field_initializers=no)
131 AS_COMPILER_FLAG(-Wno-unused-parameter,
132 wno_unused_parameter=yes,
133 wno_unused_parameter=no)
135 ifelse(empathy_released, 1, [],
137 if test x$werror = xyes; then
138 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
140 if test x$wextra = xyes -a \
141 x$wno_missing_field_initializers = xyes -a \
142 x$wno_unused_parameter = xyes; then
143 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
147 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
148 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
149 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
150 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
151 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
153 AC_SUBST(ERROR_CFLAGS)
156 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
157 [build with support for gprof]),,
159 if test "x$enable_gprof" != "xno" ; then
161 LDFLAGS="$LDFLAGS -pg"
166 # -----------------------------------------------------------
167 # Pkg-Config dependency checks
168 # -----------------------------------------------------------
173 PKG_CHECK_MODULES(EMPATHY,
176 folks >= $FOLKS_REQUIRED
177 folks-telepathy >= $FOLKS_REQUIRED
178 glib-2.0 >= $GLIB_REQUIRED
179 gio-2.0 >= $GLIB_REQUIRED
180 gio-unix-2.0 >= $GLIB_REQUIRED
181 gnome-keyring-1 >= $KEYRING_REQUIRED
182 gnutls >= $GNUTLS_REQUIRED
185 gsettings-desktop-schemas
186 gstreamer-0.10 >= $GSTREAMER_REQUIRED
187 gstreamer-interfaces-0.10
189 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
190 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
192 gtk+-3.0 >= $GTK_REQUIRED
193 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
194 libnotify >= $LIBNOTIFY_REQUIRED
195 gcr-3 >= $GCR_REQUIRED
197 libpulse-mainloop-glib
198 webkitgtk-3.0 >= $WEBKIT_REQUIRED
202 PKG_CHECK_MODULES(EMPATHY_CALL,
205 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
206 clutter-1.0 >= $CLUTTER_REQUIRED
211 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
212 [Name of provider for accounts imported from GOA])
214 # -----------------------------------------------------------
216 # -----------------------------------------------------------
217 AC_ARG_ENABLE(empathy-av,
218 AS_HELP_STRING([--enable-empathy-av=@<:@no/yes@:>@],
219 [build empathy-av (legacy call UI)]),,
220 [enable_empathy_av=no])
221 if test "x$enable_empathy_av" != "xno" ; then
222 PKG_CHECK_MODULES(EMPATHY_AV,
225 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
227 AC_DEFINE(HAVE_EMPATHY_AV, 1, [Define if you have StreamedMedia channel support])
230 AM_CONDITIONAL(HAVE_EMPATHY_AV, test "x$have_empathy_av" = "xyes")
232 # -----------------------------------------------------------
233 # Call support in tp-logger
234 # -----------------------------------------------------------
235 AC_ARG_ENABLE(call-logs,
236 AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
237 [build with call logs support]),,
238 [enable_call_logs=auto])
239 if test "x$enable_call_logs" != "xno" ; then
241 SAVE_CPPFLAGS=$CPPFLAGS
242 SAVE_LDFLAGS=$LDFLAGS
243 CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
244 CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
245 LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
247 AC_CHECK_HEADER(telepathy-logger/call-event.h,
248 have_call_logs="yes", have_call_logs="no")
251 CPPFLAGS=$SAVE_CPPFLAGS
252 LDFLAGS=$SAVE_LDFLAGS
254 if test "x$have_call_logs" = "xyes"; then
255 AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
261 if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
262 AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
263 built with --enable-call])
266 # -----------------------------------------------------------
267 # evolution-data-server (about-me)
268 # -----------------------------------------------------------
270 AS_HELP_STRING([--with-eds],
271 [build with evolution-data-server support]),,
273 if test x"$with_eds" = x"yes" ; then
274 PKG_CHECK_MODULES(EDS, [libebook-1.2])
275 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
278 # -----------------------------------------------------------
280 # -----------------------------------------------------------
283 AS_HELP_STRING([--disable-debug],
284 [compile without debug code]),
285 enable_debug=$enableval, enable_debug=yes )
287 if test x$enable_debug = xyes; then
288 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
291 # -----------------------------------------------------------
293 # -----------------------------------------------------------
294 IT_PROG_INTLTOOL([0.40.0])
296 AM_GNU_GETTEXT_VERSION([0.17])
297 AM_GNU_GETTEXT([external])
299 GETTEXT_PACKAGE=empathy
300 AC_SUBST(GETTEXT_PACKAGE)
301 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
303 # -----------------------------------------------------------
304 # Connectivity integration
305 # -----------------------------------------------------------
306 AC_ARG_WITH(connectivity,
307 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
308 [build with connectivity support]), ,
309 with_connectivity=auto)
311 if test "x$with_connectivity" = "xno"; then
315 elif test "x$with_connectivity" = "xconnman"; then
318 PKG_CHECK_MODULES(CONNMAN,
321 ], have_connman="yes", have_connman="no")
323 if test "x$have_connman" = "xyes"; then
324 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
330 PKG_CHECK_MODULES(NETWORK_MANAGER,
332 libnm-glib >= $NETWORK_MANAGER_REQUIRED
333 ], have_nm="yes", have_nm="no")
335 if test "x$have_nm" = "xyes"; then
336 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
340 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
341 AC_MSG_ERROR([Couldn't find connman dependencies:
343 $CONNMAN_PKG_ERRORS])
346 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
347 AC_MSG_ERROR([Couldn't find Network Manager dependencies:
349 $NETWORK_MANAGER_PKG_ERRORS])
352 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
353 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
355 # -----------------------------------------------------------
357 # -----------------------------------------------------------
359 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
360 [build with gudev support]), ,
363 if test "x$enable_gudev" != "xno"; then
365 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
366 have_gudev="yes", have_gudev="no")
368 if test "x$have_gudev" = "xyes"; then
369 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
375 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
376 AC_MSG_ERROR([Could not find gudev dependencies:
380 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
382 # -----------------------------------------------------------
383 # spellchecking checks: enchant and iso-codes
384 # -----------------------------------------------------------
386 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
387 [Enable spell checking]), ,
390 if test "x$enable_spell" != "xno"; then
391 PKG_CHECK_MODULES(ENCHANT,
393 enchant >= $ENCHANT_REQUIRED,
394 iso-codes >= $ISO_CODES_REQUIRED
395 ], have_enchant="yes", have_enchant="no")
397 if test "x$have_enchant" = "xyes"; then
398 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
399 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
400 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
401 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
402 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
408 AC_MSG_RESULT([$result])
414 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
415 AC_MSG_ERROR([Could not find spell-checking dependencies:
417 $ENCHANT_PKG_ERRORS])
420 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
422 # -----------------------------------------------------------
423 # Map view checks: libchamplain
424 # -----------------------------------------------------------
426 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
427 [Enable map view]), ,
430 if test "x$enable_map" != "xno"; then
432 PKG_CHECK_MODULES(LIBCHAMPLAIN,
436 champlain-0.14 >= $CHAMPLAIN_REQUIRED
437 ], have_libchamplain="yes", have_libchamplain="no")
439 if test "x$have_libchamplain" = "xyes"; then
440 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
446 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
447 AC_MSG_ERROR([Could not find map view dependencies:
449 $LIBCHAMPLAIN_PKG_ERRORS])
452 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
454 # -----------------------------------------------------------
455 # location checks: geoclue
456 # -----------------------------------------------------------
457 AC_ARG_ENABLE(location,
458 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
459 [Enable location awareness]), ,
460 enable_location=auto)
462 if test "x$enable_location" != "xno"; then
463 PKG_CHECK_MODULES(GEOCLUE,
465 geoclue >= $GEOCLUE_REQUIRED
466 ], have_geoclue="yes", have_geoclue="no")
468 if test "x$have_geoclue" = "xyes"; then
469 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
475 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
476 AC_MSG_ERROR([Could not find location dependencies:
478 $GEOCLUE_PKG_ERRORS])
481 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
482 AC_SUBST(GEOCLUE_CFLAGS)
483 AC_SUBST(GEOCLUE_LIBS)
485 # -----------------------------------------------------------
486 # location checks: geocode-glib
487 # -----------------------------------------------------------
488 AC_ARG_ENABLE(geocode,
489 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
490 [Enable geocode support]), ,
493 if test "x$enable_geocode" != "xno"; then
494 PKG_CHECK_MODULES(GEOCODE,
497 ], have_geocode="yes", have_geocode="no")
499 if test "x$have_geocode" = "xyes"; then
500 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
506 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
507 AC_MSG_ERROR([Could not find geocode dependencies:
509 $GEOCODE_PKG_ERRORS])
512 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
513 AC_SUBST(GEOCODE_CFLAGS)
514 AC_SUBST(GEOCODE_LIBS)
516 # -----------------------------------------------------------
517 # meego widgets support
518 # -----------------------------------------------------------
520 AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
521 [Enable meego widgets]), ,
524 if test "x$enable_meego" != "xno"; then
525 PKG_CHECK_MODULES(MEEGO,
529 ], have_meego="yes", have_meego="no")
531 if test "x$have_meego" = "xyes"; then
532 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
538 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
539 AC_MSG_ERROR([Could not find meego dependencies:
544 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
545 AC_SUBST(MEEGO_CFLAGS)
548 # -----------------------------------------------------------
550 # -----------------------------------------------------------
551 AC_ARG_ENABLE(nautilus-sendto,
552 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
553 [build nautilus-sendto plugin]), ,
554 enable_nautilus_sendto=auto)
556 if test "x$enable_nautilus_sendto" != "xno"; then
557 PKG_CHECK_MODULES(NST,
559 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
560 ], have_nst="yes", have_nst="no")
565 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
566 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
571 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
573 # -----------------------------------------------------------
575 # -----------------------------------------------------------
577 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
578 [build GOA MC plugin]), ,
581 if test "x$enable_goa" != "xno"; then
582 PKG_CHECK_MODULES(GOA,
584 mission-control-plugins
585 goa-1.0 >= $GOA_REQUIRED
586 ], have_goa="yes", have_goa="no")
588 AC_MSG_CHECKING([Mission Control plugins dir])
589 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
591 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
592 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
597 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
598 AC_MSG_ERROR([Could not find GOA dependencies.])
601 if test "x$have_goa" = "xyes"; then
602 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
605 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
607 # Optional dependency for avatar selection
608 AC_ARG_WITH([cheese],
609 AS_HELP_STRING([--with-cheese],
610 [enable cheese webcam support]),,
613 if test x"$with_cheese" != x"no" ; then
614 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
615 if test x${have_cheese} = xyes; then
616 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
618 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
619 AC_MSG_ERROR([Cheese configured but not found:
626 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
631 # -----------------------------------------------------------
632 # Coding style checks
633 # -----------------------------------------------------------
634 AC_ARG_ENABLE(coding-style-checks,
635 AS_HELP_STRING([--disable-coding-style-checks],
636 [do not check coding style using grep]),
637 [ENABLE_CODING_STYLE_CHECKS=$enableval],
638 [ENABLE_CODING_STYLE_CHECKS=yes])
640 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
641 # -----------------------------------------------------------
646 data/empathy.desktop.in
647 data/empathy-accounts.desktop.in
652 libempathy-gtk/Makefile
654 nautilus-sendto-plugin/Makefile
655 goa-mc-plugin/Makefile
658 tests/interactive/Makefile
667 Compiler....................: ${CC}
668 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
669 Linker Flags................: ${LDFLAGS}
670 Prefix......................: ${prefix}
671 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
674 Spell checking (enchant)....: ${have_enchant}
675 Display maps (libchamplain).: ${have_libchamplain}
676 Location awareness (Geoclue): ${have_geoclue}
677 Geocode support (Geocode)...: ${have_geocode}
678 Meego widgets...............: ${have_meego}
679 Cheese webcam support ......: ${have_cheese}
680 Camera monitoring...........: ${have_gudev}
683 NetworkManager integration..: ${have_nm}
684 ConnMan integration.........: ${have_connman}
687 Nautilus-sendto plugin......: ${have_nst}
688 GOA MC plugin...............: ${have_goa}
689 Salut E-D-S support.........: ${with_eds}
690 Exp. Call log support.......: ${have_call_logs}
691 empathy-av (legacy).........: ${enable_empathy_av}