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 CLUTTER_REQUIRED=1.8.0
49 AC_DEFINE(CLUTTER_VERSION_MIN_REQUIRED, CLUTTER_VERSION_1_8, [Ignore post 1.8 deprecations])
50 AC_DEFINE(CLUTTER_VERSION_MAX, CLUTTER_VERSION_1_8, [Prevent post 1.8 APIs])
52 CLUTTER_GTK_REQUIRED=0.90.3
54 GSTREAMER_REQUIRED=0.10.32
55 KEYRING_REQUIRED=2.26.0
57 LIBCANBERRA_GTK_REQUIRED=0.25
58 LIBNOTIFY_REQUIRED=0.7.0
59 TELEPATHY_FARSTREAM_REQUIRED=0.2.1
60 TELEPATHY_GLIB_REQUIRED=0.17.5
61 TELEPATHY_LOGGER=0.2.10
62 WEBKIT_REQUIRED=1.3.13
66 ENCHANT_REQUIRED=1.2.0
68 ISO_CODES_REQUIRED=0.35
69 NAUTILUS_SENDTO_REQUIRED=2.90.0
70 NETWORK_MANAGER_REQUIRED=0.7.0
71 CHAMPLAIN_REQUIRED=0.12.1
73 # Use --enable-maintainer-mode to disable deprecated symbols,
74 # disable single include and enable GSEAL. If this is not a released empathy,
75 # maintainer mode is forced
76 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
77 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
78 #GNOME_MAINTAINER_MODE_DEFINES
80 AC_CONFIG_MACRO_DIR([m4])
81 AC_CONFIG_HEADERS([config.h])
82 AC_CONFIG_SRCDIR([configure.ac])
85 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
87 # Support silent build rules. Disable
88 # by either passing --disable-silent-rules to configure or passing V=1
90 AM_SILENT_RULES([yes])
103 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
105 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
106 AC_SUBST(GLIB_GENMARSHAL)
108 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
109 if test -z "$XSLTPROC"; then
110 AC_MSG_ERROR([xsltproc (from libxslt) is required])
112 AM_PATH_PYTHON([2.3])
117 # -----------------------------------------------------------
119 # -----------------------------------------------------------
120 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
121 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
123 AC_ARG_ENABLE(Werror,
124 AS_HELP_STRING([--disable-Werror],
125 [compile without -Werror (normally enabled in development builds)]),
126 werror=$enableval, :)
128 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
129 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
130 wno_missing_field_initializers=yes,
131 wno_missing_field_initializers=no)
132 AS_COMPILER_FLAG(-Wno-unused-parameter,
133 wno_unused_parameter=yes,
134 wno_unused_parameter=no)
136 ifelse(empathy_released, 1, [],
138 if test x$werror = xyes; then
139 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
141 if test x$wextra = xyes -a \
142 x$wno_missing_field_initializers = xyes -a \
143 x$wno_unused_parameter = xyes; then
144 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
148 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
149 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
150 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
151 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
152 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
154 AC_SUBST(ERROR_CFLAGS)
157 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
158 [build with support for gprof]),,
160 if test "x$enable_gprof" != "xno" ; then
162 LDFLAGS="$LDFLAGS -pg"
167 # -----------------------------------------------------------
168 # Pkg-Config dependency checks
169 # -----------------------------------------------------------
174 PKG_CHECK_MODULES(EMPATHY,
177 folks >= $FOLKS_REQUIRED
178 folks-telepathy >= $FOLKS_REQUIRED
179 glib-2.0 >= $GLIB_REQUIRED
180 gio-2.0 >= $GLIB_REQUIRED
181 gio-unix-2.0 >= $GLIB_REQUIRED
182 gnome-keyring-1 >= $KEYRING_REQUIRED
183 gnutls >= $GNUTLS_REQUIRED
186 gsettings-desktop-schemas
187 gstreamer-0.10 >= $GSTREAMER_REQUIRED
188 gstreamer-interfaces-0.10
190 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
191 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
193 gtk+-3.0 >= $GTK_REQUIRED
194 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
195 libnotify >= $LIBNOTIFY_REQUIRED
196 gcr-3 >= $GCR_REQUIRED
198 libpulse-mainloop-glib
199 webkitgtk-3.0 >= $WEBKIT_REQUIRED
203 PKG_CHECK_MODULES(EMPATHY_CALL,
206 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
207 clutter-1.0 >= $CLUTTER_REQUIRED
212 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
213 [Name of provider for accounts imported from GOA])
215 # -----------------------------------------------------------
217 # -----------------------------------------------------------
218 AC_ARG_ENABLE(empathy-av,
219 AS_HELP_STRING([--enable-empathy-av=@<:@no/yes@:>@],
220 [build empathy-av (legacy call UI)]),,
221 [enable_empathy_av=no])
222 if test "x$enable_empathy_av" != "xno" ; then
223 PKG_CHECK_MODULES(EMPATHY_AV,
226 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
228 AC_DEFINE(HAVE_EMPATHY_AV, 1, [Define if you have StreamedMedia channel support])
231 AM_CONDITIONAL(HAVE_EMPATHY_AV, test "x$have_empathy_av" = "xyes")
233 # -----------------------------------------------------------
234 # Call support in tp-logger
235 # -----------------------------------------------------------
236 AC_ARG_ENABLE(call-logs,
237 AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
238 [build with call logs support]),,
239 [enable_call_logs=auto])
240 if test "x$enable_call_logs" != "xno" ; then
242 SAVE_CPPFLAGS=$CPPFLAGS
243 SAVE_LDFLAGS=$LDFLAGS
244 CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
245 CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
246 LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
248 AC_CHECK_HEADER(telepathy-logger/call-event.h,
249 have_call_logs="yes", have_call_logs="no")
252 CPPFLAGS=$SAVE_CPPFLAGS
253 LDFLAGS=$SAVE_LDFLAGS
255 if test "x$have_call_logs" = "xyes"; then
256 AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
262 if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
263 AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
264 built with --enable-call])
267 # -----------------------------------------------------------
268 # evolution-data-server (about-me)
269 # -----------------------------------------------------------
271 AS_HELP_STRING([--with-eds],
272 [build with evolution-data-server support]),,
274 if test x"$with_eds" = x"yes" ; then
275 PKG_CHECK_MODULES(EDS, [libebook-1.2])
276 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
279 # -----------------------------------------------------------
281 # -----------------------------------------------------------
284 AS_HELP_STRING([--disable-debug],
285 [compile without debug code]),
286 enable_debug=$enableval, enable_debug=yes )
288 if test x$enable_debug = xyes; then
289 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
292 # -----------------------------------------------------------
294 # -----------------------------------------------------------
295 IT_PROG_INTLTOOL([0.40.0])
297 GETTEXT_PACKAGE=empathy
298 AC_SUBST(GETTEXT_PACKAGE)
299 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
301 # -----------------------------------------------------------
302 # Connectivity integration
303 # -----------------------------------------------------------
304 AC_ARG_WITH(connectivity,
305 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
306 [build with connectivity support]), ,
307 with_connectivity=auto)
309 if test "x$with_connectivity" = "xno"; then
313 elif test "x$with_connectivity" = "xconnman"; then
316 PKG_CHECK_MODULES(CONNMAN,
319 ], have_connman="yes", have_connman="no")
321 if test "x$have_connman" = "xyes"; then
322 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
328 PKG_CHECK_MODULES(NETWORK_MANAGER,
330 libnm-glib >= $NETWORK_MANAGER_REQUIRED
331 ], have_nm="yes", have_nm="no")
333 if test "x$have_nm" = "xyes"; then
334 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
338 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
339 AC_MSG_ERROR([Couldn't find connman dependencies:
341 $CONNMAN_PKG_ERRORS])
344 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
345 AC_MSG_ERROR([Couldn't find Network Manager dependencies:
347 $NETWORK_MANAGER_PKG_ERRORS])
350 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
351 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
353 # -----------------------------------------------------------
355 # -----------------------------------------------------------
357 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
358 [build with gudev support]), ,
361 if test "x$enable_gudev" != "xno"; then
363 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
364 have_gudev="yes", have_gudev="no")
366 if test "x$have_gudev" = "xyes"; then
367 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
373 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
374 AC_MSG_ERROR([Could not find gudev dependencies:
378 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
380 # -----------------------------------------------------------
381 # spellchecking checks: enchant and iso-codes
382 # -----------------------------------------------------------
384 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
385 [Enable spell checking]), ,
388 if test "x$enable_spell" != "xno"; then
389 PKG_CHECK_MODULES(ENCHANT,
391 enchant >= $ENCHANT_REQUIRED,
392 iso-codes >= $ISO_CODES_REQUIRED
393 ], have_enchant="yes", have_enchant="no")
395 if test "x$have_enchant" = "xyes"; then
396 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
397 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
398 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
399 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
400 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
406 AC_MSG_RESULT([$result])
412 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
413 AC_MSG_ERROR([Could not find spell-checking dependencies:
415 $ENCHANT_PKG_ERRORS])
418 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
420 # -----------------------------------------------------------
421 # Map view checks: libchamplain
422 # -----------------------------------------------------------
424 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
425 [Enable map view]), ,
428 if test "x$enable_map" != "xno"; then
430 PKG_CHECK_MODULES(LIBCHAMPLAIN,
434 champlain-0.12 >= $CHAMPLAIN_REQUIRED
435 ], have_libchamplain="yes", have_libchamplain="no")
437 if test "x$have_libchamplain" = "xyes"; then
438 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
444 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
445 AC_MSG_ERROR([Could not find map view dependencies:
447 $LIBCHAMPLAIN_PKG_ERRORS])
450 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
452 # -----------------------------------------------------------
453 # location checks: geoclue
454 # -----------------------------------------------------------
455 AC_ARG_ENABLE(location,
456 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
457 [Enable location awareness]), ,
458 enable_location=auto)
460 if test "x$enable_location" != "xno"; then
461 PKG_CHECK_MODULES(GEOCLUE,
463 geoclue >= $GEOCLUE_REQUIRED
464 ], have_geoclue="yes", have_geoclue="no")
466 if test "x$have_geoclue" = "xyes"; then
467 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
473 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
474 AC_MSG_ERROR([Could not find location dependencies:
476 $GEOCLUE_PKG_ERRORS])
479 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
480 AC_SUBST(GEOCLUE_CFLAGS)
481 AC_SUBST(GEOCLUE_LIBS)
483 # -----------------------------------------------------------
484 # location checks: geocode-glib
485 # -----------------------------------------------------------
486 AC_ARG_ENABLE(geocode,
487 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
488 [Enable geocode support]), ,
491 if test "x$enable_geocode" != "xno"; then
492 PKG_CHECK_MODULES(GEOCODE,
495 ], have_geocode="yes", have_geocode="no")
497 if test "x$have_geocode" = "xyes"; then
498 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
504 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
505 AC_MSG_ERROR([Could not find geocode dependencies:
507 $GEOCODE_PKG_ERRORS])
510 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
511 AC_SUBST(GEOCODE_CFLAGS)
512 AC_SUBST(GEOCODE_LIBS)
514 # -----------------------------------------------------------
515 # meego widgets support
516 # -----------------------------------------------------------
518 AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
519 [Enable meego widgets]), ,
522 if test "x$enable_meego" != "xno"; then
523 PKG_CHECK_MODULES(MEEGO,
527 ], have_meego="yes", have_meego="no")
529 if test "x$have_meego" = "xyes"; then
530 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
536 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
537 AC_MSG_ERROR([Could not find meego dependencies:
542 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
543 AC_SUBST(MEEGO_CFLAGS)
546 # -----------------------------------------------------------
548 # -----------------------------------------------------------
549 AC_ARG_ENABLE(nautilus-sendto,
550 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
551 [build nautilus-sendto plugin]), ,
552 enable_nautilus_sendto=auto)
554 if test "x$enable_nautilus_sendto" != "xno"; then
555 PKG_CHECK_MODULES(NST,
557 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
558 ], have_nst="yes", have_nst="no")
563 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
564 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
569 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
571 # -----------------------------------------------------------
573 # -----------------------------------------------------------
575 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
576 [build GOA MC plugin]), ,
579 if test "x$enable_goa" != "xno"; then
580 PKG_CHECK_MODULES(GOA,
582 mission-control-plugins
583 goa-1.0 >= $GOA_REQUIRED
584 ], have_goa="yes", have_goa="no")
586 AC_MSG_CHECKING([Mission Control plugins dir])
587 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
589 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
590 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
595 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
596 AC_MSG_ERROR([Could not find GOA dependencies.])
599 if test "x$have_goa" = "xyes"; then
600 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
603 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
605 # Optional dependency for avatar selection
606 AC_ARG_WITH([cheese],
607 AS_HELP_STRING([--with-cheese],
608 [enable cheese webcam support]),,
611 if test x"$with_cheese" != x"no" ; then
612 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
613 if test x${have_cheese} = xyes; then
614 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
616 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
617 AC_MSG_ERROR([Cheese configured but not found:
624 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
629 # -----------------------------------------------------------
630 # Coding style checks
631 # -----------------------------------------------------------
632 AC_ARG_ENABLE(coding-style-checks,
633 AS_HELP_STRING([--disable-coding-style-checks],
634 [do not check coding style using grep]),
635 [ENABLE_CODING_STYLE_CHECKS=$enableval],
636 [ENABLE_CODING_STYLE_CHECKS=yes])
638 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
639 # -----------------------------------------------------------
644 data/empathy.desktop.in
645 data/empathy-accounts.desktop.in
650 libempathy-gtk/Makefile
652 nautilus-sendto-plugin/Makefile
653 goa-mc-plugin/Makefile
656 tests/interactive/Makefile
665 Compiler....................: ${CC}
666 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
667 Linker Flags................: ${LDFLAGS}
668 Prefix......................: ${prefix}
669 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
672 Spell checking (enchant)....: ${have_enchant}
673 Display maps (libchamplain).: ${have_libchamplain}
674 Location awareness (Geoclue): ${have_geoclue}
675 Geocode support (Geocode)...: ${have_geocode}
676 Meego widgets...............: ${have_meego}
677 Cheese webcam support ......: ${have_cheese}
678 Camera monitoring...........: ${have_gudev}
681 NetworkManager integration..: ${have_nm}
682 ConnMan integration.........: ${have_connman}
685 Nautilus-sendto plugin......: ${have_nst}
686 GOA MC plugin...............: ${have_goa}
687 Salut E-D-S support.........: ${with_eds}
688 Exp. Call log support.......: ${have_call_logs}
689 empathy-av (legacy).........: ${enable_empathy_av}