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 AC_DEFINE(CLUTTER_DISABLE_DEPRECATION_WARNINGS, 1, [Build with Clutter deprecated])
78 prev_top_build_prefix=$ac_top_build_prefix
79 prev_ac_configure_args=$ac_configure_args
80 ac_configure_args="$ac_configure_args --disable-shared-library"
81 AX_CONFIG_DIR([telepathy-yell])
82 ac_top_build_prefix=$prev_top_build_prefix
83 ac_configure_args=$prev_ac_configure_args
84 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"telepathy-yell/telepathy-yell
86 AC_CONFIG_MACRO_DIR([m4])
87 AC_CONFIG_HEADERS([config.h])
88 AC_CONFIG_SRCDIR([configure.ac])
91 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
93 # Support silent build rules. Disable
94 # by either passing --disable-silent-rules to configure or passing V=1
96 AM_SILENT_RULES([yes])
109 GNOME_DOC_INIT([0.17.3])
110 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
112 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
113 AC_SUBST(GLIB_GENMARSHAL)
115 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
116 if test -z "$XSLTPROC"; then
117 AC_MSG_ERROR([xsltproc (from libxslt) is required])
119 AM_PATH_PYTHON([2.3])
124 # -----------------------------------------------------------
126 # -----------------------------------------------------------
127 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
128 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
130 AC_ARG_ENABLE(Werror,
131 AS_HELP_STRING([--disable-Werror],
132 [compile without -Werror (normally enabled in development builds)]),
133 werror=$enableval, :)
135 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
136 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
137 wno_missing_field_initializers=yes,
138 wno_missing_field_initializers=no)
139 AS_COMPILER_FLAG(-Wno-unused-parameter,
140 wno_unused_parameter=yes,
141 wno_unused_parameter=no)
143 ifelse(empathy_released, 1, [],
145 if test x$werror = xyes; then
146 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
148 if test x$wextra = xyes -a \
149 x$wno_missing_field_initializers = xyes -a \
150 x$wno_unused_parameter = xyes; then
151 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
155 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
156 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
157 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
158 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
159 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
161 AC_SUBST(ERROR_CFLAGS)
164 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
165 [build with support for gprof]),,
167 if test "x$enable_gprof" != "xno" ; then
169 LDFLAGS="$LDFLAGS -pg"
174 # -----------------------------------------------------------
175 # Pkg-Config dependency checks
176 # -----------------------------------------------------------
181 PKG_CHECK_MODULES(EMPATHY,
184 folks >= $FOLKS_REQUIRED
185 folks-telepathy >= $FOLKS_REQUIRED
186 glib-2.0 >= $GLIB_REQUIRED
187 gio-2.0 >= $GLIB_REQUIRED
188 gio-unix-2.0 >= $GLIB_REQUIRED
189 gnome-keyring-1 >= $KEYRING_REQUIRED
190 gnutls >= $GNUTLS_REQUIRED
193 gsettings-desktop-schemas
194 gstreamer-0.10 >= $GSTREAMER_REQUIRED
195 gstreamer-interfaces-0.10
197 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
198 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
200 gtk+-3.0 >= $GTK_REQUIRED
201 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
202 libnotify >= $LIBNOTIFY_REQUIRED
203 gcr-3 >= $GCR_REQUIRED
205 libpulse-mainloop-glib
206 webkitgtk-3.0 >= $WEBKIT_REQUIRED
210 PKG_CHECK_MODULES(YELL, [telepathy-yell])
212 PKG_CHECK_MODULES(EMPATHY_AV,
215 telepathy-farsight >= $TELEPATHY_FARSIGHT_REQUIRED
218 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
219 [Name of provider for accounts imported from GOA])
221 # -----------------------------------------------------------
223 # -----------------------------------------------------------
225 AS_HELP_STRING([--enable-call=@<:@no/yes/auto@:>@],
226 [build with Call interface support]),,
228 if test "x$enable_call" != "xno" ; then
229 PKG_CHECK_MODULES(EMPATHY_CALL,
232 telepathy-farstream >= 0.1.2
233 clutter-1.0 >= $CLUTTER_REQUIRED
236 ], have_call="yes", have_call="no" )
238 if test "x$have_call" = "xyes"; then
239 AC_DEFINE(HAVE_CALL, 1, [Define if you have Call channel support])
245 if test "x$enable_call" = "xyes" -a "x$have_call" != "xyes"; then
246 AC_MSG_ERROR([Could not find Call handler dependencies:
248 $EMPATHY_CALL_PKG_ERRORS])
250 AM_CONDITIONAL(HAVE_CALL, test "x$have_call" = "xyes")
253 # -----------------------------------------------------------
254 # Call support in tp-logger
255 # -----------------------------------------------------------
256 AC_ARG_ENABLE(call-logs,
257 AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
258 [build with call logs support]),,
259 [enable_call_logs=auto])
260 if test "x$enable_call_logs" != "xno" ; then
262 SAVE_CPPFLAGS=$CPPFLAGS
263 SAVE_LDFLAGS=$LDFLAGS
264 CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
265 CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
266 LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
268 AC_CHECK_HEADER(telepathy-logger/call-event.h,
269 have_call_logs="yes", have_call_logs="no")
272 CPPFLAGS=$SAVE_CPPFLAGS
273 LDFLAGS=$SAVE_LDFLAGS
275 if test "x$have_call_logs" = "xyes"; then
276 AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
282 if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
283 AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
284 built with --enable-call])
287 # -----------------------------------------------------------
288 # evolution-data-server (about-me)
289 # -----------------------------------------------------------
291 AS_HELP_STRING([--with-eds],
292 [build with evolution-data-server support]),,
294 if test x"$with_eds" = x"yes" ; then
295 PKG_CHECK_MODULES(EDS, [libebook-1.2])
296 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
299 # -----------------------------------------------------------
301 # -----------------------------------------------------------
304 AS_HELP_STRING([--disable-debug],
305 [compile without debug code]),
306 enable_debug=$enableval, enable_debug=yes )
308 if test x$enable_debug = xyes; then
309 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
312 # -----------------------------------------------------------
314 # -----------------------------------------------------------
315 IT_PROG_INTLTOOL([0.40.0])
317 AM_GNU_GETTEXT_VERSION([0.17])
318 AM_GNU_GETTEXT([external])
320 GETTEXT_PACKAGE=empathy
321 AC_SUBST(GETTEXT_PACKAGE)
322 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
324 # -----------------------------------------------------------
325 # Connectivity integration
326 # -----------------------------------------------------------
327 AC_ARG_WITH(connectivity,
328 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
329 [build with connectivity support]), ,
330 with_connectivity=auto)
332 if test "x$with_connectivity" = "xno"; then
336 elif test "x$with_connectivity" = "xconnman"; then
339 PKG_CHECK_MODULES(CONNMAN,
342 ], have_connman="yes", have_connman="no")
344 if test "x$have_connman" = "xyes"; then
345 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
351 PKG_CHECK_MODULES(NETWORK_MANAGER,
353 libnm-glib >= $NETWORK_MANAGER_REQUIRED
354 ], have_nm="yes", have_nm="no")
356 if test "x$have_nm" = "xyes"; then
357 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
361 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
362 AC_MSG_ERROR([Couldn't find connman dependencies:
364 $CONNMAN_PKG_ERRORS])
367 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
368 AC_MSG_ERROR([Couldn't find Network Manager dependencies:
370 $NETWORK_MANAGER_PKG_ERRORS])
373 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
374 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
376 # -----------------------------------------------------------
378 # -----------------------------------------------------------
380 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
381 [build with gudev support]), ,
384 if test "x$enable_gudev" != "xno"; then
386 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
387 have_gudev="yes", have_gudev="no")
389 if test "x$have_gudev" = "xyes"; then
390 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
396 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
397 AC_MSG_ERROR([Could not find gudev dependencies:
401 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
403 # -----------------------------------------------------------
404 # spellchecking checks: enchant and iso-codes
405 # -----------------------------------------------------------
407 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
408 [Enable spell checking]), ,
411 if test "x$enable_spell" != "xno"; then
412 PKG_CHECK_MODULES(ENCHANT,
414 enchant >= $ENCHANT_REQUIRED,
415 iso-codes >= $ISO_CODES_REQUIRED
416 ], have_enchant="yes", have_enchant="no")
418 if test "x$have_enchant" = "xyes"; then
419 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
420 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
421 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
422 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
423 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
429 AC_MSG_RESULT([$result])
435 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
436 AC_MSG_ERROR([Could not find spell-checking dependencies:
438 $ENCHANT_PKG_ERRORS])
441 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
443 # -----------------------------------------------------------
444 # Map view checks: libchamplain
445 # -----------------------------------------------------------
447 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
448 [Enable map view]), ,
451 if test "x$enable_map" != "xno"; then
453 PKG_CHECK_MODULES(LIBCHAMPLAIN,
457 champlain-0.12 >= $CHAMPLAIN_REQUIRED
458 ], have_libchamplain="yes", have_libchamplain="no")
460 if test "x$have_libchamplain" = "xyes"; then
461 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
467 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
468 AC_MSG_ERROR([Could not find map view dependencies:
470 $LIBCHAMPLAIN_PKG_ERRORS])
473 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
475 # -----------------------------------------------------------
476 # location checks: geoclue
477 # -----------------------------------------------------------
478 AC_ARG_ENABLE(location,
479 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
480 [Enable location awareness]), ,
481 enable_location=auto)
483 if test "x$enable_location" != "xno"; then
484 PKG_CHECK_MODULES(GEOCLUE,
486 geoclue >= $GEOCLUE_REQUIRED
487 ], have_geoclue="yes", have_geoclue="no")
489 if test "x$have_geoclue" = "xyes"; then
490 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
496 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
497 AC_MSG_ERROR([Could not find location dependencies:
499 $GEOCLUE_PKG_ERRORS])
502 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
503 AC_SUBST(GEOCLUE_CFLAGS)
504 AC_SUBST(GEOCLUE_LIBS)
506 # -----------------------------------------------------------
507 # location checks: geocode-glib
508 # -----------------------------------------------------------
509 AC_ARG_ENABLE(geocode,
510 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
511 [Enable geocode support]), ,
514 if test "x$enable_geocode" != "xno"; then
515 PKG_CHECK_MODULES(GEOCODE,
518 ], have_geocode="yes", have_geocode="no")
520 if test "x$have_geocode" = "xyes"; then
521 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
527 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
528 AC_MSG_ERROR([Could not find geocode dependencies:
530 $GEOCODE_PKG_ERRORS])
533 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
534 AC_SUBST(GEOCODE_CFLAGS)
535 AC_SUBST(GEOCODE_LIBS)
537 # -----------------------------------------------------------
538 # meego widgets support
539 # -----------------------------------------------------------
541 AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
542 [Enable meego widgets]), ,
545 if test "x$enable_meego" != "xno"; then
546 PKG_CHECK_MODULES(MEEGO,
550 ], have_meego="yes", have_meego="no")
552 if test "x$have_meego" = "xyes"; then
553 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
559 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
560 AC_MSG_ERROR([Could not find meego dependencies:
565 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
566 AC_SUBST(MEEGO_CFLAGS)
569 # -----------------------------------------------------------
571 # -----------------------------------------------------------
572 AC_ARG_ENABLE(nautilus-sendto,
573 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
574 [build nautilus-sendto plugin]), ,
575 enable_nautilus_sendto=auto)
577 if test "x$enable_nautilus_sendto" != "xno"; then
578 PKG_CHECK_MODULES(NST,
580 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
581 ], have_nst="yes", have_nst="no")
586 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
587 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
592 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
594 # -----------------------------------------------------------
596 # -----------------------------------------------------------
598 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
599 [build GOA MC plugin]), ,
602 if test "x$enable_goa" != "xno"; then
603 PKG_CHECK_MODULES(GOA,
605 mission-control-plugins
606 goa-1.0 >= $GOA_REQUIRED
607 ], have_goa="yes", have_goa="no")
609 AC_MSG_CHECKING([Mission Control plugins dir])
610 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
612 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
613 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
618 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
619 AC_MSG_ERROR([Could not find GOA dependencies.])
622 if test "x$have_goa" = "xyes"; then
623 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
626 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
628 # Optional dependency for avatar selection
629 AC_ARG_WITH([cheese],
630 AS_HELP_STRING([--with-cheese],
631 [enable cheese webcam support]),,
634 if test x"$with_cheese" != x"no" ; then
635 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
636 if test x${have_cheese} = xyes; then
637 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
639 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
640 AC_MSG_ERROR([Cheese configured but not found:
647 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
650 # -----------------------------------------------------------
651 # Coding style checks
652 # -----------------------------------------------------------
653 AC_ARG_ENABLE(coding-style-checks,
654 AS_HELP_STRING([--disable-coding-style-checks],
655 [do not check coding style using grep]),
656 [ENABLE_CODING_STYLE_CHECKS=$enableval],
657 [ENABLE_CODING_STYLE_CHECKS=yes])
659 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
660 # -----------------------------------------------------------
665 data/empathy.desktop.in
666 data/empathy-accounts.desktop.in
671 libempathy-gtk/Makefile
673 nautilus-sendto-plugin/Makefile
674 goa-mc-plugin/Makefile
677 tests/interactive/Makefile
686 Compiler....................: ${CC}
687 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
688 Linker Flags................: ${LDFLAGS}
689 Prefix......................: ${prefix}
690 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
693 Spell checking (enchant)....: ${have_enchant}
694 Display maps (libchamplain).: ${have_libchamplain}
695 Location awareness (Geoclue): ${have_geoclue}
696 Geocode support (Geocode)...: ${have_geocode}
697 Meego widgets...............: ${have_meego}
698 Cheese webcam support ......: ${have_cheese}
699 Camera monitoring...........: ${have_gudev}
702 NetworkManager integration..: ${have_nm}
703 ConnMan integration.........: ${have_connman}
706 Nautilus-sendto plugin......: ${have_nst}
707 GOA MC plugin...............: ${have_goa}
708 Salut E-D-S support.........: ${with_eds}
709 Exp. Call channel handler...: ${have_call}
710 Exp. Call log support.......: ${have_call_logs}