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], [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_32, [Prevent post 2.32 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=0.90.3
53 CLUTTER_GST_REQUIRED=1.5.2
55 TELEPATHY_GLIB_REQUIRED=0.19.0
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])
59 GSTREAMER_REQUIRED=0.10.32
60 KEYRING_REQUIRED=2.26.0
62 LIBCANBERRA_GTK_REQUIRED=0.25
63 LIBNOTIFY_REQUIRED=0.7.0
64 TELEPATHY_FARSTREAM_REQUIRED=0.2.1
65 TELEPATHY_LOGGER=0.2.13
66 WEBKIT_REQUIRED=1.3.13
70 ENCHANT_REQUIRED=1.2.0
72 ISO_CODES_REQUIRED=0.35
73 NAUTILUS_SENDTO_REQUIRED=2.90.0
74 NETWORK_MANAGER_REQUIRED=0.7.0
75 CHAMPLAIN_REQUIRED=0.12.1
77 # Use --enable-maintainer-mode to disable deprecated symbols,
78 # disable single include and enable GSEAL. If this is not a released empathy,
79 # maintainer mode is forced
80 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
81 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
82 #GNOME_MAINTAINER_MODE_DEFINES
84 AC_CONFIG_MACRO_DIR([m4])
85 AC_CONFIG_HEADERS([config.h])
86 AC_CONFIG_SRCDIR([configure.ac])
89 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
91 # Support silent build rules. Disable
92 # by either passing --disable-silent-rules to configure or passing V=1
94 AM_SILENT_RULES([yes])
107 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
109 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
110 AC_SUBST(GLIB_GENMARSHAL)
112 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
113 if test -z "$XSLTPROC"; then
114 AC_MSG_ERROR([xsltproc (from libxslt) is required])
116 AM_PATH_PYTHON([2.3])
121 # -----------------------------------------------------------
123 # -----------------------------------------------------------
124 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
125 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
127 AC_ARG_ENABLE(Werror,
128 AS_HELP_STRING([--disable-Werror],
129 [compile without -Werror (normally enabled in development builds)]),
130 werror=$enableval, :)
132 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
133 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
134 wno_missing_field_initializers=yes,
135 wno_missing_field_initializers=no)
136 AS_COMPILER_FLAG(-Wno-unused-parameter,
137 wno_unused_parameter=yes,
138 wno_unused_parameter=no)
140 ifelse(empathy_released, 1, [],
142 if test x$werror = xyes; then
143 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
145 if test x$wextra = xyes -a \
146 x$wno_missing_field_initializers = xyes -a \
147 x$wno_unused_parameter = xyes; then
148 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
152 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
153 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
154 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
155 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
156 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
158 AC_SUBST(ERROR_CFLAGS)
161 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
162 [build with support for gprof]),,
164 if test "x$enable_gprof" != "xno" ; then
166 LDFLAGS="$LDFLAGS -pg"
171 # -----------------------------------------------------------
172 # Pkg-Config dependency checks
173 # -----------------------------------------------------------
178 PKG_CHECK_MODULES(EMPATHY,
181 folks >= $FOLKS_REQUIRED
182 folks-telepathy >= $FOLKS_REQUIRED
183 glib-2.0 >= $GLIB_REQUIRED
184 gio-2.0 >= $GLIB_REQUIRED
185 gio-unix-2.0 >= $GLIB_REQUIRED
186 gnome-keyring-1 >= $KEYRING_REQUIRED
187 gnutls >= $GNUTLS_REQUIRED
190 gsettings-desktop-schemas
191 gstreamer-0.10 >= $GSTREAMER_REQUIRED
192 gstreamer-interfaces-0.10
194 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
195 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
197 gtk+-3.0 >= $GTK_REQUIRED
198 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
199 libnotify >= $LIBNOTIFY_REQUIRED
200 gcr-3 >= $GCR_REQUIRED
202 libpulse-mainloop-glib
203 webkitgtk-3.0 >= $WEBKIT_REQUIRED
207 PKG_CHECK_MODULES(EMPATHY_CALL,
210 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
211 clutter-1.0 >= $CLUTTER_REQUIRED
212 clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED
213 clutter-gst-1.0 >= $CLUTTER_GST_REQUIRED
216 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
217 [Name of provider for accounts imported from GOA])
219 # -----------------------------------------------------------
220 # evolution-data-server (about-me)
221 # -----------------------------------------------------------
223 AS_HELP_STRING([--with-eds],
224 [build with evolution-data-server support]),,
226 if test x"$with_eds" = x"yes" ; then
227 PKG_CHECK_MODULES(EDS, [libebook-1.2])
228 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
231 # -----------------------------------------------------------
233 # -----------------------------------------------------------
236 AS_HELP_STRING([--disable-debug],
237 [compile without debug code]),
238 enable_debug=$enableval, enable_debug=yes )
240 if test x$enable_debug = xyes; then
241 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
244 # -----------------------------------------------------------
246 # -----------------------------------------------------------
247 IT_PROG_INTLTOOL([0.50.0])
249 GETTEXT_PACKAGE=empathy
250 AC_SUBST(GETTEXT_PACKAGE)
251 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
253 # -----------------------------------------------------------
255 # -----------------------------------------------------------
257 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
258 [build with gudev support]), ,
261 if test "x$enable_gudev" != "xno"; then
263 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
264 have_gudev="yes", have_gudev="no")
266 if test "x$have_gudev" = "xyes"; then
267 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
273 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
274 AC_MSG_ERROR([Could not find gudev dependencies:
278 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
280 # -----------------------------------------------------------
281 # spellchecking checks: enchant and iso-codes
282 # -----------------------------------------------------------
284 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
285 [Enable spell checking]), ,
288 if test "x$enable_spell" != "xno"; then
289 PKG_CHECK_MODULES(ENCHANT,
291 enchant >= $ENCHANT_REQUIRED,
292 iso-codes >= $ISO_CODES_REQUIRED
293 ], have_enchant="yes", have_enchant="no")
295 if test "x$have_enchant" = "xyes"; then
296 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
297 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
298 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
299 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
300 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
306 AC_MSG_RESULT([$result])
312 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
313 AC_MSG_ERROR([Could not find spell-checking dependencies:
315 $ENCHANT_PKG_ERRORS])
318 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
320 # -----------------------------------------------------------
321 # Map view checks: libchamplain
322 # -----------------------------------------------------------
324 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
325 [Enable map view]), ,
328 if test "x$enable_map" != "xno"; then
330 PKG_CHECK_MODULES(LIBCHAMPLAIN,
334 champlain-0.12 >= $CHAMPLAIN_REQUIRED
335 ], have_libchamplain="yes", have_libchamplain="no")
337 if test "x$have_libchamplain" = "xyes"; then
338 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
344 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
345 AC_MSG_ERROR([Could not find map view dependencies:
347 $LIBCHAMPLAIN_PKG_ERRORS])
350 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
352 # -----------------------------------------------------------
353 # location checks: geoclue
354 # -----------------------------------------------------------
355 AC_ARG_ENABLE(location,
356 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
357 [Enable location awareness]), ,
358 enable_location=auto)
360 if test "x$enable_location" != "xno"; then
361 PKG_CHECK_MODULES(GEOCLUE,
363 geoclue >= $GEOCLUE_REQUIRED
364 ], have_geoclue="yes", have_geoclue="no")
366 if test "x$have_geoclue" = "xyes"; then
367 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
373 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
374 AC_MSG_ERROR([Could not find location dependencies:
376 $GEOCLUE_PKG_ERRORS])
379 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
380 AC_SUBST(GEOCLUE_CFLAGS)
381 AC_SUBST(GEOCLUE_LIBS)
383 # -----------------------------------------------------------
384 # location checks: geocode-glib
385 # -----------------------------------------------------------
386 AC_ARG_ENABLE(geocode,
387 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
388 [Enable geocode support]), ,
391 if test "x$enable_geocode" != "xno"; then
392 PKG_CHECK_MODULES(GEOCODE,
395 ], have_geocode="yes", have_geocode="no")
397 if test "x$have_geocode" = "xyes"; then
398 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
404 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
405 AC_MSG_ERROR([Could not find geocode dependencies:
407 $GEOCODE_PKG_ERRORS])
410 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
411 AC_SUBST(GEOCODE_CFLAGS)
412 AC_SUBST(GEOCODE_LIBS)
414 # -----------------------------------------------------------
416 # -----------------------------------------------------------
417 AC_ARG_ENABLE(nautilus-sendto,
418 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
419 [build nautilus-sendto plugin]), ,
420 enable_nautilus_sendto=auto)
422 if test "x$enable_nautilus_sendto" != "xno"; then
423 PKG_CHECK_MODULES(NST,
425 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
426 ], have_nst="yes", have_nst="no")
431 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
432 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
437 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
439 # -----------------------------------------------------------
441 # -----------------------------------------------------------
443 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
444 [build GOA MC plugin]), ,
447 if test "x$enable_goa" != "xno"; then
448 PKG_CHECK_MODULES(GOA,
450 mission-control-plugins
451 goa-1.0 >= $GOA_REQUIRED
452 ], have_goa="yes", have_goa="no")
454 AC_MSG_CHECKING([Mission Control plugins dir])
455 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
457 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
458 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
463 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
464 AC_MSG_ERROR([Could not find GOA dependencies.])
467 if test "x$have_goa" = "xyes"; then
468 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
471 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
473 # Optional dependency for avatar selection
474 AC_ARG_WITH([cheese],
475 AS_HELP_STRING([--with-cheese],
476 [enable cheese webcam support]),,
479 if test x"$with_cheese" != x"no" ; then
480 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
481 if test x${have_cheese} = xyes; then
482 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
484 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
485 AC_MSG_ERROR([Cheese configured but not found:
492 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
497 # -----------------------------------------------------------
498 # Coding style checks
499 # -----------------------------------------------------------
500 AC_ARG_ENABLE(coding-style-checks,
501 AS_HELP_STRING([--disable-coding-style-checks],
502 [do not check coding style using grep]),
503 [ENABLE_CODING_STYLE_CHECKS=$enableval],
504 [ENABLE_CODING_STYLE_CHECKS=yes])
506 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
507 # -----------------------------------------------------------
512 data/empathy.desktop.in
513 data/empathy-accounts.desktop.in
518 libempathy-gtk/Makefile
520 nautilus-sendto-plugin/Makefile
521 goa-mc-plugin/Makefile
524 tests/interactive/Makefile
526 tests/certificates/Makefile
534 Compiler....................: ${CC}
535 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
536 Linker Flags................: ${LDFLAGS}
537 Prefix......................: ${prefix}
538 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
541 Spell checking (enchant)....: ${have_enchant}
542 Display maps (libchamplain).: ${have_libchamplain}
543 Location awareness (Geoclue): ${have_geoclue}
544 Geocode support (Geocode)...: ${have_geocode}
545 Cheese webcam support ......: ${have_cheese}
546 Camera monitoring...........: ${have_gudev}
549 Nautilus-sendto plugin......: ${have_nst}
550 GOA MC plugin...............: ${have_goa}
551 Salut E-D-S support.........: ${with_eds}