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 GETTEXT_PACKAGE=empathy
297 AC_SUBST(GETTEXT_PACKAGE)
298 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
300 # -----------------------------------------------------------
301 # Connectivity integration
302 # -----------------------------------------------------------
303 AC_ARG_WITH(connectivity,
304 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
305 [build with connectivity support]), ,
306 with_connectivity=auto)
308 if test "x$with_connectivity" = "xno"; then
312 elif test "x$with_connectivity" = "xconnman"; then
315 PKG_CHECK_MODULES(CONNMAN,
318 ], have_connman="yes", have_connman="no")
320 if test "x$have_connman" = "xyes"; then
321 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
327 PKG_CHECK_MODULES(NETWORK_MANAGER,
329 libnm-glib >= $NETWORK_MANAGER_REQUIRED
330 ], have_nm="yes", have_nm="no")
332 if test "x$have_nm" = "xyes"; then
333 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
337 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
338 AC_MSG_ERROR([Couldn't find connman dependencies:
340 $CONNMAN_PKG_ERRORS])
343 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
344 AC_MSG_ERROR([Couldn't find Network Manager dependencies:
346 $NETWORK_MANAGER_PKG_ERRORS])
349 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
350 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
352 # -----------------------------------------------------------
354 # -----------------------------------------------------------
356 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
357 [build with gudev support]), ,
360 if test "x$enable_gudev" != "xno"; then
362 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
363 have_gudev="yes", have_gudev="no")
365 if test "x$have_gudev" = "xyes"; then
366 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
372 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
373 AC_MSG_ERROR([Could not find gudev dependencies:
377 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
379 # -----------------------------------------------------------
380 # spellchecking checks: enchant and iso-codes
381 # -----------------------------------------------------------
383 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
384 [Enable spell checking]), ,
387 if test "x$enable_spell" != "xno"; then
388 PKG_CHECK_MODULES(ENCHANT,
390 enchant >= $ENCHANT_REQUIRED,
391 iso-codes >= $ISO_CODES_REQUIRED
392 ], have_enchant="yes", have_enchant="no")
394 if test "x$have_enchant" = "xyes"; then
395 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
396 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
397 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
398 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
399 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
405 AC_MSG_RESULT([$result])
411 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
412 AC_MSG_ERROR([Could not find spell-checking dependencies:
414 $ENCHANT_PKG_ERRORS])
417 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
419 # -----------------------------------------------------------
420 # Map view checks: libchamplain
421 # -----------------------------------------------------------
423 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
424 [Enable map view]), ,
427 if test "x$enable_map" != "xno"; then
429 PKG_CHECK_MODULES(LIBCHAMPLAIN,
433 champlain-0.12 >= $CHAMPLAIN_REQUIRED
434 ], have_libchamplain="yes", have_libchamplain="no")
436 if test "x$have_libchamplain" = "xyes"; then
437 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
443 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
444 AC_MSG_ERROR([Could not find map view dependencies:
446 $LIBCHAMPLAIN_PKG_ERRORS])
449 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
451 # -----------------------------------------------------------
452 # location checks: geoclue
453 # -----------------------------------------------------------
454 AC_ARG_ENABLE(location,
455 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
456 [Enable location awareness]), ,
457 enable_location=auto)
459 if test "x$enable_location" != "xno"; then
460 PKG_CHECK_MODULES(GEOCLUE,
462 geoclue >= $GEOCLUE_REQUIRED
463 ], have_geoclue="yes", have_geoclue="no")
465 if test "x$have_geoclue" = "xyes"; then
466 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
472 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
473 AC_MSG_ERROR([Could not find location dependencies:
475 $GEOCLUE_PKG_ERRORS])
478 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
479 AC_SUBST(GEOCLUE_CFLAGS)
480 AC_SUBST(GEOCLUE_LIBS)
482 # -----------------------------------------------------------
483 # location checks: geocode-glib
484 # -----------------------------------------------------------
485 AC_ARG_ENABLE(geocode,
486 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
487 [Enable geocode support]), ,
490 if test "x$enable_geocode" != "xno"; then
491 PKG_CHECK_MODULES(GEOCODE,
494 ], have_geocode="yes", have_geocode="no")
496 if test "x$have_geocode" = "xyes"; then
497 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
503 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
504 AC_MSG_ERROR([Could not find geocode dependencies:
506 $GEOCODE_PKG_ERRORS])
509 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
510 AC_SUBST(GEOCODE_CFLAGS)
511 AC_SUBST(GEOCODE_LIBS)
513 # -----------------------------------------------------------
514 # meego widgets support
515 # -----------------------------------------------------------
517 AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
518 [Enable meego widgets]), ,
521 if test "x$enable_meego" != "xno"; then
522 PKG_CHECK_MODULES(MEEGO,
526 ], have_meego="yes", have_meego="no")
528 if test "x$have_meego" = "xyes"; then
529 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
535 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
536 AC_MSG_ERROR([Could not find meego dependencies:
541 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
542 AC_SUBST(MEEGO_CFLAGS)
545 # -----------------------------------------------------------
547 # -----------------------------------------------------------
548 AC_ARG_ENABLE(nautilus-sendto,
549 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
550 [build nautilus-sendto plugin]), ,
551 enable_nautilus_sendto=auto)
553 if test "x$enable_nautilus_sendto" != "xno"; then
554 PKG_CHECK_MODULES(NST,
556 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
557 ], have_nst="yes", have_nst="no")
562 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
563 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
568 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
570 # -----------------------------------------------------------
572 # -----------------------------------------------------------
574 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
575 [build GOA MC plugin]), ,
578 if test "x$enable_goa" != "xno"; then
579 PKG_CHECK_MODULES(GOA,
581 mission-control-plugins
582 goa-1.0 >= $GOA_REQUIRED
583 ], have_goa="yes", have_goa="no")
585 AC_MSG_CHECKING([Mission Control plugins dir])
586 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
588 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
589 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
594 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
595 AC_MSG_ERROR([Could not find GOA dependencies.])
598 if test "x$have_goa" = "xyes"; then
599 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
602 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
604 # Optional dependency for avatar selection
605 AC_ARG_WITH([cheese],
606 AS_HELP_STRING([--with-cheese],
607 [enable cheese webcam support]),,
610 if test x"$with_cheese" != x"no" ; then
611 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
612 if test x${have_cheese} = xyes; then
613 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
615 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
616 AC_MSG_ERROR([Cheese configured but not found:
623 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
628 # -----------------------------------------------------------
629 # Coding style checks
630 # -----------------------------------------------------------
631 AC_ARG_ENABLE(coding-style-checks,
632 AS_HELP_STRING([--disable-coding-style-checks],
633 [do not check coding style using grep]),
634 [ENABLE_CODING_STYLE_CHECKS=$enableval],
635 [ENABLE_CODING_STYLE_CHECKS=yes])
637 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
638 # -----------------------------------------------------------
643 data/empathy.desktop.in
644 data/empathy-accounts.desktop.in
649 libempathy-gtk/Makefile
651 nautilus-sendto-plugin/Makefile
652 goa-mc-plugin/Makefile
655 tests/interactive/Makefile
664 Compiler....................: ${CC}
665 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
666 Linker Flags................: ${LDFLAGS}
667 Prefix......................: ${prefix}
668 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
671 Spell checking (enchant)....: ${have_enchant}
672 Display maps (libchamplain).: ${have_libchamplain}
673 Location awareness (Geoclue): ${have_geoclue}
674 Geocode support (Geocode)...: ${have_geocode}
675 Meego widgets...............: ${have_meego}
676 Cheese webcam support ......: ${have_cheese}
677 Camera monitoring...........: ${have_gudev}
680 NetworkManager integration..: ${have_nm}
681 ConnMan integration.........: ${have_connman}
684 Nautilus-sendto plugin......: ${have_nst}
685 GOA MC plugin...............: ${have_goa}
686 Salut E-D-S support.........: ${with_eds}
687 Exp. Call log support.......: ${have_call_logs}
688 empathy-av (legacy).........: ${enable_empathy_av}