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_GLIB_REQUIRED=0.17.3
48 TELEPATHY_LOGGER=0.2.10
49 WEBKIT_REQUIRED=1.3.13
53 CLUTTER_REQUIRED=1.7.14
54 CLUTTER_GTK_REQUIRED=0.90.3
55 ENCHANT_REQUIRED=1.2.0
57 ISO_CODES_REQUIRED=0.35
58 NAUTILUS_SENDTO_REQUIRED=2.90.0
59 NETWORK_MANAGER_REQUIRED=0.7.0
60 CHAMPLAIN_REQUIRED=0.12.1
62 # Use --enable-maintainer-mode to disable deprecated symbols,
63 # disable single include and enable GSEAL. If this is not a released empathy,
64 # maintainer mode is forced
65 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
66 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
67 #GNOME_MAINTAINER_MODE_DEFINES
69 # Disable GLib deprecation warnings for now; we don't want to bump the GLib dep
70 # and make things harder for contributiors without good reason. We'll re-enable
71 # those warnings later during the cycle (bgo #662662)
72 AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
75 prev_top_build_prefix=$ac_top_build_prefix
76 prev_ac_configure_args=$ac_configure_args
77 ac_configure_args="$ac_configure_args --disable-shared-library"
78 AX_CONFIG_DIR([telepathy-yell])
79 ac_top_build_prefix=$prev_top_build_prefix
80 ac_configure_args=$prev_ac_configure_args
81 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"telepathy-yell/telepathy-yell
83 AC_CONFIG_MACRO_DIR([m4])
84 AC_CONFIG_HEADERS([config.h])
85 AC_CONFIG_SRCDIR([configure.ac])
88 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
90 # Support silent build rules. Disable
91 # by either passing --disable-silent-rules to configure or passing V=1
93 AM_SILENT_RULES([yes])
106 GNOME_DOC_INIT([0.17.3])
107 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
109 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
110 AC_SUBST(GLIB_GENMARSHAL)
112 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
113 if test -z "$XSLTPROC"; then
114 AC_MSG_ERROR([xsltproc (from libxslt) is required])
116 AM_PATH_PYTHON([2.3])
121 # -----------------------------------------------------------
123 # -----------------------------------------------------------
124 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
125 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
127 AC_ARG_ENABLE(Werror,
128 AS_HELP_STRING([--disable-Werror],
129 [compile without -Werror (normally enabled in development builds)]),
130 werror=$enableval, :)
132 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
133 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
134 wno_missing_field_initializers=yes,
135 wno_missing_field_initializers=no)
136 AS_COMPILER_FLAG(-Wno-unused-parameter,
137 wno_unused_parameter=yes,
138 wno_unused_parameter=no)
140 ifelse(empathy_released, 1, [],
142 if test x$werror = xyes; then
143 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
145 if test x$wextra = xyes -a \
146 x$wno_missing_field_initializers = xyes -a \
147 x$wno_unused_parameter = xyes; then
148 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
152 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
153 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
154 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
155 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
156 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
158 AC_SUBST(ERROR_CFLAGS)
161 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
162 [build with support for gprof]),,
164 if test "x$enable_gprof" != "xno" ; then
166 LDFLAGS="$LDFLAGS -pg"
171 # -----------------------------------------------------------
172 # Pkg-Config dependency checks
173 # -----------------------------------------------------------
178 PKG_CHECK_MODULES(EMPATHY,
181 folks >= $FOLKS_REQUIRED
182 folks-telepathy >= $FOLKS_REQUIRED
183 glib-2.0 >= $GLIB_REQUIRED
184 gio-2.0 >= $GLIB_REQUIRED
185 gio-unix-2.0 >= $GLIB_REQUIRED
186 gnome-keyring-1 >= $KEYRING_REQUIRED
187 gnutls >= $GNUTLS_REQUIRED
190 gsettings-desktop-schemas
191 gstreamer-0.10 >= $GSTREAMER_REQUIRED
192 gstreamer-interfaces-0.10
194 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
195 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
197 gtk+-3.0 >= $GTK_REQUIRED
198 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
199 libnotify >= $LIBNOTIFY_REQUIRED
200 gcr-3 >= $GCR_REQUIRED
202 libpulse-mainloop-glib
203 webkitgtk-3.0 >= $WEBKIT_REQUIRED
207 PKG_CHECK_MODULES(YELL, [telepathy-yell])
209 PKG_CHECK_MODULES(EMPATHY_AV,
212 telepathy-farsight >= $TELEPATHY_FARSIGHT_REQUIRED
215 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
216 [Name of provider for accounts imported from GOA])
218 # -----------------------------------------------------------
220 # -----------------------------------------------------------
222 AS_HELP_STRING([--enable-call=@<:@no/yes/auto@:>@],
223 [build with Call interface support]),,
225 if test "x$enable_call" != "xno" ; then
226 PKG_CHECK_MODULES(EMPATHY_CALL,
229 telepathy-farstream >= 0.1.2
230 clutter-1.0 >= $CLUTTER_REQUIRED
233 ], have_call="yes", have_call="no" )
235 if test "x$have_call" = "xyes"; then
236 AC_DEFINE(HAVE_CALL, 1, [Define if you have Call channel support])
242 if test "x$enable_call" = "xyes" -a "x$have_call" != "xyes"; then
243 AC_MSG_ERROR([Could not find Call handler dependencies:
245 $EMPATHY_CALL_PKG_ERRORS])
247 AM_CONDITIONAL(HAVE_CALL, test "x$have_call" = "xyes")
250 # -----------------------------------------------------------
251 # Call support in tp-logger
252 # -----------------------------------------------------------
253 AC_ARG_ENABLE(call-logs,
254 AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
255 [build with call logs support]),,
256 [enable_call_logs=auto])
257 if test "x$enable_call_logs" != "xno" ; then
259 SAVE_CPPFLAGS=$CPPFLAGS
260 SAVE_LDFLAGS=$LDFLAGS
261 CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
262 CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
263 LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
265 AC_CHECK_HEADER(telepathy-logger/call-event.h,
266 have_call_logs="yes", have_call_logs="no")
269 CPPFLAGS=$SAVE_CPPFLAGS
270 LDFLAGS=$SAVE_LDFLAGS
272 if test "x$have_call_logs" = "xyes"; then
273 AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
279 if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
280 AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
281 built with --enable-call])
284 # -----------------------------------------------------------
285 # evolution-data-server (about-me)
286 # -----------------------------------------------------------
288 AS_HELP_STRING([--with-eds],
289 [build with evolution-data-server support]),,
291 if test x"$with_eds" = x"yes" ; then
292 PKG_CHECK_MODULES(EDS, [libebook-1.2])
293 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
296 # -----------------------------------------------------------
298 # -----------------------------------------------------------
301 AS_HELP_STRING([--disable-debug],
302 [compile without debug code]),
303 enable_debug=$enableval, enable_debug=yes )
305 if test x$enable_debug = xyes; then
306 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
309 # -----------------------------------------------------------
311 # -----------------------------------------------------------
312 IT_PROG_INTLTOOL([0.40.0])
314 AM_GNU_GETTEXT_VERSION([0.17])
315 AM_GNU_GETTEXT([external])
317 GETTEXT_PACKAGE=empathy
318 AC_SUBST(GETTEXT_PACKAGE)
319 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
321 # -----------------------------------------------------------
322 # Connectivity integration
323 # -----------------------------------------------------------
324 AC_ARG_WITH(connectivity,
325 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
326 [build with connectivity support]), ,
327 with_connectivity=auto)
329 if test "x$with_connectivity" = "xno"; then
333 elif test "x$with_connectivity" = "xconnman"; then
336 PKG_CHECK_MODULES(CONNMAN,
339 ], have_connman="yes", have_connman="no")
341 if test "x$have_connman" = "xyes"; then
342 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
348 PKG_CHECK_MODULES(NETWORK_MANAGER,
350 libnm-glib >= $NETWORK_MANAGER_REQUIRED
351 ], have_nm="yes", have_nm="no")
353 if test "x$have_nm" = "xyes"; then
354 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
358 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
359 AC_MSG_ERROR([Couldn't find connman dependencies:
361 $CONNMAN_PKG_ERRORS])
364 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
365 AC_MSG_ERROR([Couldn't find Network Manager dependencies:
367 $NETWORK_MANAGER_PKG_ERRORS])
370 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
371 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
373 # -----------------------------------------------------------
375 # -----------------------------------------------------------
377 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
378 [build with gudev support]), ,
381 if test "x$enable_gudev" != "xno"; then
383 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
384 have_gudev="yes", have_gudev="no")
386 if test "x$have_gudev" = "xyes"; then
387 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
393 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
394 AC_MSG_ERROR([Could not find gudev dependencies:
398 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
400 # -----------------------------------------------------------
401 # spellchecking checks: enchant and iso-codes
402 # -----------------------------------------------------------
404 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
405 [Enable spell checking]), ,
408 if test "x$enable_spell" != "xno"; then
409 PKG_CHECK_MODULES(ENCHANT,
411 enchant >= $ENCHANT_REQUIRED,
412 iso-codes >= $ISO_CODES_REQUIRED
413 ], have_enchant="yes", have_enchant="no")
415 if test "x$have_enchant" = "xyes"; then
416 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
417 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
418 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
419 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
420 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
426 AC_MSG_RESULT([$result])
432 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
433 AC_MSG_ERROR([Could not find spell-checking dependencies:
435 $ENCHANT_PKG_ERRORS])
438 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
440 # -----------------------------------------------------------
441 # Map view checks: libchamplain
442 # -----------------------------------------------------------
444 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
445 [Enable map view]), ,
448 if test "x$enable_map" != "xno"; then
450 PKG_CHECK_MODULES(LIBCHAMPLAIN,
454 champlain-0.12 >= $CHAMPLAIN_REQUIRED
455 ], have_libchamplain="yes", have_libchamplain="no")
457 if test "x$have_libchamplain" = "xyes"; then
458 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
464 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
465 AC_MSG_ERROR([Could not find map view dependencies:
467 $LIBCHAMPLAIN_PKG_ERRORS])
470 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
472 # -----------------------------------------------------------
473 # location checks: geoclue
474 # -----------------------------------------------------------
475 AC_ARG_ENABLE(location,
476 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
477 [Enable location awareness]), ,
478 enable_location=auto)
480 if test "x$enable_location" != "xno"; then
481 PKG_CHECK_MODULES(GEOCLUE,
483 geoclue >= $GEOCLUE_REQUIRED
484 ], have_geoclue="yes", have_geoclue="no")
486 if test "x$have_geoclue" = "xyes"; then
487 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
493 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
494 AC_MSG_ERROR([Could not find location dependencies:
496 $GEOCLUE_PKG_ERRORS])
499 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
500 AC_SUBST(GEOCLUE_CFLAGS)
501 AC_SUBST(GEOCLUE_LIBS)
503 # -----------------------------------------------------------
504 # location checks: geocode-glib
505 # -----------------------------------------------------------
506 AC_ARG_ENABLE(geocode,
507 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
508 [Enable geocode support]), ,
511 if test "x$enable_geocode" != "xno"; then
512 PKG_CHECK_MODULES(GEOCODE,
515 ], have_geocode="yes", have_geocode="no")
517 if test "x$have_geocode" = "xyes"; then
518 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
524 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
525 AC_MSG_ERROR([Could not find geocode dependencies:
527 $GEOCODE_PKG_ERRORS])
530 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
531 AC_SUBST(GEOCODE_CFLAGS)
532 AC_SUBST(GEOCODE_LIBS)
534 # -----------------------------------------------------------
535 # meego widgets support
536 # -----------------------------------------------------------
538 AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
539 [Enable meego widgets]), ,
542 if test "x$enable_meego" != "xno"; then
543 PKG_CHECK_MODULES(MEEGO,
547 ], have_meego="yes", have_meego="no")
549 if test "x$have_meego" = "xyes"; then
550 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
556 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
557 AC_MSG_ERROR([Could not find meego dependencies:
562 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
563 AC_SUBST(MEEGO_CFLAGS)
566 # -----------------------------------------------------------
568 # -----------------------------------------------------------
569 AC_ARG_ENABLE(nautilus-sendto,
570 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
571 [build nautilus-sendto plugin]), ,
572 enable_nautilus_sendto=auto)
574 if test "x$enable_nautilus_sendto" != "xno"; then
575 PKG_CHECK_MODULES(NST,
577 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
578 ], have_nst="yes", have_nst="no")
583 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
584 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
589 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
591 # -----------------------------------------------------------
593 # -----------------------------------------------------------
595 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
596 [build GOA MC plugin]), ,
599 if test "x$enable_goa" != "xno"; then
600 PKG_CHECK_MODULES(GOA,
602 mission-control-plugins
603 goa-1.0 >= $GOA_REQUIRED
604 ], have_goa="yes", have_goa="no")
606 AC_MSG_CHECKING([Mission Control plugins dir])
607 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
609 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
610 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
615 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
616 AC_MSG_ERROR([Could not find GOA dependencies.])
619 if test "x$have_goa" = "xyes"; then
620 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
623 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
625 # Optional dependency for avatar selection
626 AC_ARG_WITH([cheese],
627 AS_HELP_STRING([--with-cheese],
628 [enable cheese webcam support]),,
631 if test x"$with_cheese" != x"no" ; then
632 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
633 if test x${have_cheese} = xyes; then
634 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
636 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
637 AC_MSG_ERROR([Cheese configured but not found:
644 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
647 # -----------------------------------------------------------
648 # Coding style checks
649 # -----------------------------------------------------------
650 AC_ARG_ENABLE(coding-style-checks,
651 AS_HELP_STRING([--disable-coding-style-checks],
652 [do not check coding style using grep]),
653 [ENABLE_CODING_STYLE_CHECKS=$enableval],
654 [ENABLE_CODING_STYLE_CHECKS=yes])
656 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
657 # -----------------------------------------------------------
662 data/empathy.desktop.in
663 data/empathy-accounts.desktop.in
668 libempathy-gtk/Makefile
670 nautilus-sendto-plugin/Makefile
671 goa-mc-plugin/Makefile
674 tests/interactive/Makefile
683 Compiler....................: ${CC}
684 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
685 Linker Flags................: ${LDFLAGS}
686 Prefix......................: ${prefix}
687 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
690 Spell checking (enchant)....: ${have_enchant}
691 Display maps (libchamplain).: ${have_libchamplain}
692 Location awareness (Geoclue): ${have_geoclue}
693 Geocode support (Geocode)...: ${have_geocode}
694 Meego widgets...............: ${have_meego}
695 Cheese webcam support ......: ${have_cheese}
696 Camera monitoring...........: ${have_gudev}
699 NetworkManager integration..: ${have_nm}
700 ConnMan integration.........: ${have_connman}
703 Nautilus-sendto plugin......: ${have_nst}
704 GOA MC plugin...............: ${have_goa}
705 Salut E-D-S support.........: ${with_eds}
706 Exp. Call channel handler...: ${have_call}
707 Exp. Call log support.......: ${have_call_logs}