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], [4])
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_34, [Prevent post 2.34 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=1.1.2
53 CLUTTER_GST_REQUIRED=1.5.2
55 TELEPATHY_GLIB_REQUIRED=0.19.4
56 AC_DEFINE(TP_VERSION_MIN_REQUIRED, TP_VERSION_0_20, [Ignore post 0.20 deprecations])
57 AC_DEFINE(TP_VERSION_MAX_ALLOWED, TP_VERSION_0_20, [Prevent post 0.20 APIs])
58 AC_DEFINE(TP_SEAL_ENABLE, 1, [Prevent to use sealed variables])
60 GSTREAMER_REQUIRED=0.10.32
61 KEYRING_REQUIRED=2.26.0
63 LIBCANBERRA_GTK_REQUIRED=0.25
64 LIBNOTIFY_REQUIRED=0.7.0
65 TELEPATHY_FARSTREAM_REQUIRED=0.2.1
66 TELEPATHY_LOGGER=0.2.13
67 WEBKIT_REQUIRED=1.3.13
71 ENCHANT_REQUIRED=1.2.0
73 ISO_CODES_REQUIRED=0.35
74 NAUTILUS_SENDTO_REQUIRED=2.90.0
75 NETWORK_MANAGER_REQUIRED=0.7.0
76 CHAMPLAIN_REQUIRED=0.12.1
77 CHEESE_GTK_REQUIRED=3.4.0
78 LIBACCOUNTS_REQUIRED=1.1
79 MC_PLUGINS_REQUIRED=5.13.0
81 # Use --enable-maintainer-mode to disable deprecated symbols,
82 # disable single include and enable GSEAL. If this is not a released empathy,
83 # maintainer mode is forced
84 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
85 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
86 #GNOME_MAINTAINER_MODE_DEFINES
89 prev_top_build_prefix=$ac_top_build_prefix
90 prev_ac_configure_args=$ac_configure_args
91 AX_CONFIG_DIR([libempathy-gtk/egg-list-box])
92 ac_top_build_prefix=$prev_top_build_prefix
93 ac_configure_args=$prev_ac_configure_args
95 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"libempathy-gtk/egg-list-box
96 PKG_CHECK_MODULES(EGGLISTBOX, egg-list-box)
98 AC_CONFIG_MACRO_DIR([m4])
99 AC_CONFIG_HEADERS([config.h])
100 AC_CONFIG_SRCDIR([configure.ac])
103 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
105 # Support silent build rules. Disable
106 # by either passing --disable-silent-rules to configure or passing V=1
108 AM_SILENT_RULES([yes])
121 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
123 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
124 AC_SUBST(GLIB_GENMARSHAL)
126 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
127 if test -z "$XSLTPROC"; then
128 AC_MSG_ERROR([xsltproc (from libxslt) is required])
130 AM_PATH_PYTHON([2.3])
135 # -----------------------------------------------------------
137 # -----------------------------------------------------------
138 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
139 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
141 AC_ARG_ENABLE(Werror,
142 AS_HELP_STRING([--disable-Werror],
143 [compile without -Werror (normally enabled in development builds)]),
144 werror=$enableval, :)
146 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
147 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
148 wno_missing_field_initializers=yes,
149 wno_missing_field_initializers=no)
150 AS_COMPILER_FLAG(-Wno-unused-parameter,
151 wno_unused_parameter=yes,
152 wno_unused_parameter=no)
154 ifelse(empathy_released, 1, [],
156 if test x$werror = xyes; then
157 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
159 if test x$wextra = xyes -a \
160 x$wno_missing_field_initializers = xyes -a \
161 x$wno_unused_parameter = xyes; then
162 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
166 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
167 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
168 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
169 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
170 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
172 AC_SUBST(ERROR_CFLAGS)
175 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
176 [build with support for gprof]),,
178 if test "x$enable_gprof" != "xno" ; then
180 LDFLAGS="$LDFLAGS -pg"
185 # -----------------------------------------------------------
186 # Pkg-Config dependency checks
187 # -----------------------------------------------------------
192 PKG_CHECK_MODULES(EMPATHY,
195 folks >= $FOLKS_REQUIRED
196 folks-telepathy >= $FOLKS_REQUIRED
197 glib-2.0 >= $GLIB_REQUIRED
198 gio-2.0 >= $GLIB_REQUIRED
199 gio-unix-2.0 >= $GLIB_REQUIRED
200 gnome-keyring-1 >= $KEYRING_REQUIRED
201 gnutls >= $GNUTLS_REQUIRED
204 gsettings-desktop-schemas
205 gstreamer-0.10 >= $GSTREAMER_REQUIRED
206 gstreamer-interfaces-0.10
208 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
209 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
211 gtk+-3.0 >= $GTK_REQUIRED
212 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
213 libnotify >= $LIBNOTIFY_REQUIRED
214 gcr-3 >= $GCR_REQUIRED
216 libpulse-mainloop-glib
217 webkitgtk-3.0 >= $WEBKIT_REQUIRED
222 PKG_CHECK_MODULES(EMPATHY_CALL,
225 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
226 clutter-1.0 >= $CLUTTER_REQUIRED
227 clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED
228 clutter-gst-1.0 >= $CLUTTER_GST_REQUIRED
231 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
232 [Name of provider for accounts imported from GOA])
234 AC_DEFINE(EMPATHY_UOA_PROVIDER,
235 "im.telepathy.Account.Storage.UOA",
236 [Name of provider for accounts imported from libaccounts])
238 # -----------------------------------------------------------
240 # -----------------------------------------------------------
243 AS_HELP_STRING([--disable-debug],
244 [compile without debug code]),
245 enable_debug=$enableval, enable_debug=yes )
247 if test x$enable_debug = xyes; then
248 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
251 # -----------------------------------------------------------
253 # -----------------------------------------------------------
254 IT_PROG_INTLTOOL([0.50.0])
256 GETTEXT_PACKAGE=empathy
257 AC_SUBST(GETTEXT_PACKAGE)
258 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
260 # -----------------------------------------------------------
262 # -----------------------------------------------------------
264 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
265 [build with gudev support]), ,
268 if test "x$enable_gudev" != "xno"; then
270 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
271 have_gudev="yes", have_gudev="no")
273 if test "x$have_gudev" = "xyes"; then
274 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
280 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
281 AC_MSG_ERROR([Could not find gudev dependencies:
285 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
287 # -----------------------------------------------------------
288 # spellchecking checks: enchant and iso-codes
289 # -----------------------------------------------------------
291 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
292 [Enable spell checking]), ,
295 if test "x$enable_spell" != "xno"; then
296 PKG_CHECK_MODULES(ENCHANT,
298 enchant >= $ENCHANT_REQUIRED,
299 iso-codes >= $ISO_CODES_REQUIRED
300 ], have_enchant="yes", have_enchant="no")
302 if test "x$have_enchant" = "xyes"; then
303 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
304 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
305 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
306 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
307 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
313 AC_MSG_RESULT([$result])
319 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
320 AC_MSG_ERROR([Could not find spell-checking dependencies:
322 $ENCHANT_PKG_ERRORS])
325 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
327 # -----------------------------------------------------------
328 # Map view checks: libchamplain
329 # -----------------------------------------------------------
331 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
332 [Enable map view]), ,
335 if test "x$enable_map" != "xno"; then
337 PKG_CHECK_MODULES(LIBCHAMPLAIN,
341 champlain-0.12 >= $CHAMPLAIN_REQUIRED
342 ], have_libchamplain="yes", have_libchamplain="no")
344 if test "x$have_libchamplain" = "xyes"; then
345 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
351 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
352 AC_MSG_ERROR([Could not find map view dependencies:
354 $LIBCHAMPLAIN_PKG_ERRORS])
357 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
359 # -----------------------------------------------------------
360 # location checks: geoclue
361 # -----------------------------------------------------------
362 AC_ARG_ENABLE(location,
363 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
364 [Enable location awareness]), ,
365 enable_location=auto)
367 if test "x$enable_location" != "xno"; then
368 PKG_CHECK_MODULES(GEOCLUE,
370 geoclue >= $GEOCLUE_REQUIRED
371 ], have_geoclue="yes", have_geoclue="no")
373 if test "x$have_geoclue" = "xyes"; then
374 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
380 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
381 AC_MSG_ERROR([Could not find location dependencies:
383 $GEOCLUE_PKG_ERRORS])
386 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
387 AC_SUBST(GEOCLUE_CFLAGS)
388 AC_SUBST(GEOCLUE_LIBS)
390 # -----------------------------------------------------------
391 # location checks: geocode-glib
392 # -----------------------------------------------------------
393 AC_ARG_ENABLE(geocode,
394 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
395 [Enable geocode support]), ,
398 if test "x$enable_geocode" != "xno"; then
399 PKG_CHECK_MODULES(GEOCODE,
402 ], have_geocode="yes", have_geocode="no")
404 if test "x$have_geocode" = "xyes"; then
405 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
411 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
412 AC_MSG_ERROR([Could not find geocode dependencies:
414 $GEOCODE_PKG_ERRORS])
417 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
418 AC_SUBST(GEOCODE_CFLAGS)
419 AC_SUBST(GEOCODE_LIBS)
421 # -----------------------------------------------------------
423 # -----------------------------------------------------------
424 AC_ARG_ENABLE(nautilus-sendto,
425 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
426 [build nautilus-sendto plugin]), ,
427 enable_nautilus_sendto=auto)
429 if test "x$enable_nautilus_sendto" != "xno"; then
430 PKG_CHECK_MODULES(NST,
432 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
433 ], have_nst="yes", have_nst="no")
438 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
439 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
444 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
446 # -----------------------------------------------------------
448 # -----------------------------------------------------------
450 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
451 [build GOA MC plugin]), ,
454 if test "x$enable_goa" != "xno"; then
455 PKG_CHECK_MODULES(GOA,
457 mission-control-plugins
458 goa-1.0 >= $GOA_REQUIRED
459 ], have_goa="yes", have_goa="no")
461 AC_MSG_CHECKING([Mission Control plugins dir])
462 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
464 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
465 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
470 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
471 AC_MSG_ERROR([Could not find GOA dependencies:
476 if test "x$have_goa" = "xyes"; then
477 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
480 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
482 # Optional dependency for avatar selection
483 AC_ARG_WITH([cheese],
484 AS_HELP_STRING([--with-cheese],
485 [enable cheese webcam support]),,
488 if test x"$with_cheese" != x"no" ; then
489 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= CHEESE_GTK_REQUIRED, [have_cheese=yes], [have_cheese=no])
490 if test x${have_cheese} = xyes; then
491 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
493 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
494 AC_MSG_ERROR([Cheese configured but not found:
501 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
503 # -----------------------------------------------------------
504 # ubuntu-online-accounts support
505 # -----------------------------------------------------------
506 AC_ARG_ENABLE(ubuntu-online-accounts,
507 AS_HELP_STRING([--enable-ubuntu-online-accounts=@<:@no/yes/auto@:>@],
508 [build Ubuntu Online Accounts plugins]), ,
509 enable_ubuntu_online_accounts=auto)
511 if test "x$enable_ubuntu_online_accounts" != "xno"; then
512 PKG_CHECK_MODULES(UOA,
515 mission-control-plugins >= $MC_PLUGINS_REQUIRED
516 libaccounts-glib >= $LIBACCOUNTS_REQUIRED
517 ], have_uoa="yes", have_uoa="no")
520 AC_MSG_CHECKING([Mission Control plugins dir])
521 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
523 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
524 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
526 # provider plugin dir
527 AC_MSG_CHECKING([Accounts provider plugin dir])
528 ACCOUNTS_PROVIDER_PLUGIN_DIR=`pkg-config --variable=provider_plugindir account-plugin`
530 AC_MSG_RESULT([$ACCOUNTS_PROVIDER_PLUGIN_DIR])
531 AC_SUBST(ACCOUNTS_PROVIDER_PLUGIN_DIR)
534 AC_MSG_CHECKING([Accounts provider files dir])
535 ACCOUNTS_PROVIDER_FILES_DIR=`pkg-config --variable=providerfilesdir libaccounts-glib`
537 AC_MSG_RESULT([$ACCOUNTS_PROVIDER_FILES_DIR])
538 AC_SUBST(ACCOUNTS_PROVIDER_FILES_DIR)
541 AC_MSG_CHECKING([Accounts service files dir])
542 ACCOUNTS_SERVICE_FILES_DIR=`pkg-config --variable=servicefilesdir libaccounts-glib`
544 AC_MSG_RESULT([$ACCOUNTS_SERVICE_FILES_DIR])
545 AC_SUBST(ACCOUNTS_SERVICE_FILES_DIR)
550 if test "x$enable_ubuntu_online_accounts" = "xyes" -a "x$have_uoa" != "xyes"; then
551 AC_MSG_ERROR([Could not find Ubuntu Online Accounts dependencies:
556 if test "x$have_uoa" = "xyes"; then
557 AC_DEFINE(HAVE_UOA, 1, [Define to 1 to build Ubuntu Online Accounts plugins])
560 AM_CONDITIONAL(HAVE_UOA, test "x$have_uoa" = "xyes")
565 # -----------------------------------------------------------
566 # Coding style checks
567 # -----------------------------------------------------------
568 AC_ARG_ENABLE(coding-style-checks,
569 AS_HELP_STRING([--disable-coding-style-checks],
570 [do not check coding style using grep]),
571 [ENABLE_CODING_STYLE_CHECKS=$enableval],
572 [ENABLE_CODING_STYLE_CHECKS=yes])
574 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
575 # -----------------------------------------------------------
580 data/empathy.desktop.in
581 data/empathy-accounts.desktop.in
587 libempathy-gtk/Makefile
589 nautilus-sendto-plugin/Makefile
590 goa-mc-plugin/Makefile
591 ubuntu-online-accounts/Makefile
592 ubuntu-online-accounts/mc-plugin/Makefile
595 tests/interactive/Makefile
597 tests/certificates/Makefile
605 Compiler....................: ${CC}
606 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
607 Linker Flags................: ${LDFLAGS}
608 Prefix......................: ${prefix}
609 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
612 Spell checking (enchant)....: ${have_enchant}
613 Display maps (libchamplain).: ${have_libchamplain}
614 Location awareness (Geoclue): ${have_geoclue}
615 Geocode support (Geocode)...: ${have_geocode}
616 Cheese webcam support ......: ${have_cheese}
617 Camera monitoring...........: ${have_gudev}
620 Nautilus-sendto plugin......: ${have_nst}
621 GOA MC plugin...............: ${have_goa}
622 Ubuntu Online plugins.......: ${have_uoa}