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], [4])
6 m4_define([empathy_micro_version], [2])
7 m4_define([empathy_nano_version], [1])
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_ALLOWED, GLIB_VERSION_2_30, [Prevent post 2.30 APIs])
45 AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_4, [Ignore post 3.4 deprecations])
46 AC_DEFINE(GDK_VERSION_MAX_ALLOWED, GDK_VERSION_3_4, [Prevent post 3.4 APIs])
48 CLUTTER_REQUIRED=1.10.0
49 AC_DEFINE(CLUTTER_VERSION_MIN_REQUIRED, CLUTTER_VERSION_1_8, [Ignore post 1.8 deprecations])
50 AC_DEFINE(CLUTTER_VERSION_MAX_ALLOWED, CLUTTER_VERSION_1_10, [Prevent post 1.10 APIs])
52 CLUTTER_GTK_REQUIRED=1.1.2
53 CLUTTER_GST_REQUIRED=1.5.2
55 TELEPATHY_GLIB_REQUIRED=0.18.0
56 AC_DEFINE(TP_VERSION_MIN_REQUIRED, TP_VERSION_0_18, [Ignore post 0.18 deprecations])
57 AC_DEFINE(TP_VERSION_MAX_ALLOWED, TP_VERSION_0_18, [Prevent post 0.18 APIs])
59 GSTREAMER_REQUIRED=0.10.32
60 KEYRING_REQUIRED=2.26.0
62 LIBCANBERRA_GTK_REQUIRED=0.25
63 LIBNOTIFY_REQUIRED=0.7.0
64 TELEPATHY_FARSTREAM_REQUIRED=0.2.1
65 TELEPATHY_LOGGER=0.2.13
66 WEBKIT_REQUIRED=1.3.13
70 ENCHANT_REQUIRED=1.2.0
72 ISO_CODES_REQUIRED=0.35
73 NAUTILUS_SENDTO_REQUIRED=2.90.0
74 NETWORK_MANAGER_REQUIRED=0.7.0
75 CHAMPLAIN_REQUIRED=0.12.1
76 CHEESE_GTK_REQUIRED=3.4.0
78 # Use --enable-maintainer-mode to disable deprecated symbols,
79 # disable single include and enable GSEAL. If this is not a released empathy,
80 # maintainer mode is forced
81 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
82 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
83 #GNOME_MAINTAINER_MODE_DEFINES
85 AC_CONFIG_MACRO_DIR([m4])
86 AC_CONFIG_HEADERS([config.h])
87 AC_CONFIG_SRCDIR([configure.ac])
90 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
92 # Support silent build rules. Disable
93 # by either passing --disable-silent-rules to configure or passing V=1
95 AM_SILENT_RULES([yes])
108 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
110 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
111 AC_SUBST(GLIB_GENMARSHAL)
113 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
114 if test -z "$XSLTPROC"; then
115 AC_MSG_ERROR([xsltproc (from libxslt) is required])
117 AM_PATH_PYTHON([2.3])
122 # -----------------------------------------------------------
124 # -----------------------------------------------------------
125 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
126 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
128 AC_ARG_ENABLE(Werror,
129 AS_HELP_STRING([--disable-Werror],
130 [compile without -Werror (normally enabled in development builds)]),
131 werror=$enableval, :)
133 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
134 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
135 wno_missing_field_initializers=yes,
136 wno_missing_field_initializers=no)
137 AS_COMPILER_FLAG(-Wno-unused-parameter,
138 wno_unused_parameter=yes,
139 wno_unused_parameter=no)
141 ifelse(empathy_released, 1, [],
143 if test x$werror = xyes; then
144 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
146 if test x$wextra = xyes -a \
147 x$wno_missing_field_initializers = xyes -a \
148 x$wno_unused_parameter = xyes; then
149 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
153 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
154 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
155 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
156 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
157 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
159 AC_SUBST(ERROR_CFLAGS)
162 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
163 [build with support for gprof]),,
165 if test "x$enable_gprof" != "xno" ; then
167 LDFLAGS="$LDFLAGS -pg"
172 # -----------------------------------------------------------
173 # Pkg-Config dependency checks
174 # -----------------------------------------------------------
179 PKG_CHECK_MODULES(EMPATHY,
182 folks >= $FOLKS_REQUIRED
183 folks-telepathy >= $FOLKS_REQUIRED
184 glib-2.0 >= $GLIB_REQUIRED
185 gio-2.0 >= $GLIB_REQUIRED
186 gio-unix-2.0 >= $GLIB_REQUIRED
187 gnome-keyring-1 >= $KEYRING_REQUIRED
188 gnutls >= $GNUTLS_REQUIRED
191 gsettings-desktop-schemas
192 gstreamer-0.10 >= $GSTREAMER_REQUIRED
193 gstreamer-interfaces-0.10
195 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
196 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
198 gtk+-3.0 >= $GTK_REQUIRED
199 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
200 libnotify >= $LIBNOTIFY_REQUIRED
201 gcr-3 >= $GCR_REQUIRED
203 libpulse-mainloop-glib
204 webkitgtk-3.0 >= $WEBKIT_REQUIRED
208 PKG_CHECK_MODULES(EMPATHY_CALL,
211 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
212 clutter-1.0 >= $CLUTTER_REQUIRED
213 clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED
214 clutter-gst-1.0 >= $CLUTTER_GST_REQUIRED
217 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
218 [Name of provider for accounts imported from GOA])
220 # -----------------------------------------------------------
222 # -----------------------------------------------------------
223 AC_ARG_ENABLE(empathy-av,
224 AS_HELP_STRING([--enable-empathy-av=@<:@no/yes@:>@],
225 [build empathy-av (legacy call UI)]),,
226 [enable_empathy_av=no])
227 if test "x$enable_empathy_av" != "xno" ; then
228 PKG_CHECK_MODULES(EMPATHY_AV,
231 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
233 AC_DEFINE(HAVE_EMPATHY_AV, 1, [Define if you have StreamedMedia channel support])
236 AM_CONDITIONAL(HAVE_EMPATHY_AV, test "x$have_empathy_av" = "xyes")
238 # -----------------------------------------------------------
239 # evolution-data-server (about-me)
240 # -----------------------------------------------------------
242 AS_HELP_STRING([--with-eds],
243 [build with evolution-data-server support]),,
245 if test x"$with_eds" = x"yes" ; then
246 PKG_CHECK_MODULES(EDS, [libebook-1.2])
247 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
250 # -----------------------------------------------------------
252 # -----------------------------------------------------------
255 AS_HELP_STRING([--disable-debug],
256 [compile without debug code]),
257 enable_debug=$enableval, enable_debug=yes )
259 if test x$enable_debug = xyes; then
260 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
263 # -----------------------------------------------------------
265 # -----------------------------------------------------------
266 IT_PROG_INTLTOOL([0.40.0])
268 GETTEXT_PACKAGE=empathy
269 AC_SUBST(GETTEXT_PACKAGE)
270 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
272 # -----------------------------------------------------------
273 # Connectivity integration
274 # -----------------------------------------------------------
275 AC_ARG_WITH(connectivity,
276 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
277 [build with connectivity support]), ,
278 with_connectivity=auto)
280 if test "x$with_connectivity" = "xno"; then
284 elif test "x$with_connectivity" = "xconnman"; then
287 PKG_CHECK_MODULES(CONNMAN,
290 ], have_connman="yes", have_connman="no")
292 if test "x$have_connman" = "xyes"; then
293 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
299 PKG_CHECK_MODULES(NETWORK_MANAGER,
301 libnm-glib >= $NETWORK_MANAGER_REQUIRED
302 ], have_nm="yes", have_nm="no")
304 if test "x$have_nm" = "xyes"; then
305 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
309 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
310 AC_MSG_ERROR([Couldn't find connman dependencies:
312 $CONNMAN_PKG_ERRORS])
315 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
316 AC_MSG_ERROR([Couldn't find Network Manager dependencies:
318 $NETWORK_MANAGER_PKG_ERRORS])
321 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
322 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
324 # -----------------------------------------------------------
326 # -----------------------------------------------------------
328 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
329 [build with gudev support]), ,
332 if test "x$enable_gudev" != "xno"; then
334 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
335 have_gudev="yes", have_gudev="no")
337 if test "x$have_gudev" = "xyes"; then
338 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
344 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
345 AC_MSG_ERROR([Could not find gudev dependencies:
349 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
351 # -----------------------------------------------------------
352 # spellchecking checks: enchant and iso-codes
353 # -----------------------------------------------------------
355 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
356 [Enable spell checking]), ,
359 if test "x$enable_spell" != "xno"; then
360 PKG_CHECK_MODULES(ENCHANT,
362 enchant >= $ENCHANT_REQUIRED,
363 iso-codes >= $ISO_CODES_REQUIRED
364 ], have_enchant="yes", have_enchant="no")
366 if test "x$have_enchant" = "xyes"; then
367 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
368 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
369 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
370 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
371 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
377 AC_MSG_RESULT([$result])
383 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
384 AC_MSG_ERROR([Could not find spell-checking dependencies:
386 $ENCHANT_PKG_ERRORS])
389 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
391 # -----------------------------------------------------------
392 # Map view checks: libchamplain
393 # -----------------------------------------------------------
395 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
396 [Enable map view]), ,
399 if test "x$enable_map" != "xno"; then
401 PKG_CHECK_MODULES(LIBCHAMPLAIN,
405 champlain-0.12 >= $CHAMPLAIN_REQUIRED
406 ], have_libchamplain="yes", have_libchamplain="no")
408 if test "x$have_libchamplain" = "xyes"; then
409 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
415 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
416 AC_MSG_ERROR([Could not find map view dependencies:
418 $LIBCHAMPLAIN_PKG_ERRORS])
421 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
423 # -----------------------------------------------------------
424 # location checks: geoclue
425 # -----------------------------------------------------------
426 AC_ARG_ENABLE(location,
427 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
428 [Enable location awareness]), ,
429 enable_location=auto)
431 if test "x$enable_location" != "xno"; then
432 PKG_CHECK_MODULES(GEOCLUE,
434 geoclue >= $GEOCLUE_REQUIRED
435 ], have_geoclue="yes", have_geoclue="no")
437 if test "x$have_geoclue" = "xyes"; then
438 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
444 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
445 AC_MSG_ERROR([Could not find location dependencies:
447 $GEOCLUE_PKG_ERRORS])
450 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
451 AC_SUBST(GEOCLUE_CFLAGS)
452 AC_SUBST(GEOCLUE_LIBS)
454 # -----------------------------------------------------------
455 # location checks: geocode-glib
456 # -----------------------------------------------------------
457 AC_ARG_ENABLE(geocode,
458 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
459 [Enable geocode support]), ,
462 if test "x$enable_geocode" != "xno"; then
463 PKG_CHECK_MODULES(GEOCODE,
466 ], have_geocode="yes", have_geocode="no")
468 if test "x$have_geocode" = "xyes"; then
469 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
475 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
476 AC_MSG_ERROR([Could not find geocode dependencies:
478 $GEOCODE_PKG_ERRORS])
481 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
482 AC_SUBST(GEOCODE_CFLAGS)
483 AC_SUBST(GEOCODE_LIBS)
485 # -----------------------------------------------------------
486 # meego widgets support
487 # -----------------------------------------------------------
489 AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
490 [Enable meego widgets]), ,
493 if test "x$enable_meego" != "xno"; then
494 PKG_CHECK_MODULES(MEEGO,
498 ], have_meego="yes", have_meego="no")
500 if test "x$have_meego" = "xyes"; then
501 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
507 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
508 AC_MSG_ERROR([Could not find meego dependencies:
513 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
514 AC_SUBST(MEEGO_CFLAGS)
517 # -----------------------------------------------------------
519 # -----------------------------------------------------------
520 AC_ARG_ENABLE(nautilus-sendto,
521 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
522 [build nautilus-sendto plugin]), ,
523 enable_nautilus_sendto=auto)
525 if test "x$enable_nautilus_sendto" != "xno"; then
526 PKG_CHECK_MODULES(NST,
528 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
529 ], have_nst="yes", have_nst="no")
534 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
535 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
540 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
542 # -----------------------------------------------------------
544 # -----------------------------------------------------------
546 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
547 [build GOA MC plugin]), ,
550 if test "x$enable_goa" != "xno"; then
551 PKG_CHECK_MODULES(GOA,
553 mission-control-plugins
554 goa-1.0 >= $GOA_REQUIRED
555 ], have_goa="yes", have_goa="no")
557 AC_MSG_CHECKING([Mission Control plugins dir])
558 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
560 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
561 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
566 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
567 AC_MSG_ERROR([Could not find GOA dependencies.])
570 if test "x$have_goa" = "xyes"; then
571 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
574 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
576 # Optional dependency for avatar selection
577 AC_ARG_WITH([cheese],
578 AS_HELP_STRING([--with-cheese],
579 [enable cheese webcam support]),,
582 if test x"$with_cheese" != x"no" ; then
583 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= CHEESE_GTK_REQUIRED, [have_cheese=yes], [have_cheese=no])
584 if test x${have_cheese} = xyes; then
585 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
587 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
588 AC_MSG_ERROR([Cheese configured but not found:
595 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
600 # -----------------------------------------------------------
601 # Coding style checks
602 # -----------------------------------------------------------
603 AC_ARG_ENABLE(coding-style-checks,
604 AS_HELP_STRING([--disable-coding-style-checks],
605 [do not check coding style using grep]),
606 [ENABLE_CODING_STYLE_CHECKS=$enableval],
607 [ENABLE_CODING_STYLE_CHECKS=yes])
609 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
610 # -----------------------------------------------------------
615 data/empathy.desktop.in
616 data/empathy-accounts.desktop.in
621 libempathy-gtk/Makefile
623 nautilus-sendto-plugin/Makefile
624 goa-mc-plugin/Makefile
627 tests/interactive/Makefile
636 Compiler....................: ${CC}
637 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
638 Linker Flags................: ${LDFLAGS}
639 Prefix......................: ${prefix}
640 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
643 Spell checking (enchant)....: ${have_enchant}
644 Display maps (libchamplain).: ${have_libchamplain}
645 Location awareness (Geoclue): ${have_geoclue}
646 Geocode support (Geocode)...: ${have_geocode}
647 Meego widgets...............: ${have_meego}
648 Cheese webcam support ......: ${have_cheese}
649 Camera monitoring...........: ${have_gudev}
652 NetworkManager integration..: ${have_nm}
653 ConnMan integration.........: ${have_connman}
656 Nautilus-sendto plugin......: ${have_nst}
657 GOA MC plugin...............: ${have_goa}
658 Salut E-D-S support.........: ${with_eds}
659 empathy-av (legacy).........: ${enable_empathy_av}