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], [90])
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.6
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 LIBSECRET_REQUIRED=0.5
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 LIBSIGNON_REQUIRED=1.1
80 MC_PLUGINS_REQUIRED=5.13.0
82 # Use --enable-maintainer-mode to disable deprecated symbols,
83 # disable single include and enable GSEAL. If this is not a released empathy,
84 # maintainer mode is forced
85 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
86 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
87 #GNOME_MAINTAINER_MODE_DEFINES
90 prev_top_build_prefix=$ac_top_build_prefix
91 prev_ac_configure_args=$ac_configure_args
92 AX_CONFIG_DIR([libempathy-gtk/egg-list-box])
93 ac_top_build_prefix=$prev_top_build_prefix
94 ac_configure_args=$prev_ac_configure_args
96 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"libempathy-gtk/egg-list-box
97 PKG_CHECK_MODULES(EGGLISTBOX, egg-list-box)
99 AC_CONFIG_MACRO_DIR([m4])
100 AC_CONFIG_HEADERS([config.h])
101 AC_CONFIG_SRCDIR([configure.ac])
104 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
106 # Support silent build rules. Disable
107 # by either passing --disable-silent-rules to configure or passing V=1
109 AM_SILENT_RULES([yes])
122 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
124 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
125 AC_SUBST(GLIB_GENMARSHAL)
127 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
128 if test -z "$XSLTPROC"; then
129 AC_MSG_ERROR([xsltproc (from libxslt) is required])
131 AM_PATH_PYTHON([2.3])
136 # -----------------------------------------------------------
138 # -----------------------------------------------------------
139 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
140 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
142 AC_ARG_ENABLE(Werror,
143 AS_HELP_STRING([--disable-Werror],
144 [compile without -Werror (normally enabled in development builds)]),
145 werror=$enableval, :)
147 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
148 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
149 wno_missing_field_initializers=yes,
150 wno_missing_field_initializers=no)
151 AS_COMPILER_FLAG(-Wno-unused-parameter,
152 wno_unused_parameter=yes,
153 wno_unused_parameter=no)
155 ifelse(empathy_released, 1, [],
157 if test x$werror = xyes; then
158 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
160 if test x$wextra = xyes -a \
161 x$wno_missing_field_initializers = xyes -a \
162 x$wno_unused_parameter = xyes; then
163 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
167 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
168 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
169 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
170 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
171 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
173 AC_SUBST(ERROR_CFLAGS)
176 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
177 [build with support for gprof]),,
179 if test "x$enable_gprof" != "xno" ; then
181 LDFLAGS="$LDFLAGS -pg"
186 # -----------------------------------------------------------
187 # Pkg-Config dependency checks
188 # -----------------------------------------------------------
193 PKG_CHECK_MODULES(EMPATHY,
196 folks >= $FOLKS_REQUIRED
197 folks-telepathy >= $FOLKS_REQUIRED
198 glib-2.0 >= $GLIB_REQUIRED
199 gio-2.0 >= $GLIB_REQUIRED
200 gio-unix-2.0 >= $GLIB_REQUIRED
201 libsecret-1 >= $LIBSECRET_REQUIRED
202 gnutls >= $GNUTLS_REQUIRED
205 gsettings-desktop-schemas
206 gstreamer-0.10 >= $GSTREAMER_REQUIRED
207 gstreamer-interfaces-0.10
209 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
210 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
212 gtk+-3.0 >= $GTK_REQUIRED
213 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
214 libnotify >= $LIBNOTIFY_REQUIRED
215 gcr-3 >= $GCR_REQUIRED
217 libpulse-mainloop-glib
218 webkitgtk-3.0 >= $WEBKIT_REQUIRED
223 PKG_CHECK_MODULES(EMPATHY_CALL,
226 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
227 clutter-1.0 >= $CLUTTER_REQUIRED
228 clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED
229 clutter-gst-1.0 >= $CLUTTER_GST_REQUIRED
232 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
233 [Name of provider for accounts imported from GOA])
235 AC_DEFINE(EMPATHY_UOA_PROVIDER,
236 "im.telepathy.Account.Storage.UOA",
237 [Name of provider for accounts imported from libaccounts])
239 # -----------------------------------------------------------
241 # -----------------------------------------------------------
244 AS_HELP_STRING([--disable-debug],
245 [compile without debug code]),
246 enable_debug=$enableval, enable_debug=yes )
248 if test x$enable_debug = xyes; then
249 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
252 # -----------------------------------------------------------
254 # -----------------------------------------------------------
255 IT_PROG_INTLTOOL([0.50.0])
257 GETTEXT_PACKAGE=empathy
258 AC_SUBST(GETTEXT_PACKAGE)
259 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
261 # -----------------------------------------------------------
263 # -----------------------------------------------------------
265 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
266 [build with gudev support]), ,
269 if test "x$enable_gudev" != "xno"; then
271 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
272 have_gudev="yes", have_gudev="no")
274 if test "x$have_gudev" = "xyes"; then
275 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
281 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
282 AC_MSG_ERROR([Could not find gudev dependencies:
286 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
288 # -----------------------------------------------------------
289 # spellchecking checks: enchant and iso-codes
290 # -----------------------------------------------------------
292 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
293 [Enable spell checking]), ,
296 if test "x$enable_spell" != "xno"; then
297 PKG_CHECK_MODULES(ENCHANT,
299 enchant >= $ENCHANT_REQUIRED,
300 iso-codes >= $ISO_CODES_REQUIRED
301 ], have_enchant="yes", have_enchant="no")
303 if test "x$have_enchant" = "xyes"; then
304 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
305 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
306 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
307 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
308 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
314 AC_MSG_RESULT([$result])
320 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
321 AC_MSG_ERROR([Could not find spell-checking dependencies:
323 $ENCHANT_PKG_ERRORS])
326 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
328 # -----------------------------------------------------------
329 # Map view checks: libchamplain
330 # -----------------------------------------------------------
332 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
333 [Enable map view]), ,
336 if test "x$enable_map" != "xno"; then
338 PKG_CHECK_MODULES(LIBCHAMPLAIN,
342 champlain-0.12 >= $CHAMPLAIN_REQUIRED
343 ], have_libchamplain="yes", have_libchamplain="no")
345 if test "x$have_libchamplain" = "xyes"; then
346 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
352 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
353 AC_MSG_ERROR([Could not find map view dependencies:
355 $LIBCHAMPLAIN_PKG_ERRORS])
358 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
360 # -----------------------------------------------------------
361 # location checks: geoclue
362 # -----------------------------------------------------------
363 AC_ARG_ENABLE(location,
364 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
365 [Enable location awareness]), ,
366 enable_location=auto)
368 if test "x$enable_location" != "xno"; then
369 PKG_CHECK_MODULES(GEOCLUE,
371 geoclue >= $GEOCLUE_REQUIRED
372 ], have_geoclue="yes", have_geoclue="no")
374 if test "x$have_geoclue" = "xyes"; then
375 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
381 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
382 AC_MSG_ERROR([Could not find location dependencies:
384 $GEOCLUE_PKG_ERRORS])
387 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
388 AC_SUBST(GEOCLUE_CFLAGS)
389 AC_SUBST(GEOCLUE_LIBS)
391 # -----------------------------------------------------------
392 # location checks: geocode-glib
393 # -----------------------------------------------------------
394 AC_ARG_ENABLE(geocode,
395 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
396 [Enable geocode support]), ,
399 if test "x$enable_geocode" != "xno"; then
400 PKG_CHECK_MODULES(GEOCODE,
403 ], have_geocode="yes", have_geocode="no")
405 if test "x$have_geocode" = "xyes"; then
406 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
412 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
413 AC_MSG_ERROR([Could not find geocode dependencies:
415 $GEOCODE_PKG_ERRORS])
418 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
419 AC_SUBST(GEOCODE_CFLAGS)
420 AC_SUBST(GEOCODE_LIBS)
422 # -----------------------------------------------------------
424 # -----------------------------------------------------------
425 AC_ARG_ENABLE(nautilus-sendto,
426 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
427 [build nautilus-sendto plugin]), ,
428 enable_nautilus_sendto=auto)
430 if test "x$enable_nautilus_sendto" != "xno"; then
431 PKG_CHECK_MODULES(NST,
433 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
434 ], have_nst="yes", have_nst="no")
439 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
440 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
445 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
447 # -----------------------------------------------------------
449 # -----------------------------------------------------------
451 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
452 [build GOA MC plugin]), ,
455 if test "x$enable_goa" != "xno"; then
456 PKG_CHECK_MODULES(GOA,
458 mission-control-plugins
459 goa-1.0 >= $GOA_REQUIRED
460 ], have_goa="yes", have_goa="no")
465 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
466 AC_MSG_ERROR([Could not find GOA dependencies:
471 if test "x$have_goa" = "xyes"; then
472 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
475 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
477 # Optional dependency for avatar selection
478 AC_ARG_WITH([cheese],
479 AS_HELP_STRING([--with-cheese],
480 [enable cheese webcam support]),,
483 if test x"$with_cheese" != x"no" ; then
484 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= CHEESE_GTK_REQUIRED, [have_cheese=yes], [have_cheese=no])
485 if test x${have_cheese} = xyes; then
486 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
488 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
489 AC_MSG_ERROR([Cheese configured but not found:
496 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
498 # -----------------------------------------------------------
499 # ubuntu-online-accounts support
500 # -----------------------------------------------------------
501 AC_ARG_ENABLE(ubuntu-online-accounts,
502 AS_HELP_STRING([--enable-ubuntu-online-accounts=@<:@no/yes/auto@:>@],
503 [build Ubuntu Online Accounts plugins]), ,
504 enable_ubuntu_online_accounts=auto)
506 if test "x$enable_ubuntu_online_accounts" != "xno"; then
507 PKG_CHECK_MODULES(UOA,
510 mission-control-plugins >= $MC_PLUGINS_REQUIRED
511 libaccounts-glib >= $LIBACCOUNTS_REQUIRED
512 libsignon-glib >= $LIBSIGNON_REQUIRED
513 ], have_uoa="yes", have_uoa="no")
515 # provider plugin dir
516 AC_MSG_CHECKING([Accounts provider plugin dir])
517 ACCOUNTS_PROVIDER_PLUGIN_DIR=`pkg-config --variable=provider_plugindir account-plugin`
519 AC_MSG_RESULT([$ACCOUNTS_PROVIDER_PLUGIN_DIR])
520 AC_SUBST(ACCOUNTS_PROVIDER_PLUGIN_DIR)
523 AC_MSG_CHECKING([Accounts provider app plugin dir])
524 ACCOUNTS_APP_PLUGIN_DIR=`pkg-config --variable=application_plugindir account-plugin`
526 AC_MSG_RESULT([$ACCOUNTS_APP_PLUGIN_DIR])
527 AC_SUBST(ACCOUNTS_APP_PLUGIN_DIR)
530 AC_MSG_CHECKING([Accounts provider files dir])
531 ACCOUNTS_PROVIDER_FILES_DIR=`pkg-config --variable=providerfilesdir libaccounts-glib`
533 AC_MSG_RESULT([$ACCOUNTS_PROVIDER_FILES_DIR])
534 AC_SUBST(ACCOUNTS_PROVIDER_FILES_DIR)
537 AC_MSG_CHECKING([Accounts service files dir])
538 ACCOUNTS_SERVICE_FILES_DIR=`pkg-config --variable=servicefilesdir libaccounts-glib`
540 AC_MSG_RESULT([$ACCOUNTS_SERVICE_FILES_DIR])
541 AC_SUBST(ACCOUNTS_SERVICE_FILES_DIR)
543 # application files dir
544 AC_MSG_CHECKING([Accounts applications files dir])
545 ACCOUNTS_APPLICATION_FILES_DIR=`pkg-config --variable=applicationfilesdir libaccounts-glib`
547 AC_MSG_RESULT([$ACCOUNTS_APPLICATION_FILES_DIR])
548 AC_SUBST(ACCOUNTS_APPLICATION_FILES_DIR)
554 if test "x$enable_ubuntu_online_accounts" = "xyes" -a "x$have_uoa" != "xyes"; then
555 AC_MSG_ERROR([Could not find Ubuntu Online Accounts dependencies:
560 if test "x$have_uoa" = "xyes"; then
561 AC_DEFINE(HAVE_UOA, 1, [Define to 1 to build Ubuntu Online Accounts plugins])
564 AM_CONDITIONAL(HAVE_UOA, test "x$have_uoa" = "xyes")
566 if test "x$have_uoa" = "xyes" -o "x$have_goa" = "xyes"; then
567 AC_MSG_CHECKING([Mission Control plugins dir])
568 MISSION_CONTROL_PLUGINS_DIR=${libdir}/mission-control-plugins.`pkg-config --variable=MCP_ABI_VERSION mission-control-plugins`
570 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
571 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
578 # -----------------------------------------------------------
579 # Coding style checks
580 # -----------------------------------------------------------
581 AC_ARG_ENABLE(coding-style-checks,
582 AS_HELP_STRING([--disable-coding-style-checks],
583 [do not check coding style using grep]),
584 [ENABLE_CODING_STYLE_CHECKS=$enableval],
585 [ENABLE_CODING_STYLE_CHECKS=yes])
587 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
588 # -----------------------------------------------------------
593 data/empathy.desktop.in
599 libempathy-gtk/Makefile
601 nautilus-sendto-plugin/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/providers/Makefile
607 ubuntu-online-accounts/cc-plugins/services/Makefile
608 ubuntu-online-accounts/cc-plugins/app-plugin/Makefile
611 tests/interactive/Makefile
613 tests/certificates/Makefile
621 Compiler....................: ${CC}
622 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
623 Linker Flags................: ${LDFLAGS}
624 Prefix......................: ${prefix}
625 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
628 Spell checking (enchant)....: ${have_enchant}
629 Display maps (libchamplain).: ${have_libchamplain}
630 Location awareness (Geoclue): ${have_geoclue}
631 Geocode support (Geocode)...: ${have_geocode}
632 Cheese webcam support ......: ${have_cheese}
633 Camera monitoring...........: ${have_gudev}
636 Nautilus-sendto plugin......: ${have_nst}
637 GOA MC plugin...............: ${have_goa}
638 Ubuntu Online plugins.......: ${have_uoa}