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], [1])
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.14
47 TELEPATHY_GLIB_REQUIRED=0.16.0
48 TELEPATHY_LOGGER=0.2.10
49 WEBKIT_REQUIRED=1.3.13
52 CLUTTER_REQUIRED=1.7.14
53 CLUTTER_GTK_REQUIRED=0.90.3
54 ENCHANT_REQUIRED=1.2.0
56 ISO_CODES_REQUIRED=0.35
57 NAUTILUS_SENDTO_REQUIRED=2.90.0
58 NETWORK_MANAGER_REQUIRED=0.7.0
60 # Use --enable-maintainer-mode to disable deprecated symbols,
61 # disable single include and enable GSEAL. If this is not a released empathy,
62 # maintainer mode is forced
63 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
64 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
65 #GNOME_MAINTAINER_MODE_DEFINES
67 # Disable GLib deprecation warnings for now; we don't want to bump the GLib dep
68 # and make things harder for contributiors without good reason. We'll re-enable
69 # those warnings later during the cycle (bgo #662662)
70 AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
73 prev_top_build_prefix=$ac_top_build_prefix
74 prev_ac_configure_args=$ac_configure_args
75 ac_configure_args="$ac_configure_args --disable-shared-library"
76 AX_CONFIG_DIR([telepathy-yell])
77 ac_top_build_prefix=$prev_top_build_prefix
78 ac_configure_args=$prev_ac_configure_args
79 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"telepathy-yell/telepathy-yell
81 AC_CONFIG_MACRO_DIR([m4])
82 AC_CONFIG_HEADERS([config.h])
83 AC_CONFIG_SRCDIR([configure.ac])
86 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
88 # Support silent build rules. Disable
89 # by either passing --disable-silent-rules to configure or passing V=1
91 AM_SILENT_RULES([yes])
104 GNOME_DOC_INIT([0.17.3])
105 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
107 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
108 AC_SUBST(GLIB_GENMARSHAL)
110 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
111 if test -z "$XSLTPROC"; then
112 AC_MSG_ERROR([xsltproc (from libxslt) is required])
114 AM_PATH_PYTHON([2.3])
119 # -----------------------------------------------------------
121 # -----------------------------------------------------------
122 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
123 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
125 AC_ARG_ENABLE(Werror,
126 AS_HELP_STRING([--disable-Werror],
127 [compile without -Werror (normally enabled in development builds)]),
128 werror=$enableval, :)
130 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
131 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
132 wno_missing_field_initializers=yes,
133 wno_missing_field_initializers=no)
134 AS_COMPILER_FLAG(-Wno-unused-parameter,
135 wno_unused_parameter=yes,
136 wno_unused_parameter=no)
138 ifelse(empathy_released, 1, [],
140 if test x$werror = xyes; then
141 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
143 if test x$wextra = xyes -a \
144 x$wno_missing_field_initializers = xyes -a \
145 x$wno_unused_parameter = xyes; then
146 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
150 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
151 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
152 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
153 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
154 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
156 AC_SUBST(ERROR_CFLAGS)
159 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
160 [build with support for gprof]),,
162 if test "x$enable_gprof" != "xno" ; then
164 LDFLAGS="$LDFLAGS -pg"
169 # -----------------------------------------------------------
170 # Pkg-Config dependency checks
171 # -----------------------------------------------------------
176 PKG_CHECK_MODULES(EMPATHY,
179 folks >= $FOLKS_REQUIRED
180 folks-telepathy >= $FOLKS_REQUIRED
181 glib-2.0 >= $GLIB_REQUIRED
182 gio-2.0 >= $GLIB_REQUIRED
183 gio-unix-2.0 >= $GLIB_REQUIRED
184 gnome-keyring-1 >= $KEYRING_REQUIRED
185 gnutls >= $GNUTLS_REQUIRED
188 gsettings-desktop-schemas
189 gstreamer-0.10 >= $GSTREAMER_REQUIRED
190 gstreamer-interfaces-0.10
192 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
193 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
195 gtk+-3.0 >= $GTK_REQUIRED
196 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
197 libnotify >= $LIBNOTIFY_REQUIRED
198 gcr-3 >= $GCR_REQUIRED
200 libpulse-mainloop-glib
201 webkitgtk-3.0 >= $WEBKIT_REQUIRED
204 PKG_CHECK_MODULES(YELL, [telepathy-yell])
206 PKG_CHECK_MODULES(EMPATHY_AV,
209 telepathy-farsight >= $TELEPATHY_FARSIGHT_REQUIRED
212 # -----------------------------------------------------------
214 # -----------------------------------------------------------
216 AS_HELP_STRING([--enable-call=@<:@no/yes/auto@:>@],
217 [build with Call interface support]),,
219 if test "x$enable_call" != "xno" ; then
220 PKG_CHECK_MODULES(EMPATHY_CALL,
224 clutter-1.0 >= $CLUTTER_REQUIRED
227 ], have_call="yes", have_call="no" )
229 if test "x$have_call" = "xyes"; then
230 AC_DEFINE(HAVE_CALL, 1, [Define if you have Call channel support])
236 if test "x$enable_call" = "xyes" -a "x$have_call" != "xyes"; then
237 AC_MSG_ERROR([Could not find Call handler dependencies:
239 $EMPATHY_CALL_PKG_ERRORS])
241 AM_CONDITIONAL(HAVE_CALL, test "x$have_call" = "xyes")
244 # -----------------------------------------------------------
245 # Call support in tp-logger
246 # -----------------------------------------------------------
247 AC_ARG_ENABLE(call-logs,
248 AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
249 [build with call logs support]),,
250 [enable_call_logs=auto])
251 if test "x$enable_call_logs" != "xno" ; then
253 SAVE_CPPFLAGS=$CPPFLAGS
254 SAVE_LDFLAGS=$LDFLAGS
255 CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
256 CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
257 LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
259 AC_CHECK_HEADER(telepathy-logger/call-event.h,
260 have_call_logs="yes", have_call_logs="no")
263 CPPFLAGS=$SAVE_CPPFLAGS
264 LDFLAGS=$SAVE_LDFLAGS
266 if test "x$have_call_logs" = "xyes"; then
267 AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
273 if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
274 AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
275 built with --enable-call])
278 # -----------------------------------------------------------
279 # evolution-data-server (about-me)
280 # -----------------------------------------------------------
282 AS_HELP_STRING([--with-eds],
283 [build with evolution-data-server support]),,
285 if test x"$with_eds" = x"yes" ; then
286 PKG_CHECK_MODULES(EDS, [libebook-1.2])
287 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
290 # -----------------------------------------------------------
292 # -----------------------------------------------------------
295 AS_HELP_STRING([--disable-debug],
296 [compile without debug code]),
297 enable_debug=$enableval, enable_debug=yes )
299 if test x$enable_debug = xyes; then
300 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
303 # -----------------------------------------------------------
305 # -----------------------------------------------------------
306 IT_PROG_INTLTOOL([0.40.0])
308 AM_GNU_GETTEXT_VERSION([0.17])
309 AM_GNU_GETTEXT([external])
311 GETTEXT_PACKAGE=empathy
312 AC_SUBST(GETTEXT_PACKAGE)
313 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
315 # -----------------------------------------------------------
316 # Connectivity integration
317 # -----------------------------------------------------------
318 AC_ARG_WITH(connectivity,
319 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
320 [build with connectivity support]), ,
321 with_connectivity=auto)
323 if test "x$with_connectivity" = "xno"; then
327 elif test "x$with_connectivity" = "xconnman"; then
330 PKG_CHECK_MODULES(CONNMAN,
333 ], have_connman="yes", have_connman="no")
335 if test "x$have_connman" = "xyes"; then
336 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
342 PKG_CHECK_MODULES(NETWORK_MANAGER,
344 libnm-glib >= $NETWORK_MANAGER_REQUIRED
345 ], have_nm="yes", have_nm="no")
347 if test "x$have_nm" = "xyes"; then
348 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
352 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
353 AC_MSG_ERROR([Couldn't find connman dependencies:
355 $CONNMAN_PKG_ERRORS])
358 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
359 AC_MSG_ERROR([Couldn't find Network Manager dependencies:
361 $NETWORK_MANAGER_PKG_ERRORS])
364 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
365 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
367 # -----------------------------------------------------------
369 # -----------------------------------------------------------
371 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
372 [build with gudev support]), ,
375 if test "x$enable_gudev" != "xno"; then
377 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
378 have_gudev="yes", have_gudev="no")
380 if test "x$have_gudev" = "xyes"; then
381 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
387 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
388 AC_MSG_ERROR([Could not find gudev dependencies:
392 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
394 # -----------------------------------------------------------
395 # spellchecking checks: enchant and iso-codes
396 # -----------------------------------------------------------
398 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
399 [Enable spell checking]), ,
402 if test "x$enable_spell" != "xno"; then
403 PKG_CHECK_MODULES(ENCHANT,
405 enchant >= $ENCHANT_REQUIRED,
406 iso-codes >= $ISO_CODES_REQUIRED
407 ], have_enchant="yes", have_enchant="no")
409 if test "x$have_enchant" = "xyes"; then
410 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
411 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
412 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
413 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
414 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
420 AC_MSG_RESULT([$result])
426 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
427 AC_MSG_ERROR([Could not find spell-checking dependencies:
429 $ENCHANT_PKG_ERRORS])
432 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
434 # -----------------------------------------------------------
435 # Map view checks: libchamplain
436 # -----------------------------------------------------------
438 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
439 [Enable map view]), ,
442 if test "x$enable_map" != "xno"; then
444 PKG_CHECK_MODULES(LIBCHAMPLAIN,
449 ], have_libchamplain="yes", have_libchamplain="no")
451 if test "x$have_libchamplain" = "xyes"; then
452 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
458 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
459 AC_MSG_ERROR([Could not find map view dependencies:
461 $LIBCHAMPLAIN_PKG_ERRORS])
464 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
466 # -----------------------------------------------------------
467 # location checks: geoclue
468 # -----------------------------------------------------------
469 AC_ARG_ENABLE(location,
470 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
471 [Enable location awareness]), ,
472 enable_location=auto)
474 if test "x$enable_location" != "xno"; then
475 PKG_CHECK_MODULES(GEOCLUE,
477 geoclue >= $GEOCLUE_REQUIRED
478 ], have_geoclue="yes", have_geoclue="no")
480 if test "x$have_geoclue" = "xyes"; then
481 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
487 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
488 AC_MSG_ERROR([Could not find location dependencies:
490 $GEOCLUE_PKG_ERRORS])
493 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
494 AC_SUBST(GEOCLUE_CFLAGS)
495 AC_SUBST(GEOCLUE_LIBS)
497 # -----------------------------------------------------------
498 # location checks: geocode-glib
499 # -----------------------------------------------------------
500 AC_ARG_ENABLE(geocode,
501 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
502 [Enable geocode support]), ,
505 if test "x$enable_geocode" != "xno"; then
506 PKG_CHECK_MODULES(GEOCODE,
509 ], have_geocode="yes", have_geocode="no")
511 if test "x$have_geocode" = "xyes"; then
512 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
518 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
519 AC_MSG_ERROR([Could not find geocode dependencies:
521 $GEOCODE_PKG_ERRORS])
524 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
525 AC_SUBST(GEOCODE_CFLAGS)
526 AC_SUBST(GEOCODE_LIBS)
528 # -----------------------------------------------------------
529 # meego widgets support
530 # -----------------------------------------------------------
532 AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
533 [Enable meego widgets]), ,
536 if test "x$enable_meego" != "xno"; then
537 PKG_CHECK_MODULES(MEEGO,
541 ], have_meego="yes", have_meego="no")
543 if test "x$have_meego" = "xyes"; then
544 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
550 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
551 AC_MSG_ERROR([Could not find meego dependencies:
556 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
557 AC_SUBST(MEEGO_CFLAGS)
560 # -----------------------------------------------------------
562 # -----------------------------------------------------------
563 AC_ARG_ENABLE(nautilus-sendto,
564 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
565 [build nautilus-sendto plugin]), ,
566 enable_nautilus_sendto=auto)
568 if test "x$enable_nautilus_sendto" != "xno"; then
569 PKG_CHECK_MODULES(NST,
571 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
572 ], have_nst="yes", have_nst="no")
577 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
578 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
583 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
585 # -----------------------------------------------------------
587 # -----------------------------------------------------------
589 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
590 [build GOA MC plugin]), ,
593 if test "x$enable_goa" != "xno"; then
594 PKG_CHECK_MODULES(GOA,
596 mission-control-plugins
598 ], have_goa="yes", have_goa="no")
600 AC_MSG_CHECKING([Mission Control plugins dir])
601 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
603 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
608 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
609 AC_MSG_ERROR([Could not find GOA dependencies.])
612 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
614 # Optional dependency for avatar selection
615 AC_ARG_WITH([cheese],
616 AS_HELP_STRING([--with-cheese],
617 [enable cheese webcam support]),,
620 if test x"$with_cheese" != x"no" ; then
621 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
622 if test x${have_cheese} = xyes; then
623 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
625 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
626 AC_MSG_ERROR([Cheese configured but not found:
633 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
636 # -----------------------------------------------------------
637 # Coding style checks
638 # -----------------------------------------------------------
639 AC_ARG_ENABLE(coding-style-checks,
640 AS_HELP_STRING([--disable-coding-style-checks],
641 [do not check coding style using grep]),
642 [ENABLE_CODING_STYLE_CHECKS=$enableval],
643 [ENABLE_CODING_STYLE_CHECKS=yes])
645 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
646 # -----------------------------------------------------------
651 data/empathy.desktop.in
652 data/empathy-accounts.desktop.in
657 libempathy-gtk/Makefile
659 nautilus-sendto-plugin/Makefile
660 goa-mc-plugin/Makefile
663 tests/interactive/Makefile
672 Compiler....................: ${CC}
673 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
674 Linker Flags................: ${LDFLAGS}
675 Prefix......................: ${prefix}
676 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
679 Spell checking (enchant)....: ${have_enchant}
680 Display maps (libchamplain).: ${have_libchamplain}
681 Location awareness (Geoclue): ${have_geoclue}
682 Geocode support (Geocode)...: ${have_geocode}
683 Meego widgets...............: ${have_meego}
684 Cheese webcam support ......: ${have_cheese}
685 Camera monitoring...........: ${have_gudev}
688 NetworkManager integration..: ${have_nm}
689 ConnMan integration.........: ${have_connman}
692 Nautilus-sendto plugin......: ${have_nst}
693 GOA MC plugin...............: ${have_goa}
694 Salut E-D-S support.........: ${with_eds}
695 Exp. Call channel handler...: ${have_call}
696 Exp. Call log support.......: ${have_call_logs}