1 dnl If not 1, append datestamp to the version number
2 m4_define(empathy_released, 1)
4 m4_define([empathy_major_version], [3])
5 m4_define([empathy_minor_version], [12])
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 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_38, [Prevent post 2.38 APIs])
45 AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_8, [Ignore post 3.8 deprecations])
46 AC_DEFINE(GDK_VERSION_MAX_ALLOWED, GDK_VERSION_3_10, [Prevent post 3.10 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
54 TELEPATHY_GLIB_REQUIRED=0.23.2
55 AC_DEFINE(TP_VERSION_MIN_REQUIRED, TP_VERSION_0_20, [Ignore post 0.20 deprecations])
56 AC_DEFINE(TP_VERSION_MAX_ALLOWED, TP_VERSION_0_24, [Prevent post 0.24 APIs])
57 AC_DEFINE(TP_SEAL_ENABLE, 1, [Prevent to use sealed variables])
58 AC_DEFINE(TP_DISABLE_SINGLE_INCLUDE, 1, [Disable single include header])
61 AC_DEFINE(COGL_VERSION_MIN_REQUIRED, COGL_VERSION_1_14, [Ignore post 1.14 deprecations])
62 AC_DEFINE(COGL_VERSION_MAX_ALLOWED, COGL_VERSION_1_14, [Ignore post 1.14 deprecations])
64 GSTREAMER_REQUIRED=0.10.32
66 LIBSECRET_REQUIRED=0.5
68 LIBCANBERRA_GTK_REQUIRED=0.25
69 LIBNOTIFY_REQUIRED=0.7.0
70 TELEPATHY_LOGGER=0.8.0
75 ENCHANT_REQUIRED=1.2.0
76 GEOCLUE_REQUIRED=1.99.3
77 GEOCODE_GLIB_REQUIRED=0.99.1
78 ISO_CODES_REQUIRED=0.35
79 NAUTILUS_SENDTO_REQUIRED=2.90.0
80 NETWORK_MANAGER_REQUIRED=0.7.0
81 CHAMPLAIN_REQUIRED=0.12.1
82 CHEESE_GTK_REQUIRED=3.4.0
83 LIBACCOUNTS_REQUIRED=1.4
84 LIBSIGNON_REQUIRED=1.8
85 MC_PLUGINS_REQUIRED=5.13.1
87 # Use --enable-maintainer-mode to disable deprecated symbols,
88 # disable single include and enable GSEAL. If this is not a released empathy,
89 # maintainer mode is forced
90 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
91 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
92 #GNOME_MAINTAINER_MODE_DEFINES
95 prev_top_build_prefix=$ac_top_build_prefix
96 prev_ac_configure_args=$ac_configure_args
97 ac_configure_args="$ac_configure_args --with-pkgdatadir=${datadir}/empathy"
98 ac_configure_args="$ac_configure_args --with-gettext-package=empathy-tpaw"
99 ifelse(empathy_released, 1, [],
101 ac_configure_args="$ac_configure_args --enable-unreleased-checks"
103 AX_CONFIG_DIR([telepathy-account-widgets])
104 ac_top_build_prefix=$prev_top_build_prefix
105 ac_configure_args=$prev_ac_configure_args
107 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"telepathy-account-widgets/
108 PKG_CHECK_MODULES(TPAW, telepathy-account-widgets)
110 EMPATHY_UOA_PROVIDER=`pkg-config --variable=uoa_provider telepathy-account-widgets`
111 AC_DEFINE_UNQUOTED(EMPATHY_UOA_PROVIDER, "$EMPATHY_UOA_PROVIDER",
112 [Name of provider for accounts imported from libaccounts])
114 AC_CONFIG_MACRO_DIR([m4])
115 AC_CONFIG_HEADERS([config.h])
116 AC_CONFIG_SRCDIR([configure.ac])
119 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
121 # Support silent build rules. Disable
122 # by either passing --disable-silent-rules to configure or passing V=1
124 AM_SILENT_RULES([yes])
137 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
140 GLIB_COMPILE_RESOURCES=`$PKG_CONFIG gio-2.0 --variable=glib_compile_resources`
141 AC_SUBST(GLIB_COMPILE_RESOURCES)
142 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
143 AC_SUBST(GLIB_GENMARSHAL)
145 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
146 if test -z "$XSLTPROC"; then
147 AC_MSG_ERROR([xsltproc (from libxslt) is required])
149 AM_PATH_PYTHON([2.3])
154 # -----------------------------------------------------------
156 # -----------------------------------------------------------
157 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
158 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
160 AC_ARG_ENABLE(Werror,
161 AS_HELP_STRING([--disable-Werror],
162 [compile without -Werror (normally enabled in development builds)]),
163 werror=$enableval, :)
165 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
166 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
167 wno_missing_field_initializers=yes,
168 wno_missing_field_initializers=no)
169 AS_COMPILER_FLAG(-Wno-unused-parameter,
170 wno_unused_parameter=yes,
171 wno_unused_parameter=no)
173 ifelse(empathy_released, 1, [],
175 if test x$werror = xyes; then
176 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
178 if test x$wextra = xyes -a \
179 x$wno_missing_field_initializers = xyes -a \
180 x$wno_unused_parameter = xyes; then
181 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
185 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
186 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
187 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
188 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
189 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
191 AC_SUBST(ERROR_CFLAGS)
194 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
195 [build with support for gprof]),,
197 if test "x$enable_gprof" != "xno" ; then
199 LDFLAGS="$LDFLAGS -pg"
204 # -----------------------------------------------------------
205 # Pkg-Config dependency checks
206 # -----------------------------------------------------------
211 PKG_CHECK_MODULES(EMPATHY,
214 folks >= $FOLKS_REQUIRED
215 folks-telepathy >= $FOLKS_REQUIRED
216 glib-2.0 >= $GLIB_REQUIRED
217 gio-2.0 >= $GLIB_REQUIRED
218 gio-unix-2.0 >= $GLIB_REQUIRED
219 libsecret-1 >= $LIBSECRET_REQUIRED
220 gnutls >= $GNUTLS_REQUIRED
223 gsettings-desktop-schemas
225 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
226 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
228 gtk+-3.0 >= $GTK_REQUIRED
229 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
230 libnotify >= $LIBNOTIFY_REQUIRED
231 gcr-3 >= $GCR_REQUIRED
233 libpulse-mainloop-glib
234 webkitgtk-3.0 >= $WEBKIT_REQUIRED
239 # -----------------------------------------------------------
241 # -----------------------------------------------------------
242 PKG_CHECK_MODULES(EMPATHY_CALL,
245 telepathy-farstream >= $TP_FS_REQUIRED
246 clutter-1.0 >= $CLUTTER_REQUIRED
247 clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED
252 cogl-1.0 >= $COGL_REQUIRED
255 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
256 [Name of provider for accounts imported from GOA])
258 # -----------------------------------------------------------
260 # -----------------------------------------------------------
263 AS_HELP_STRING([--disable-debug],
264 [compile without debug code]),
265 enable_debug=$enableval, enable_debug=yes )
267 if test x$enable_debug = xyes; then
268 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
271 # -----------------------------------------------------------
273 # -----------------------------------------------------------
274 IT_PROG_INTLTOOL([0.50.0])
276 GETTEXT_PACKAGE=empathy
277 AC_SUBST(GETTEXT_PACKAGE)
278 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
280 # -----------------------------------------------------------
282 # -----------------------------------------------------------
284 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
285 [build with gudev support]), ,
288 if test "x$enable_gudev" != "xno"; then
290 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
291 have_gudev="yes", have_gudev="no")
293 if test "x$have_gudev" = "xyes"; then
294 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
300 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
301 AC_MSG_ERROR([Could not find gudev dependencies:
305 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
307 # -----------------------------------------------------------
308 # spellchecking checks: enchant and iso-codes
309 # -----------------------------------------------------------
311 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
312 [Enable spell checking]), ,
315 if test "x$enable_spell" != "xno"; then
316 PKG_CHECK_MODULES(ENCHANT,
318 enchant >= $ENCHANT_REQUIRED,
319 iso-codes >= $ISO_CODES_REQUIRED
320 ], have_enchant="yes", have_enchant="no")
322 if test "x$have_enchant" = "xyes"; then
323 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
324 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
325 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
326 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
327 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
333 AC_MSG_RESULT([$result])
339 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
340 AC_MSG_ERROR([Could not find spell-checking dependencies:
342 $ENCHANT_PKG_ERRORS])
345 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
347 # -----------------------------------------------------------
348 # Map view checks: libchamplain
349 # -----------------------------------------------------------
351 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
352 [Enable map view]), ,
355 if test "x$enable_map" != "xno"; then
357 PKG_CHECK_MODULES(LIBCHAMPLAIN,
361 champlain-0.12 >= $CHAMPLAIN_REQUIRED
362 ], have_libchamplain="yes", have_libchamplain="no")
364 if test "x$have_libchamplain" = "xyes"; then
365 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
371 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
372 AC_MSG_ERROR([Could not find map view dependencies:
374 $LIBCHAMPLAIN_PKG_ERRORS])
377 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
379 # -----------------------------------------------------------
380 # location checks: geoclue
381 # -----------------------------------------------------------
382 AC_ARG_ENABLE(location,
383 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
384 [Enable location awareness]), ,
385 enable_location=auto)
387 if test "x$enable_location" != "xno"; then
388 PKG_CHECK_MODULES(GEOCLUE,
390 geoclue-2.0 >= $GEOCLUE_REQUIRED
391 ], have_geoclue="yes", have_geoclue="no")
393 if test "x$have_geoclue" = "xyes"; then
394 GEOCLUE_XML_FILE=`pkg-config --variable=dbus_interface geoclue-2.0`
395 if test "x$GEOCLUE_XML_FILE" = "x"; then
396 echo "Can't find dbus_interface variable in geoclue-2.0.pc"
399 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue-2])
400 AC_SUBST(GEOCLUE_XML_FILE)
407 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
408 AC_MSG_ERROR([Could not find location dependencies:
410 $GEOCLUE_PKG_ERRORS])
413 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
414 AC_SUBST(GEOCLUE_CFLAGS)
415 AC_SUBST(GEOCLUE_LIBS)
417 # -----------------------------------------------------------
418 # location checks: geocode-glib
419 # -----------------------------------------------------------
420 AC_ARG_ENABLE(geocode,
421 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
422 [Enable geocode support]), ,
425 if test "x$enable_geocode" != "xno"; then
426 PKG_CHECK_MODULES(GEOCODE,
428 geocode-glib-1.0 >= $GEOCODE_GLIB_REQUIRED
429 ], have_geocode="yes", have_geocode="no")
431 if test "x$have_geocode" = "xyes"; then
432 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
438 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
439 AC_MSG_ERROR([Could not find geocode dependencies:
441 $GEOCODE_PKG_ERRORS])
444 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
445 AC_SUBST(GEOCODE_CFLAGS)
446 AC_SUBST(GEOCODE_LIBS)
448 # -----------------------------------------------------------
450 # -----------------------------------------------------------
452 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
453 [build GOA MC plugin]), ,
456 if test "x$enable_goa" != "xno"; then
457 PKG_CHECK_MODULES(GOA,
459 mission-control-plugins
460 goa-1.0 >= $GOA_REQUIRED
461 ], have_goa="yes", have_goa="no")
466 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
467 AC_MSG_ERROR([Could not find GOA dependencies:
472 if test "x$have_goa" = "xyes"; then
473 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
476 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
478 # Optional dependency for avatar selection
479 AC_ARG_WITH([cheese],
480 AS_HELP_STRING([--with-cheese],
481 [enable cheese webcam support]),,
484 if test x"$with_cheese" != x"no" ; then
485 PKG_CHECK_MODULES(CHEESE, cheese-gtk >= CHEESE_GTK_REQUIRED, [have_cheese=yes], [have_cheese=no])
486 if test x${have_cheese} = xyes; then
487 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
489 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
490 AC_MSG_ERROR([Cheese configured but not found:
497 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
499 # -----------------------------------------------------------
500 # ubuntu-online-accounts support
501 # -----------------------------------------------------------
502 AC_ARG_ENABLE(ubuntu-online-accounts,
503 AS_HELP_STRING([--enable-ubuntu-online-accounts=@<:@no/yes/auto@:>@],
504 [build Ubuntu Online Accounts plugins]), ,
505 enable_ubuntu_online_accounts=auto)
507 if test "x$enable_ubuntu_online_accounts" != "xno"; then
508 PKG_CHECK_MODULES(UOA,
511 mission-control-plugins >= $MC_PLUGINS_REQUIRED
512 libaccounts-glib >= $LIBACCOUNTS_REQUIRED
513 libsignon-glib >= $LIBSIGNON_REQUIRED
514 ], have_uoa="yes", have_uoa="no")
516 # provider plugin dir
517 AC_MSG_CHECKING([Accounts provider plugin dir])
518 ACCOUNTS_PROVIDER_PLUGIN_DIR=`pkg-config --variable=provider_plugindir account-plugin`
520 AC_MSG_RESULT([$ACCOUNTS_PROVIDER_PLUGIN_DIR])
521 AC_SUBST(ACCOUNTS_PROVIDER_PLUGIN_DIR)
524 AC_MSG_CHECKING([Accounts provider app plugin dir])
525 ACCOUNTS_APP_PLUGIN_DIR=`pkg-config --variable=application_plugindir account-plugin`
527 AC_MSG_RESULT([$ACCOUNTS_APP_PLUGIN_DIR])
528 AC_SUBST(ACCOUNTS_APP_PLUGIN_DIR)
531 AC_MSG_CHECKING([Accounts provider files dir])
532 ACCOUNTS_PROVIDER_FILES_DIR=`pkg-config --variable=providerfilesdir libaccounts-glib`
534 AC_MSG_RESULT([$ACCOUNTS_PROVIDER_FILES_DIR])
535 AC_SUBST(ACCOUNTS_PROVIDER_FILES_DIR)
538 AC_MSG_CHECKING([Accounts service files dir])
539 ACCOUNTS_SERVICE_FILES_DIR=`pkg-config --variable=servicefilesdir libaccounts-glib`
541 AC_MSG_RESULT([$ACCOUNTS_SERVICE_FILES_DIR])
542 AC_SUBST(ACCOUNTS_SERVICE_FILES_DIR)
544 # application files dir
545 AC_MSG_CHECKING([Accounts applications files dir])
546 ACCOUNTS_APPLICATION_FILES_DIR=`pkg-config --variable=applicationfilesdir libaccounts-glib`
548 AC_MSG_RESULT([$ACCOUNTS_APPLICATION_FILES_DIR])
549 AC_SUBST(ACCOUNTS_APPLICATION_FILES_DIR)
555 if test "x$enable_ubuntu_online_accounts" = "xyes" -a "x$have_uoa" != "xyes"; then
556 AC_MSG_ERROR([Could not find Ubuntu Online Accounts dependencies:
561 if test "x$have_uoa" = "xyes"; then
562 AC_DEFINE(HAVE_UOA, 1, [Define to 1 to build Ubuntu Online Accounts plugins])
565 AM_CONDITIONAL(HAVE_UOA, test "x$have_uoa" = "xyes")
567 if test "x$have_uoa" = "xyes" -o "x$have_goa" = "xyes"; then
568 AC_MSG_CHECKING([Mission Control plugins dir])
569 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --define-variable=libdir='${libdir}' --variable=plugindir mission-control-plugins`
571 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
572 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
579 # -----------------------------------------------------------
580 # Coding style checks
581 # -----------------------------------------------------------
582 AC_ARG_ENABLE(coding-style-checks,
583 AS_HELP_STRING([--disable-coding-style-checks],
584 [do not check coding style using grep]),
585 [ENABLE_CODING_STYLE_CHECKS=$enableval],
586 [ENABLE_CODING_STYLE_CHECKS=yes])
588 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
589 # -----------------------------------------------------------
594 data/empathy.desktop.in
600 libempathy-gtk/Makefile
602 goa-mc-plugin/Makefile
603 ubuntu-online-accounts/Makefile
604 ubuntu-online-accounts/mc-plugin/Makefile
605 ubuntu-online-accounts/cc-plugins/Makefile
606 ubuntu-online-accounts/cc-plugins/account-plugins/Makefile
607 ubuntu-online-accounts/cc-plugins/providers/Makefile
608 ubuntu-online-accounts/cc-plugins/services/Makefile
609 ubuntu-online-accounts/cc-plugins/app-plugin/Makefile
612 tests/interactive/Makefile
614 tests/certificates/Makefile
622 Compiler....................: ${CC}
623 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
624 Linker Flags................: ${LDFLAGS}
625 Prefix......................: ${prefix}
626 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
629 Spell checking (enchant)....: ${have_enchant}
630 Display maps (libchamplain).: ${have_libchamplain}
631 Location awareness (Geoclue): ${have_geoclue}
632 Geocode support (Geocode)...: ${have_geocode}
633 Cheese webcam support ......: ${have_cheese}
634 Camera monitoring...........: ${have_gudev}
637 GOA MC plugin...............: ${have_goa}
638 Ubuntu Online plugins.......: ${have_uoa}