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 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
111 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
112 AC_SUBST(GLIB_GENMARSHAL)
114 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
115 if test -z "$XSLTPROC"; then
116 AC_MSG_ERROR([xsltproc (from libxslt) is required])
118 AM_PATH_PYTHON([2.3])
123 # -----------------------------------------------------------
125 # -----------------------------------------------------------
126 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
127 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
129 AC_ARG_ENABLE(Werror,
130 AS_HELP_STRING([--disable-Werror],
131 [compile without -Werror (normally enabled in development builds)]),
132 werror=$enableval, :)
134 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
135 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
136 wno_missing_field_initializers=yes,
137 wno_missing_field_initializers=no)
138 AS_COMPILER_FLAG(-Wno-unused-parameter,
139 wno_unused_parameter=yes,
140 wno_unused_parameter=no)
142 ifelse(empathy_released, 1, [],
144 if test x$werror = xyes; then
145 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
147 if test x$wextra = xyes -a \
148 x$wno_missing_field_initializers = xyes -a \
149 x$wno_unused_parameter = xyes; then
150 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
154 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
155 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
156 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
157 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
158 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
160 AC_SUBST(ERROR_CFLAGS)
163 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
164 [build with support for gprof]),,
166 if test "x$enable_gprof" != "xno" ; then
168 LDFLAGS="$LDFLAGS -pg"
173 # -----------------------------------------------------------
174 # Pkg-Config dependency checks
175 # -----------------------------------------------------------
180 PKG_CHECK_MODULES(EMPATHY,
183 folks >= $FOLKS_REQUIRED
184 folks-telepathy >= $FOLKS_REQUIRED
185 glib-2.0 >= $GLIB_REQUIRED
186 gio-2.0 >= $GLIB_REQUIRED
187 gio-unix-2.0 >= $GLIB_REQUIRED
188 gnome-keyring-1 >= $KEYRING_REQUIRED
189 gnutls >= $GNUTLS_REQUIRED
192 gsettings-desktop-schemas
193 gstreamer-0.10 >= $GSTREAMER_REQUIRED
194 gstreamer-interfaces-0.10
196 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
197 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
199 gtk+-3.0 >= $GTK_REQUIRED
200 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
201 libnotify >= $LIBNOTIFY_REQUIRED
202 gcr-3 >= $GCR_REQUIRED
204 libpulse-mainloop-glib
205 webkitgtk-3.0 >= $WEBKIT_REQUIRED
209 PKG_CHECK_MODULES(YELL, [telepathy-yell])
211 PKG_CHECK_MODULES(EMPATHY_AV,
214 telepathy-farsight >= $TELEPATHY_FARSIGHT_REQUIRED
217 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
218 [Name of provider for accounts imported from GOA])
220 # -----------------------------------------------------------
222 # -----------------------------------------------------------
224 AS_HELP_STRING([--enable-call=@<:@no/yes/auto@:>@],
225 [build with Call interface support]),,
227 if test "x$enable_call" != "xno" ; then
228 PKG_CHECK_MODULES(EMPATHY_CALL,
231 telepathy-farstream >= 0.1.2
232 clutter-1.0 >= $CLUTTER_REQUIRED
235 ], have_call="yes", have_call="no" )
237 if test "x$have_call" = "xyes"; then
238 AC_DEFINE(HAVE_CALL, 1, [Define if you have Call channel support])
244 if test "x$enable_call" = "xyes" -a "x$have_call" != "xyes"; then
245 AC_MSG_ERROR([Could not find Call handler dependencies:
247 $EMPATHY_CALL_PKG_ERRORS])
249 AM_CONDITIONAL(HAVE_CALL, test "x$have_call" = "xyes")
252 # -----------------------------------------------------------
253 # Call support in tp-logger
254 # -----------------------------------------------------------
255 AC_ARG_ENABLE(call-logs,
256 AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
257 [build with call logs support]),,
258 [enable_call_logs=auto])
259 if test "x$enable_call_logs" != "xno" ; then
261 SAVE_CPPFLAGS=$CPPFLAGS
262 SAVE_LDFLAGS=$LDFLAGS
263 CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
264 CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
265 LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
267 AC_CHECK_HEADER(telepathy-logger/call-event.h,
268 have_call_logs="yes", have_call_logs="no")
271 CPPFLAGS=$SAVE_CPPFLAGS
272 LDFLAGS=$SAVE_LDFLAGS
274 if test "x$have_call_logs" = "xyes"; then
275 AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
281 if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
282 AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
283 built with --enable-call])
286 # -----------------------------------------------------------
287 # evolution-data-server (about-me)
288 # -----------------------------------------------------------
290 AS_HELP_STRING([--with-eds],
291 [build with evolution-data-server support]),,
293 if test x"$with_eds" = x"yes" ; then
294 PKG_CHECK_MODULES(EDS, [libebook-1.2])
295 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
298 # -----------------------------------------------------------
300 # -----------------------------------------------------------
303 AS_HELP_STRING([--disable-debug],
304 [compile without debug code]),
305 enable_debug=$enableval, enable_debug=yes )
307 if test x$enable_debug = xyes; then
308 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
311 # -----------------------------------------------------------
313 # -----------------------------------------------------------
314 IT_PROG_INTLTOOL([0.40.0])
316 AM_GNU_GETTEXT_VERSION([0.17])
317 AM_GNU_GETTEXT([external])
319 GETTEXT_PACKAGE=empathy
320 AC_SUBST(GETTEXT_PACKAGE)
321 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
323 # -----------------------------------------------------------
324 # Connectivity integration
325 # -----------------------------------------------------------
326 AC_ARG_WITH(connectivity,
327 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
328 [build with connectivity support]), ,
329 with_connectivity=auto)
331 if test "x$with_connectivity" = "xno"; then
335 elif test "x$with_connectivity" = "xconnman"; then
338 PKG_CHECK_MODULES(CONNMAN,
341 ], have_connman="yes", have_connman="no")
343 if test "x$have_connman" = "xyes"; then
344 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
350 PKG_CHECK_MODULES(NETWORK_MANAGER,
352 libnm-glib >= $NETWORK_MANAGER_REQUIRED
353 ], have_nm="yes", have_nm="no")
355 if test "x$have_nm" = "xyes"; then
356 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
360 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
361 AC_MSG_ERROR([Couldn't find connman dependencies:
363 $CONNMAN_PKG_ERRORS])
366 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
367 AC_MSG_ERROR([Couldn't find Network Manager dependencies:
369 $NETWORK_MANAGER_PKG_ERRORS])
372 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
373 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
375 # -----------------------------------------------------------
377 # -----------------------------------------------------------
379 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
380 [build with gudev support]), ,
383 if test "x$enable_gudev" != "xno"; then
385 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
386 have_gudev="yes", have_gudev="no")
388 if test "x$have_gudev" = "xyes"; then
389 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
395 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
396 AC_MSG_ERROR([Could not find gudev dependencies:
400 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
402 # -----------------------------------------------------------
403 # spellchecking checks: enchant and iso-codes
404 # -----------------------------------------------------------
406 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
407 [Enable spell checking]), ,
410 if test "x$enable_spell" != "xno"; then
411 PKG_CHECK_MODULES(ENCHANT,
413 enchant >= $ENCHANT_REQUIRED,
414 iso-codes >= $ISO_CODES_REQUIRED
415 ], have_enchant="yes", have_enchant="no")
417 if test "x$have_enchant" = "xyes"; then
418 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
419 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
420 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
421 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
422 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
428 AC_MSG_RESULT([$result])
434 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
435 AC_MSG_ERROR([Could not find spell-checking dependencies:
437 $ENCHANT_PKG_ERRORS])
440 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
442 # -----------------------------------------------------------
443 # Map view checks: libchamplain
444 # -----------------------------------------------------------
446 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
447 [Enable map view]), ,
450 if test "x$enable_map" != "xno"; then
452 PKG_CHECK_MODULES(LIBCHAMPLAIN,
456 champlain-0.12 >= $CHAMPLAIN_REQUIRED
457 ], have_libchamplain="yes", have_libchamplain="no")
459 if test "x$have_libchamplain" = "xyes"; then
460 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
466 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
467 AC_MSG_ERROR([Could not find map view dependencies:
469 $LIBCHAMPLAIN_PKG_ERRORS])
472 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
474 # -----------------------------------------------------------
475 # location checks: geoclue
476 # -----------------------------------------------------------
477 AC_ARG_ENABLE(location,
478 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
479 [Enable location awareness]), ,
480 enable_location=auto)
482 if test "x$enable_location" != "xno"; then
483 PKG_CHECK_MODULES(GEOCLUE,
485 geoclue >= $GEOCLUE_REQUIRED
486 ], have_geoclue="yes", have_geoclue="no")
488 if test "x$have_geoclue" = "xyes"; then
489 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
495 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
496 AC_MSG_ERROR([Could not find location dependencies:
498 $GEOCLUE_PKG_ERRORS])
501 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
502 AC_SUBST(GEOCLUE_CFLAGS)
503 AC_SUBST(GEOCLUE_LIBS)
505 # -----------------------------------------------------------
506 # location checks: geocode-glib
507 # -----------------------------------------------------------
508 AC_ARG_ENABLE(geocode,
509 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
510 [Enable geocode support]), ,
513 if test "x$enable_geocode" != "xno"; then
514 PKG_CHECK_MODULES(GEOCODE,
517 ], have_geocode="yes", have_geocode="no")
519 if test "x$have_geocode" = "xyes"; then
520 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
526 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
527 AC_MSG_ERROR([Could not find geocode dependencies:
529 $GEOCODE_PKG_ERRORS])
532 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
533 AC_SUBST(GEOCODE_CFLAGS)
534 AC_SUBST(GEOCODE_LIBS)
536 # -----------------------------------------------------------
537 # meego widgets support
538 # -----------------------------------------------------------
540 AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
541 [Enable meego widgets]), ,
544 if test "x$enable_meego" != "xno"; then
545 PKG_CHECK_MODULES(MEEGO,
549 ], have_meego="yes", have_meego="no")
551 if test "x$have_meego" = "xyes"; then
552 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
558 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
559 AC_MSG_ERROR([Could not find meego dependencies:
564 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
565 AC_SUBST(MEEGO_CFLAGS)
568 # -----------------------------------------------------------
570 # -----------------------------------------------------------
571 AC_ARG_ENABLE(nautilus-sendto,
572 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
573 [build nautilus-sendto plugin]), ,
574 enable_nautilus_sendto=auto)
576 if test "x$enable_nautilus_sendto" != "xno"; then
577 PKG_CHECK_MODULES(NST,
579 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
580 ], have_nst="yes", have_nst="no")
585 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
586 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
591 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
593 # -----------------------------------------------------------
595 # -----------------------------------------------------------
597 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
598 [build GOA MC plugin]), ,
601 if test "x$enable_goa" != "xno"; then
602 PKG_CHECK_MODULES(GOA,
604 mission-control-plugins
605 goa-1.0 >= $GOA_REQUIRED
606 ], have_goa="yes", have_goa="no")
608 AC_MSG_CHECKING([Mission Control plugins dir])
609 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
611 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
612 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
617 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
618 AC_MSG_ERROR([Could not find GOA dependencies.])
621 if test "x$have_goa" = "xyes"; then
622 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
625 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
627 # Optional dependency for avatar selection
628 AC_ARG_WITH([cheese],
629 AS_HELP_STRING([--with-cheese],
630 [enable cheese webcam support]),,
633 if test x"$with_cheese" != x"no" ; then
634 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
635 if test x${have_cheese} = xyes; then
636 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
638 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
639 AC_MSG_ERROR([Cheese configured but not found:
646 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
651 # -----------------------------------------------------------
652 # Coding style checks
653 # -----------------------------------------------------------
654 AC_ARG_ENABLE(coding-style-checks,
655 AS_HELP_STRING([--disable-coding-style-checks],
656 [do not check coding style using grep]),
657 [ENABLE_CODING_STYLE_CHECKS=$enableval],
658 [ENABLE_CODING_STYLE_CHECKS=yes])
660 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
661 # -----------------------------------------------------------
666 data/empathy.desktop.in
667 data/empathy-accounts.desktop.in
672 libempathy-gtk/Makefile
674 nautilus-sendto-plugin/Makefile
675 goa-mc-plugin/Makefile
678 tests/interactive/Makefile
687 Compiler....................: ${CC}
688 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
689 Linker Flags................: ${LDFLAGS}
690 Prefix......................: ${prefix}
691 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
694 Spell checking (enchant)....: ${have_enchant}
695 Display maps (libchamplain).: ${have_libchamplain}
696 Location awareness (Geoclue): ${have_geoclue}
697 Geocode support (Geocode)...: ${have_geocode}
698 Meego widgets...............: ${have_meego}
699 Cheese webcam support ......: ${have_cheese}
700 Camera monitoring...........: ${have_gudev}
703 NetworkManager integration..: ${have_nm}
704 ConnMan integration.........: ${have_connman}
707 Nautilus-sendto plugin......: ${have_nst}
708 GOA MC plugin...............: ${have_goa}
709 Salut E-D-S support.........: ${with_eds}
710 Exp. Call channel handler...: ${have_call}
711 Exp. Call log support.......: ${have_call_logs}