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
80 # Use --enable-maintainer-mode to disable deprecated symbols,
81 # disable single include and enable GSEAL. If this is not a released empathy,
82 # maintainer mode is forced
83 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
84 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
85 #GNOME_MAINTAINER_MODE_DEFINES
88 prev_top_build_prefix=$ac_top_build_prefix
89 prev_ac_configure_args=$ac_configure_args
90 AX_CONFIG_DIR([libempathy-gtk/egg-list-box])
91 ac_top_build_prefix=$prev_top_build_prefix
92 ac_configure_args=$prev_ac_configure_args
94 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"libempathy-gtk/egg-list-box
95 PKG_CHECK_MODULES(EGGLISTBOX, egg-list-box)
97 AC_CONFIG_MACRO_DIR([m4])
98 AC_CONFIG_HEADERS([config.h])
99 AC_CONFIG_SRCDIR([configure.ac])
102 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
104 # Support silent build rules. Disable
105 # by either passing --disable-silent-rules to configure or passing V=1
107 AM_SILENT_RULES([yes])
120 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
122 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
123 AC_SUBST(GLIB_GENMARSHAL)
125 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
126 if test -z "$XSLTPROC"; then
127 AC_MSG_ERROR([xsltproc (from libxslt) is required])
129 AM_PATH_PYTHON([2.3])
134 # -----------------------------------------------------------
136 # -----------------------------------------------------------
137 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
138 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
140 AC_ARG_ENABLE(Werror,
141 AS_HELP_STRING([--disable-Werror],
142 [compile without -Werror (normally enabled in development builds)]),
143 werror=$enableval, :)
145 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
146 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
147 wno_missing_field_initializers=yes,
148 wno_missing_field_initializers=no)
149 AS_COMPILER_FLAG(-Wno-unused-parameter,
150 wno_unused_parameter=yes,
151 wno_unused_parameter=no)
153 ifelse(empathy_released, 1, [],
155 if test x$werror = xyes; then
156 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
158 if test x$wextra = xyes -a \
159 x$wno_missing_field_initializers = xyes -a \
160 x$wno_unused_parameter = xyes; then
161 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
165 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
166 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
167 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
168 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
169 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
171 AC_SUBST(ERROR_CFLAGS)
174 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
175 [build with support for gprof]),,
177 if test "x$enable_gprof" != "xno" ; then
179 LDFLAGS="$LDFLAGS -pg"
184 # -----------------------------------------------------------
185 # Pkg-Config dependency checks
186 # -----------------------------------------------------------
191 PKG_CHECK_MODULES(EMPATHY,
194 folks >= $FOLKS_REQUIRED
195 folks-telepathy >= $FOLKS_REQUIRED
196 glib-2.0 >= $GLIB_REQUIRED
197 gio-2.0 >= $GLIB_REQUIRED
198 gio-unix-2.0 >= $GLIB_REQUIRED
199 gnome-keyring-1 >= $KEYRING_REQUIRED
200 gnutls >= $GNUTLS_REQUIRED
203 gsettings-desktop-schemas
204 gstreamer-0.10 >= $GSTREAMER_REQUIRED
205 gstreamer-interfaces-0.10
207 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
208 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
210 gtk+-3.0 >= $GTK_REQUIRED
211 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
212 libnotify >= $LIBNOTIFY_REQUIRED
213 gcr-3 >= $GCR_REQUIRED
215 libpulse-mainloop-glib
216 webkitgtk-3.0 >= $WEBKIT_REQUIRED
221 PKG_CHECK_MODULES(EMPATHY_CALL,
224 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
225 clutter-1.0 >= $CLUTTER_REQUIRED
226 clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED
227 clutter-gst-1.0 >= $CLUTTER_GST_REQUIRED
230 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
231 [Name of provider for accounts imported from GOA])
233 AC_DEFINE(EMPATHY_UOA_PROVIDER,
234 "im.telepathy.Account.Storage.UOA",
235 [Name of provider for accounts imported from libaccounts])
237 # -----------------------------------------------------------
239 # -----------------------------------------------------------
242 AS_HELP_STRING([--disable-debug],
243 [compile without debug code]),
244 enable_debug=$enableval, enable_debug=yes )
246 if test x$enable_debug = xyes; then
247 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
250 # -----------------------------------------------------------
252 # -----------------------------------------------------------
253 IT_PROG_INTLTOOL([0.50.0])
255 GETTEXT_PACKAGE=empathy
256 AC_SUBST(GETTEXT_PACKAGE)
257 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
259 # -----------------------------------------------------------
261 # -----------------------------------------------------------
263 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
264 [build with gudev support]), ,
267 if test "x$enable_gudev" != "xno"; then
269 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
270 have_gudev="yes", have_gudev="no")
272 if test "x$have_gudev" = "xyes"; then
273 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
279 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
280 AC_MSG_ERROR([Could not find gudev dependencies:
284 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
286 # -----------------------------------------------------------
287 # spellchecking checks: enchant and iso-codes
288 # -----------------------------------------------------------
290 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
291 [Enable spell checking]), ,
294 if test "x$enable_spell" != "xno"; then
295 PKG_CHECK_MODULES(ENCHANT,
297 enchant >= $ENCHANT_REQUIRED,
298 iso-codes >= $ISO_CODES_REQUIRED
299 ], have_enchant="yes", have_enchant="no")
301 if test "x$have_enchant" = "xyes"; then
302 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
303 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
304 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
305 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
306 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
312 AC_MSG_RESULT([$result])
318 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
319 AC_MSG_ERROR([Could not find spell-checking dependencies:
321 $ENCHANT_PKG_ERRORS])
324 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
326 # -----------------------------------------------------------
327 # Map view checks: libchamplain
328 # -----------------------------------------------------------
330 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
331 [Enable map view]), ,
334 if test "x$enable_map" != "xno"; then
336 PKG_CHECK_MODULES(LIBCHAMPLAIN,
340 champlain-0.12 >= $CHAMPLAIN_REQUIRED
341 ], have_libchamplain="yes", have_libchamplain="no")
343 if test "x$have_libchamplain" = "xyes"; then
344 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
350 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
351 AC_MSG_ERROR([Could not find map view dependencies:
353 $LIBCHAMPLAIN_PKG_ERRORS])
356 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
358 # -----------------------------------------------------------
359 # location checks: geoclue
360 # -----------------------------------------------------------
361 AC_ARG_ENABLE(location,
362 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
363 [Enable location awareness]), ,
364 enable_location=auto)
366 if test "x$enable_location" != "xno"; then
367 PKG_CHECK_MODULES(GEOCLUE,
369 geoclue >= $GEOCLUE_REQUIRED
370 ], have_geoclue="yes", have_geoclue="no")
372 if test "x$have_geoclue" = "xyes"; then
373 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
379 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
380 AC_MSG_ERROR([Could not find location dependencies:
382 $GEOCLUE_PKG_ERRORS])
385 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
386 AC_SUBST(GEOCLUE_CFLAGS)
387 AC_SUBST(GEOCLUE_LIBS)
389 # -----------------------------------------------------------
390 # location checks: geocode-glib
391 # -----------------------------------------------------------
392 AC_ARG_ENABLE(geocode,
393 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
394 [Enable geocode support]), ,
397 if test "x$enable_geocode" != "xno"; then
398 PKG_CHECK_MODULES(GEOCODE,
401 ], have_geocode="yes", have_geocode="no")
403 if test "x$have_geocode" = "xyes"; then
404 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
410 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
411 AC_MSG_ERROR([Could not find geocode dependencies:
413 $GEOCODE_PKG_ERRORS])
416 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
417 AC_SUBST(GEOCODE_CFLAGS)
418 AC_SUBST(GEOCODE_LIBS)
420 # -----------------------------------------------------------
422 # -----------------------------------------------------------
423 AC_ARG_ENABLE(nautilus-sendto,
424 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
425 [build nautilus-sendto plugin]), ,
426 enable_nautilus_sendto=auto)
428 if test "x$enable_nautilus_sendto" != "xno"; then
429 PKG_CHECK_MODULES(NST,
431 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
432 ], have_nst="yes", have_nst="no")
437 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
438 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
443 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
445 # -----------------------------------------------------------
447 # -----------------------------------------------------------
449 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
450 [build GOA MC plugin]), ,
453 if test "x$enable_goa" != "xno"; then
454 PKG_CHECK_MODULES(GOA,
456 mission-control-plugins
457 goa-1.0 >= $GOA_REQUIRED
458 ], have_goa="yes", have_goa="no")
460 AC_MSG_CHECKING([Mission Control plugins dir])
461 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
463 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
464 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
469 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
470 AC_MSG_ERROR([Could not find GOA dependencies:
475 if test "x$have_goa" = "xyes"; then
476 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
479 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
481 # Optional dependency for avatar selection
482 AC_ARG_WITH([cheese],
483 AS_HELP_STRING([--with-cheese],
484 [enable cheese webcam support]),,
487 if test x"$with_cheese" != x"no" ; then
488 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= CHEESE_GTK_REQUIRED, [have_cheese=yes], [have_cheese=no])
489 if test x${have_cheese} = xyes; then
490 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
492 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
493 AC_MSG_ERROR([Cheese configured but not found:
500 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
502 # -----------------------------------------------------------
503 # ubuntu-online-accounts support
504 # -----------------------------------------------------------
505 AC_ARG_ENABLE(ubuntu-online-accounts,
506 AS_HELP_STRING([--enable-ubuntu-online-accounts=@<:@no/yes/auto@:>@],
507 [build Ubuntu Online Accounts plugins]), ,
508 enable_ubuntu_online_accounts=auto)
510 if test "x$enable_ubuntu_online_accounts" != "xno"; then
511 PKG_CHECK_MODULES(UOA,
514 mission-control-plugins
515 libaccounts-glib >= $LIBACCOUNTS_REQUIRED
516 ], have_uoa="yes", have_uoa="no")
521 if test "x$enable_ubuntu_online_accounts" = "xyes" -a "x$have_uoa" != "xyes"; then
522 AC_MSG_ERROR([Could not find Ubuntu Online Accounts dependencies:
527 if test "x$have_uoa" = "xyes"; then
528 AC_DEFINE(HAVE_UOA, 1, [Define to 1 to build Ubuntu Online Accounts plugins])
531 AM_CONDITIONAL(HAVE_UOA, test "x$have_uoa" = "xyes")
536 # -----------------------------------------------------------
537 # Coding style checks
538 # -----------------------------------------------------------
539 AC_ARG_ENABLE(coding-style-checks,
540 AS_HELP_STRING([--disable-coding-style-checks],
541 [do not check coding style using grep]),
542 [ENABLE_CODING_STYLE_CHECKS=$enableval],
543 [ENABLE_CODING_STYLE_CHECKS=yes])
545 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
546 # -----------------------------------------------------------
551 data/empathy.desktop.in
552 data/empathy-accounts.desktop.in
558 libempathy-gtk/Makefile
560 nautilus-sendto-plugin/Makefile
561 goa-mc-plugin/Makefile
562 ubuntu-online-accounts/Makefile
563 ubuntu-online-accounts/mc-plugin/Makefile
566 tests/interactive/Makefile
568 tests/certificates/Makefile
576 Compiler....................: ${CC}
577 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
578 Linker Flags................: ${LDFLAGS}
579 Prefix......................: ${prefix}
580 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
583 Spell checking (enchant)....: ${have_enchant}
584 Display maps (libchamplain).: ${have_libchamplain}
585 Location awareness (Geoclue): ${have_geoclue}
586 Geocode support (Geocode)...: ${have_geocode}
587 Cheese webcam support ......: ${have_cheese}
588 Camera monitoring...........: ${have_gudev}
591 Nautilus-sendto plugin......: ${have_nst}
592 GOA MC plugin...............: ${have_goa}
593 Ubuntu Online plugins.......: ${have_uoa}