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], [5])
6 m4_define([empathy_micro_version], [0])
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_ALLOWED, GLIB_VERSION_2_32, [Prevent post 2.32 APIs])
45 AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_4, [Ignore post 3.4 deprecations])
46 AC_DEFINE(GDK_VERSION_MAX_ALLOWED, GDK_VERSION_3_4, [Prevent post 3.4 APIs])
48 CLUTTER_REQUIRED=1.10.0
49 AC_DEFINE(CLUTTER_VERSION_MIN_REQUIRED, CLUTTER_VERSION_1_8, [Ignore post 1.8 deprecations])
50 AC_DEFINE(CLUTTER_VERSION_MAX_ALLOWED, CLUTTER_VERSION_1_10, [Prevent post 1.10 APIs])
52 CLUTTER_GTK_REQUIRED=0.90.3
53 CLUTTER_GST_REQUIRED=1.5.2
55 GSTREAMER_REQUIRED=0.10.32
56 KEYRING_REQUIRED=2.26.0
58 LIBCANBERRA_GTK_REQUIRED=0.25
59 LIBNOTIFY_REQUIRED=0.7.0
60 TELEPATHY_FARSTREAM_REQUIRED=0.2.1
61 TELEPATHY_GLIB_REQUIRED=0.17.6
62 TELEPATHY_LOGGER=0.2.13
63 WEBKIT_REQUIRED=1.3.13
67 ENCHANT_REQUIRED=1.2.0
69 ISO_CODES_REQUIRED=0.35
70 NAUTILUS_SENDTO_REQUIRED=2.90.0
71 NETWORK_MANAGER_REQUIRED=0.7.0
72 CHAMPLAIN_REQUIRED=0.12.1
74 # Use --enable-maintainer-mode to disable deprecated symbols,
75 # disable single include and enable GSEAL. If this is not a released empathy,
76 # maintainer mode is forced
77 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
78 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
79 #GNOME_MAINTAINER_MODE_DEFINES
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 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
106 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
107 AC_SUBST(GLIB_GENMARSHAL)
109 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
110 if test -z "$XSLTPROC"; then
111 AC_MSG_ERROR([xsltproc (from libxslt) is required])
113 AM_PATH_PYTHON([2.3])
118 # -----------------------------------------------------------
120 # -----------------------------------------------------------
121 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
122 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
124 AC_ARG_ENABLE(Werror,
125 AS_HELP_STRING([--disable-Werror],
126 [compile without -Werror (normally enabled in development builds)]),
127 werror=$enableval, :)
129 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
130 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
131 wno_missing_field_initializers=yes,
132 wno_missing_field_initializers=no)
133 AS_COMPILER_FLAG(-Wno-unused-parameter,
134 wno_unused_parameter=yes,
135 wno_unused_parameter=no)
137 ifelse(empathy_released, 1, [],
139 if test x$werror = xyes; then
140 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
142 if test x$wextra = xyes -a \
143 x$wno_missing_field_initializers = xyes -a \
144 x$wno_unused_parameter = xyes; then
145 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
149 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
150 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
151 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
152 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
153 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
155 AC_SUBST(ERROR_CFLAGS)
158 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
159 [build with support for gprof]),,
161 if test "x$enable_gprof" != "xno" ; then
163 LDFLAGS="$LDFLAGS -pg"
168 # -----------------------------------------------------------
169 # Pkg-Config dependency checks
170 # -----------------------------------------------------------
175 PKG_CHECK_MODULES(EMPATHY,
178 folks >= $FOLKS_REQUIRED
179 folks-telepathy >= $FOLKS_REQUIRED
180 glib-2.0 >= $GLIB_REQUIRED
181 gio-2.0 >= $GLIB_REQUIRED
182 gio-unix-2.0 >= $GLIB_REQUIRED
183 gnome-keyring-1 >= $KEYRING_REQUIRED
184 gnutls >= $GNUTLS_REQUIRED
187 gsettings-desktop-schemas
188 gstreamer-0.10 >= $GSTREAMER_REQUIRED
189 gstreamer-interfaces-0.10
191 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
192 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
194 gtk+-3.0 >= $GTK_REQUIRED
195 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
196 libnotify >= $LIBNOTIFY_REQUIRED
197 gcr-3 >= $GCR_REQUIRED
199 libpulse-mainloop-glib
200 webkitgtk-3.0 >= $WEBKIT_REQUIRED
204 PKG_CHECK_MODULES(EMPATHY_CALL,
207 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
208 clutter-1.0 >= $CLUTTER_REQUIRED
209 clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED
210 clutter-gst-1.0 >= $CLUTTER_GST_REQUIRED
213 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
214 [Name of provider for accounts imported from GOA])
216 # -----------------------------------------------------------
218 # -----------------------------------------------------------
219 AC_ARG_ENABLE(empathy-av,
220 AS_HELP_STRING([--enable-empathy-av=@<:@no/yes@:>@],
221 [build empathy-av (legacy call UI)]),,
222 [enable_empathy_av=no])
223 if test "x$enable_empathy_av" != "xno" ; then
224 PKG_CHECK_MODULES(EMPATHY_AV,
227 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
229 AC_DEFINE(HAVE_EMPATHY_AV, 1, [Define if you have StreamedMedia channel support])
232 AM_CONDITIONAL(HAVE_EMPATHY_AV, test "x$have_empathy_av" = "xyes")
234 # -----------------------------------------------------------
235 # evolution-data-server (about-me)
236 # -----------------------------------------------------------
238 AS_HELP_STRING([--with-eds],
239 [build with evolution-data-server support]),,
241 if test x"$with_eds" = x"yes" ; then
242 PKG_CHECK_MODULES(EDS, [libebook-1.2])
243 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
246 # -----------------------------------------------------------
248 # -----------------------------------------------------------
251 AS_HELP_STRING([--disable-debug],
252 [compile without debug code]),
253 enable_debug=$enableval, enable_debug=yes )
255 if test x$enable_debug = xyes; then
256 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
259 # -----------------------------------------------------------
261 # -----------------------------------------------------------
262 IT_PROG_INTLTOOL([0.40.0])
264 GETTEXT_PACKAGE=empathy
265 AC_SUBST(GETTEXT_PACKAGE)
266 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
268 # -----------------------------------------------------------
270 # -----------------------------------------------------------
272 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
273 [build with gudev support]), ,
276 if test "x$enable_gudev" != "xno"; then
278 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
279 have_gudev="yes", have_gudev="no")
281 if test "x$have_gudev" = "xyes"; then
282 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
288 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
289 AC_MSG_ERROR([Could not find gudev dependencies:
293 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
295 # -----------------------------------------------------------
296 # spellchecking checks: enchant and iso-codes
297 # -----------------------------------------------------------
299 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
300 [Enable spell checking]), ,
303 if test "x$enable_spell" != "xno"; then
304 PKG_CHECK_MODULES(ENCHANT,
306 enchant >= $ENCHANT_REQUIRED,
307 iso-codes >= $ISO_CODES_REQUIRED
308 ], have_enchant="yes", have_enchant="no")
310 if test "x$have_enchant" = "xyes"; then
311 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
312 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
313 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
314 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
315 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
321 AC_MSG_RESULT([$result])
327 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
328 AC_MSG_ERROR([Could not find spell-checking dependencies:
330 $ENCHANT_PKG_ERRORS])
333 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
335 # -----------------------------------------------------------
336 # Map view checks: libchamplain
337 # -----------------------------------------------------------
339 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
340 [Enable map view]), ,
343 if test "x$enable_map" != "xno"; then
345 PKG_CHECK_MODULES(LIBCHAMPLAIN,
349 champlain-0.12 >= $CHAMPLAIN_REQUIRED
350 ], have_libchamplain="yes", have_libchamplain="no")
352 if test "x$have_libchamplain" = "xyes"; then
353 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
359 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
360 AC_MSG_ERROR([Could not find map view dependencies:
362 $LIBCHAMPLAIN_PKG_ERRORS])
365 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
367 # -----------------------------------------------------------
368 # location checks: geoclue
369 # -----------------------------------------------------------
370 AC_ARG_ENABLE(location,
371 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
372 [Enable location awareness]), ,
373 enable_location=auto)
375 if test "x$enable_location" != "xno"; then
376 PKG_CHECK_MODULES(GEOCLUE,
378 geoclue >= $GEOCLUE_REQUIRED
379 ], have_geoclue="yes", have_geoclue="no")
381 if test "x$have_geoclue" = "xyes"; then
382 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
388 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
389 AC_MSG_ERROR([Could not find location dependencies:
391 $GEOCLUE_PKG_ERRORS])
394 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
395 AC_SUBST(GEOCLUE_CFLAGS)
396 AC_SUBST(GEOCLUE_LIBS)
398 # -----------------------------------------------------------
399 # location checks: geocode-glib
400 # -----------------------------------------------------------
401 AC_ARG_ENABLE(geocode,
402 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
403 [Enable geocode support]), ,
406 if test "x$enable_geocode" != "xno"; then
407 PKG_CHECK_MODULES(GEOCODE,
410 ], have_geocode="yes", have_geocode="no")
412 if test "x$have_geocode" = "xyes"; then
413 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
419 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
420 AC_MSG_ERROR([Could not find geocode dependencies:
422 $GEOCODE_PKG_ERRORS])
425 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
426 AC_SUBST(GEOCODE_CFLAGS)
427 AC_SUBST(GEOCODE_LIBS)
429 # -----------------------------------------------------------
431 # -----------------------------------------------------------
432 AC_ARG_ENABLE(nautilus-sendto,
433 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
434 [build nautilus-sendto plugin]), ,
435 enable_nautilus_sendto=auto)
437 if test "x$enable_nautilus_sendto" != "xno"; then
438 PKG_CHECK_MODULES(NST,
440 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
441 ], have_nst="yes", have_nst="no")
446 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
447 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
452 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
454 # -----------------------------------------------------------
456 # -----------------------------------------------------------
458 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
459 [build GOA MC plugin]), ,
462 if test "x$enable_goa" != "xno"; then
463 PKG_CHECK_MODULES(GOA,
465 mission-control-plugins
466 goa-1.0 >= $GOA_REQUIRED
467 ], have_goa="yes", have_goa="no")
469 AC_MSG_CHECKING([Mission Control plugins dir])
470 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
472 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
473 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
478 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
479 AC_MSG_ERROR([Could not find GOA dependencies.])
482 if test "x$have_goa" = "xyes"; then
483 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
486 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
488 # Optional dependency for avatar selection
489 AC_ARG_WITH([cheese],
490 AS_HELP_STRING([--with-cheese],
491 [enable cheese webcam support]),,
494 if test x"$with_cheese" != x"no" ; then
495 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
496 if test x${have_cheese} = xyes; then
497 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
499 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
500 AC_MSG_ERROR([Cheese configured but not found:
507 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
512 # -----------------------------------------------------------
513 # Coding style checks
514 # -----------------------------------------------------------
515 AC_ARG_ENABLE(coding-style-checks,
516 AS_HELP_STRING([--disable-coding-style-checks],
517 [do not check coding style using grep]),
518 [ENABLE_CODING_STYLE_CHECKS=$enableval],
519 [ENABLE_CODING_STYLE_CHECKS=yes])
521 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
522 # -----------------------------------------------------------
527 data/empathy.desktop.in
528 data/empathy-accounts.desktop.in
533 libempathy-gtk/Makefile
535 nautilus-sendto-plugin/Makefile
536 goa-mc-plugin/Makefile
539 tests/interactive/Makefile
548 Compiler....................: ${CC}
549 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
550 Linker Flags................: ${LDFLAGS}
551 Prefix......................: ${prefix}
552 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
555 Spell checking (enchant)....: ${have_enchant}
556 Display maps (libchamplain).: ${have_libchamplain}
557 Location awareness (Geoclue): ${have_geoclue}
558 Geocode support (Geocode)...: ${have_geocode}
559 Cheese webcam support ......: ${have_cheese}
560 Camera monitoring...........: ${have_gudev}
563 Nautilus-sendto plugin......: ${have_nst}
564 GOA MC plugin...............: ${have_goa}
565 Salut E-D-S support.........: ${with_eds}
566 empathy-av (legacy).........: ${enable_empathy_av}