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], [2])
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=1.1.2
53 CLUTTER_GST_REQUIRED=1.5.2
55 TELEPATHY_GLIB_REQUIRED=0.19.1
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
86 AC_CONFIG_MACRO_DIR([m4])
87 AC_CONFIG_HEADERS([config.h])
88 AC_CONFIG_SRCDIR([configure.ac])
91 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
93 # Support silent build rules. Disable
94 # by either passing --disable-silent-rules to configure or passing V=1
96 AM_SILENT_RULES([yes])
109 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
111 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
112 AC_SUBST(GLIB_GENMARSHAL)
114 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
115 if test -z "$XSLTPROC"; then
116 AC_MSG_ERROR([xsltproc (from libxslt) is required])
118 AM_PATH_PYTHON([2.3])
123 # -----------------------------------------------------------
125 # -----------------------------------------------------------
126 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
127 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
129 AC_ARG_ENABLE(Werror,
130 AS_HELP_STRING([--disable-Werror],
131 [compile without -Werror (normally enabled in development builds)]),
132 werror=$enableval, :)
134 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
135 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
136 wno_missing_field_initializers=yes,
137 wno_missing_field_initializers=no)
138 AS_COMPILER_FLAG(-Wno-unused-parameter,
139 wno_unused_parameter=yes,
140 wno_unused_parameter=no)
142 ifelse(empathy_released, 1, [],
144 if test x$werror = xyes; then
145 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
147 if test x$wextra = xyes -a \
148 x$wno_missing_field_initializers = xyes -a \
149 x$wno_unused_parameter = xyes; then
150 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
154 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
155 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
156 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
157 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
158 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
160 AC_SUBST(ERROR_CFLAGS)
163 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
164 [build with support for gprof]),,
166 if test "x$enable_gprof" != "xno" ; then
168 LDFLAGS="$LDFLAGS -pg"
173 # -----------------------------------------------------------
174 # Pkg-Config dependency checks
175 # -----------------------------------------------------------
180 PKG_CHECK_MODULES(EMPATHY,
183 folks >= $FOLKS_REQUIRED
184 folks-telepathy >= $FOLKS_REQUIRED
185 glib-2.0 >= $GLIB_REQUIRED
186 gio-2.0 >= $GLIB_REQUIRED
187 gio-unix-2.0 >= $GLIB_REQUIRED
188 gnome-keyring-1 >= $KEYRING_REQUIRED
189 gnutls >= $GNUTLS_REQUIRED
192 gsettings-desktop-schemas
193 gstreamer-0.10 >= $GSTREAMER_REQUIRED
194 gstreamer-interfaces-0.10
196 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
197 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
199 gtk+-3.0 >= $GTK_REQUIRED
200 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
201 libnotify >= $LIBNOTIFY_REQUIRED
202 gcr-3 >= $GCR_REQUIRED
204 libpulse-mainloop-glib
205 webkitgtk-3.0 >= $WEBKIT_REQUIRED
209 PKG_CHECK_MODULES(EMPATHY_CALL,
212 telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
213 clutter-1.0 >= $CLUTTER_REQUIRED
214 clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED
215 clutter-gst-1.0 >= $CLUTTER_GST_REQUIRED
218 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
219 [Name of provider for accounts imported from GOA])
221 # -----------------------------------------------------------
223 # -----------------------------------------------------------
226 AS_HELP_STRING([--disable-debug],
227 [compile without debug code]),
228 enable_debug=$enableval, enable_debug=yes )
230 if test x$enable_debug = xyes; then
231 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
234 # -----------------------------------------------------------
236 # -----------------------------------------------------------
237 IT_PROG_INTLTOOL([0.50.0])
239 GETTEXT_PACKAGE=empathy
240 AC_SUBST(GETTEXT_PACKAGE)
241 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
243 # -----------------------------------------------------------
245 # -----------------------------------------------------------
247 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
248 [build with gudev support]), ,
251 if test "x$enable_gudev" != "xno"; then
253 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
254 have_gudev="yes", have_gudev="no")
256 if test "x$have_gudev" = "xyes"; then
257 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
263 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
264 AC_MSG_ERROR([Could not find gudev dependencies:
268 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
270 # -----------------------------------------------------------
271 # spellchecking checks: enchant and iso-codes
272 # -----------------------------------------------------------
274 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
275 [Enable spell checking]), ,
278 if test "x$enable_spell" != "xno"; then
279 PKG_CHECK_MODULES(ENCHANT,
281 enchant >= $ENCHANT_REQUIRED,
282 iso-codes >= $ISO_CODES_REQUIRED
283 ], have_enchant="yes", have_enchant="no")
285 if test "x$have_enchant" = "xyes"; then
286 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
287 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
288 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
289 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
290 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
296 AC_MSG_RESULT([$result])
302 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
303 AC_MSG_ERROR([Could not find spell-checking dependencies:
305 $ENCHANT_PKG_ERRORS])
308 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
310 # -----------------------------------------------------------
311 # Map view checks: libchamplain
312 # -----------------------------------------------------------
314 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
315 [Enable map view]), ,
318 if test "x$enable_map" != "xno"; then
320 PKG_CHECK_MODULES(LIBCHAMPLAIN,
324 champlain-0.12 >= $CHAMPLAIN_REQUIRED
325 ], have_libchamplain="yes", have_libchamplain="no")
327 if test "x$have_libchamplain" = "xyes"; then
328 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
334 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
335 AC_MSG_ERROR([Could not find map view dependencies:
337 $LIBCHAMPLAIN_PKG_ERRORS])
340 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
342 # -----------------------------------------------------------
343 # location checks: geoclue
344 # -----------------------------------------------------------
345 AC_ARG_ENABLE(location,
346 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
347 [Enable location awareness]), ,
348 enable_location=auto)
350 if test "x$enable_location" != "xno"; then
351 PKG_CHECK_MODULES(GEOCLUE,
353 geoclue >= $GEOCLUE_REQUIRED
354 ], have_geoclue="yes", have_geoclue="no")
356 if test "x$have_geoclue" = "xyes"; then
357 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
363 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
364 AC_MSG_ERROR([Could not find location dependencies:
366 $GEOCLUE_PKG_ERRORS])
369 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
370 AC_SUBST(GEOCLUE_CFLAGS)
371 AC_SUBST(GEOCLUE_LIBS)
373 # -----------------------------------------------------------
374 # location checks: geocode-glib
375 # -----------------------------------------------------------
376 AC_ARG_ENABLE(geocode,
377 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
378 [Enable geocode support]), ,
381 if test "x$enable_geocode" != "xno"; then
382 PKG_CHECK_MODULES(GEOCODE,
385 ], have_geocode="yes", have_geocode="no")
387 if test "x$have_geocode" = "xyes"; then
388 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
394 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
395 AC_MSG_ERROR([Could not find geocode dependencies:
397 $GEOCODE_PKG_ERRORS])
400 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
401 AC_SUBST(GEOCODE_CFLAGS)
402 AC_SUBST(GEOCODE_LIBS)
404 # -----------------------------------------------------------
406 # -----------------------------------------------------------
407 AC_ARG_ENABLE(nautilus-sendto,
408 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
409 [build nautilus-sendto plugin]), ,
410 enable_nautilus_sendto=auto)
412 if test "x$enable_nautilus_sendto" != "xno"; then
413 PKG_CHECK_MODULES(NST,
415 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
416 ], have_nst="yes", have_nst="no")
421 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
422 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
427 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
429 # -----------------------------------------------------------
431 # -----------------------------------------------------------
433 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
434 [build GOA MC plugin]), ,
437 if test "x$enable_goa" != "xno"; then
438 PKG_CHECK_MODULES(GOA,
440 mission-control-plugins
441 goa-1.0 >= $GOA_REQUIRED
442 ], have_goa="yes", have_goa="no")
444 AC_MSG_CHECKING([Mission Control plugins dir])
445 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
447 AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
448 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
453 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
454 AC_MSG_ERROR([Could not find GOA dependencies.])
457 if test "x$have_goa" = "xyes"; then
458 AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
461 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
463 # Optional dependency for avatar selection
464 AC_ARG_WITH([cheese],
465 AS_HELP_STRING([--with-cheese],
466 [enable cheese webcam support]),,
469 if test x"$with_cheese" != x"no" ; then
470 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= CHEESE_GTK_REQUIRED, [have_cheese=yes], [have_cheese=no])
471 if test x${have_cheese} = xyes; then
472 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
474 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
475 AC_MSG_ERROR([Cheese configured but not found:
482 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
487 # -----------------------------------------------------------
488 # Coding style checks
489 # -----------------------------------------------------------
490 AC_ARG_ENABLE(coding-style-checks,
491 AS_HELP_STRING([--disable-coding-style-checks],
492 [do not check coding style using grep]),
493 [ENABLE_CODING_STYLE_CHECKS=$enableval],
494 [ENABLE_CODING_STYLE_CHECKS=yes])
496 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
497 # -----------------------------------------------------------
502 data/empathy.desktop.in
503 data/empathy-accounts.desktop.in
508 libempathy-gtk/Makefile
510 nautilus-sendto-plugin/Makefile
511 goa-mc-plugin/Makefile
514 tests/interactive/Makefile
516 tests/certificates/Makefile
524 Compiler....................: ${CC}
525 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
526 Linker Flags................: ${LDFLAGS}
527 Prefix......................: ${prefix}
528 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
531 Spell checking (enchant)....: ${have_enchant}
532 Display maps (libchamplain).: ${have_libchamplain}
533 Location awareness (Geoclue): ${have_geoclue}
534 Geocode support (Geocode)...: ${have_geocode}
535 Cheese webcam support ......: ${have_cheese}
536 Camera monitoring...........: ${have_gudev}
539 Nautilus-sendto plugin......: ${have_nst}
540 GOA MC plugin...............: ${have_goa}