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
79 # Use --enable-maintainer-mode to disable deprecated symbols,
80 # disable single include and enable GSEAL. If this is not a released empathy,
81 # maintainer mode is forced
82 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
83 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
84 #GNOME_MAINTAINER_MODE_DEFINES
87 prev_top_build_prefix=$ac_top_build_prefix
88 prev_ac_configure_args=$ac_configure_args
89 AX_CONFIG_DIR([libempathy-gtk/egg-list-box])
90 ac_top_build_prefix=$prev_top_build_prefix
91 ac_configure_args=$prev_ac_configure_args
93 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"libempathy-gtk/egg-list-box
94 PKG_CHECK_MODULES(EGGLISTBOX, egg-list-box)
96 AC_CONFIG_MACRO_DIR([m4])
97 AC_CONFIG_HEADERS([config.h])
98 AC_CONFIG_SRCDIR([configure.ac])
101 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
103 # Support silent build rules. Disable
104 # by either passing --disable-silent-rules to configure or passing V=1
106 AM_SILENT_RULES([yes])
119 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
121 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
122 AC_SUBST(GLIB_GENMARSHAL)
124 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
125 if test -z "$XSLTPROC"; then
126 AC_MSG_ERROR([xsltproc (from libxslt) is required])
128 AM_PATH_PYTHON([2.3])
133 # -----------------------------------------------------------
135 # -----------------------------------------------------------
136 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
137 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
139 AC_ARG_ENABLE(Werror,
140 AS_HELP_STRING([--disable-Werror],
141 [compile without -Werror (normally enabled in development builds)]),
142 werror=$enableval, :)
144 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
145 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
146 wno_missing_field_initializers=yes,
147 wno_missing_field_initializers=no)
148 AS_COMPILER_FLAG(-Wno-unused-parameter,
149 wno_unused_parameter=yes,
150 wno_unused_parameter=no)
152 ifelse(empathy_released, 1, [],
154 if test x$werror = xyes; then
155 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
157 if test x$wextra = xyes -a \
158 x$wno_missing_field_initializers = xyes -a \
159 x$wno_unused_parameter = xyes; then
160 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
164 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
165 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
166 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
167 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
168 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
170 AC_SUBST(ERROR_CFLAGS)
173 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
174 [build with support for gprof]),,
176 if test "x$enable_gprof" != "xno" ; then
178 LDFLAGS="$LDFLAGS -pg"
183 # -----------------------------------------------------------
184 # Pkg-Config dependency checks
185 # -----------------------------------------------------------
190 PKG_CHECK_MODULES(EMPATHY,
193 folks >= $FOLKS_REQUIRED
194 folks-telepathy >= $FOLKS_REQUIRED
195 glib-2.0 >= $GLIB_REQUIRED
196 gio-2.0 >= $GLIB_REQUIRED
197 gio-unix-2.0 >= $GLIB_REQUIRED
198 gnome-keyring-1 >= $KEYRING_REQUIRED
199 gnutls >= $GNUTLS_REQUIRED
202 gsettings-desktop-schemas
203 gstreamer-0.10 >= $GSTREAMER_REQUIRED
204 gstreamer-interfaces-0.10
206 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
207 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
209 gtk+-3.0 >= $GTK_REQUIRED
210 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
211 libnotify >= $LIBNOTIFY_REQUIRED
212 gcr-3 >= $GCR_REQUIRED
214 libpulse-mainloop-glib
215 webkitgtk-3.0 >= $WEBKIT_REQUIRED
220 PKG_CHECK_MODULES(EMPATHY_CALL,
223 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
224 clutter-1.0 >= $CLUTTER_REQUIRED
225 clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED
226 clutter-gst-1.0 >= $CLUTTER_GST_REQUIRED
229 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
230 [Name of provider for accounts imported from GOA])
232 # -----------------------------------------------------------
234 # -----------------------------------------------------------
237 AS_HELP_STRING([--disable-debug],
238 [compile without debug code]),
239 enable_debug=$enableval, enable_debug=yes )
241 if test x$enable_debug = xyes; then
242 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
245 # -----------------------------------------------------------
247 # -----------------------------------------------------------
248 IT_PROG_INTLTOOL([0.50.0])
250 GETTEXT_PACKAGE=empathy
251 AC_SUBST(GETTEXT_PACKAGE)
252 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
254 # -----------------------------------------------------------
256 # -----------------------------------------------------------
258 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
259 [build with gudev support]), ,
262 if test "x$enable_gudev" != "xno"; then
264 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
265 have_gudev="yes", have_gudev="no")
267 if test "x$have_gudev" = "xyes"; then
268 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
274 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
275 AC_MSG_ERROR([Could not find gudev dependencies:
279 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
281 # -----------------------------------------------------------
282 # spellchecking checks: enchant and iso-codes
283 # -----------------------------------------------------------
285 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
286 [Enable spell checking]), ,
289 if test "x$enable_spell" != "xno"; then
290 PKG_CHECK_MODULES(ENCHANT,
292 enchant >= $ENCHANT_REQUIRED,
293 iso-codes >= $ISO_CODES_REQUIRED
294 ], have_enchant="yes", have_enchant="no")
296 if test "x$have_enchant" = "xyes"; then
297 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
298 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
299 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
300 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
301 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
307 AC_MSG_RESULT([$result])
313 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
314 AC_MSG_ERROR([Could not find spell-checking dependencies:
316 $ENCHANT_PKG_ERRORS])
319 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
321 # -----------------------------------------------------------
322 # Map view checks: libchamplain
323 # -----------------------------------------------------------
325 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
326 [Enable map view]), ,
329 if test "x$enable_map" != "xno"; then
331 PKG_CHECK_MODULES(LIBCHAMPLAIN,
335 champlain-0.12 >= $CHAMPLAIN_REQUIRED
336 ], have_libchamplain="yes", have_libchamplain="no")
338 if test "x$have_libchamplain" = "xyes"; then
339 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
345 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
346 AC_MSG_ERROR([Could not find map view dependencies:
348 $LIBCHAMPLAIN_PKG_ERRORS])
351 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
353 # -----------------------------------------------------------
354 # location checks: geoclue
355 # -----------------------------------------------------------
356 AC_ARG_ENABLE(location,
357 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
358 [Enable location awareness]), ,
359 enable_location=auto)
361 if test "x$enable_location" != "xno"; then
362 PKG_CHECK_MODULES(GEOCLUE,
364 geoclue >= $GEOCLUE_REQUIRED
365 ], have_geoclue="yes", have_geoclue="no")
367 if test "x$have_geoclue" = "xyes"; then
368 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
374 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
375 AC_MSG_ERROR([Could not find location dependencies:
377 $GEOCLUE_PKG_ERRORS])
380 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
381 AC_SUBST(GEOCLUE_CFLAGS)
382 AC_SUBST(GEOCLUE_LIBS)
384 # -----------------------------------------------------------
385 # location checks: geocode-glib
386 # -----------------------------------------------------------
387 AC_ARG_ENABLE(geocode,
388 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
389 [Enable geocode support]), ,
392 if test "x$enable_geocode" != "xno"; then
393 PKG_CHECK_MODULES(GEOCODE,
396 ], have_geocode="yes", have_geocode="no")
398 if test "x$have_geocode" = "xyes"; then
399 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
405 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
406 AC_MSG_ERROR([Could not find geocode dependencies:
408 $GEOCODE_PKG_ERRORS])
411 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
412 AC_SUBST(GEOCODE_CFLAGS)
413 AC_SUBST(GEOCODE_LIBS)
415 # -----------------------------------------------------------
417 # -----------------------------------------------------------
418 AC_ARG_ENABLE(nautilus-sendto,
419 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
420 [build nautilus-sendto plugin]), ,
421 enable_nautilus_sendto=auto)
423 if test "x$enable_nautilus_sendto" != "xno"; then
424 PKG_CHECK_MODULES(NST,
426 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
427 ], have_nst="yes", have_nst="no")
432 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
433 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
438 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
440 # -----------------------------------------------------------
442 # -----------------------------------------------------------
444 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
445 [build GOA MC plugin]), ,
448 if test "x$enable_goa" != "xno"; then
449 PKG_CHECK_MODULES(GOA,
451 mission-control-plugins
452 goa-1.0 >= $GOA_REQUIRED
453 ], have_goa="yes", have_goa="no")
455 AC_MSG_CHECKING([Mission Control plugins dir])
456 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
458 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
459 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
464 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
465 AC_MSG_ERROR([Could not find GOA dependencies:
470 if test "x$have_goa" = "xyes"; then
471 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
474 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
476 # Optional dependency for avatar selection
477 AC_ARG_WITH([cheese],
478 AS_HELP_STRING([--with-cheese],
479 [enable cheese webcam support]),,
482 if test x"$with_cheese" != x"no" ; then
483 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= CHEESE_GTK_REQUIRED, [have_cheese=yes], [have_cheese=no])
484 if test x${have_cheese} = xyes; then
485 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
487 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
488 AC_MSG_ERROR([Cheese configured but not found:
495 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
497 # -----------------------------------------------------------
498 # ubuntu-online-accounts support
499 # -----------------------------------------------------------
500 AC_ARG_ENABLE(ubuntu-online-accounts,
501 AS_HELP_STRING([--enable-ubuntu-online-accounts=@<:@no/yes/auto@:>@],
502 [build Ubuntu Online Accounts plugins]), ,
503 enable_ubuntu_online_accounts=auto)
505 if test "x$enable_ubuntu_online_accounts" != "xno"; then
506 PKG_CHECK_MODULES(UOA,
509 ], have_uoa="yes", have_uoa="no")
514 if test "x$enable_ubuntu_online_accounts" = "xyes" -a "x$have_uoa" != "xyes"; then
515 AC_MSG_ERROR([Could not find Ubuntu Online Accounts dependencies:
520 if test "x$have_uoa" = "xyes"; then
521 AC_DEFINE(HAVE_UOA, 1, [Define to 1 to build Ubuntu Online Accounts plugins])
524 AM_CONDITIONAL(HAVE_UOA, test "x$have_uoa" = "xyes")
529 # -----------------------------------------------------------
530 # Coding style checks
531 # -----------------------------------------------------------
532 AC_ARG_ENABLE(coding-style-checks,
533 AS_HELP_STRING([--disable-coding-style-checks],
534 [do not check coding style using grep]),
535 [ENABLE_CODING_STYLE_CHECKS=$enableval],
536 [ENABLE_CODING_STYLE_CHECKS=yes])
538 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
539 # -----------------------------------------------------------
544 data/empathy.desktop.in
545 data/empathy-accounts.desktop.in
551 libempathy-gtk/Makefile
553 nautilus-sendto-plugin/Makefile
554 goa-mc-plugin/Makefile
557 tests/interactive/Makefile
559 tests/certificates/Makefile
567 Compiler....................: ${CC}
568 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
569 Linker Flags................: ${LDFLAGS}
570 Prefix......................: ${prefix}
571 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
574 Spell checking (enchant)....: ${have_enchant}
575 Display maps (libchamplain).: ${have_libchamplain}
576 Location awareness (Geoclue): ${have_geoclue}
577 Geocode support (Geocode)...: ${have_geocode}
578 Cheese webcam support ......: ${have_cheese}
579 Camera monitoring...........: ${have_gudev}
582 Nautilus-sendto plugin......: ${have_nst}
583 GOA MC plugin...............: ${have_goa}
584 Ubuntu Online plugins.......: ${have_uoa}