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], [1])
6 m4_define([empathy_micro_version], [91])
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 GSTREAMER_REQUIRED=0.10.32
42 KEYRING_REQUIRED=2.26.0
44 LIBCANBERRA_GTK_REQUIRED=0.25
45 LIBNOTIFY_REQUIRED=0.7.0
46 TELEPATHY_FARSIGHT_REQUIRED=0.0.14
47 TELEPATHY_GLIB_REQUIRED=0.15.5
48 TELEPATHY_LOGGER=0.2.10
49 WEBKIT_REQUIRED=1.3.13
52 CLUTTER_GTK_REQUIRED=0.90.3
53 ENCHANT_REQUIRED=1.2.0
55 ISO_CODES_REQUIRED=0.35
56 LIBCHAMPLAIN_GTK_REQUIRED=0.7.1
57 LIBCHAMPLAIN_REQUIRED=0.9
58 NAUTILUS_SENDTO_REQUIRED=2.90.0
59 NETWORK_MANAGER_REQUIRED=0.7.0
61 # Use --enable-maintainer-mode to disable deprecated symbols,
62 # disable single include and enable GSEAL. If this is not a released empathy,
63 # maintainer mode is forced
64 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
65 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
66 #GNOME_MAINTAINER_MODE_DEFINES
69 prev_top_build_prefix=$ac_top_build_prefix
70 prev_ac_configure_args=$ac_configure_args
71 ac_configure_args="$ac_configure_args --disable-shared-library"
72 AX_CONFIG_DIR([telepathy-yell])
73 ac_top_build_prefix=$prev_top_build_prefix
74 ac_configure_args=$prev_ac_configure_args
75 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"telepathy-yell/telepathy-yell
77 AC_CONFIG_MACRO_DIR([m4])
78 AC_CONFIG_HEADERS([config.h])
79 AC_CONFIG_SRCDIR([configure.ac])
82 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
84 # Support silent build rules. Disable
85 # by either passing --disable-silent-rules to configure or passing V=1
87 AM_SILENT_RULES([yes])
100 GNOME_DOC_INIT([0.17.3])
101 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
103 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
104 AC_SUBST(GLIB_GENMARSHAL)
106 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
107 if test -z "$XSLTPROC"; then
108 AC_MSG_ERROR([xsltproc (from libxslt) is required])
110 AM_PATH_PYTHON([2.3])
115 # -----------------------------------------------------------
117 # -----------------------------------------------------------
118 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
119 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
121 AC_ARG_ENABLE(Werror,
122 AS_HELP_STRING([--disable-Werror],
123 [compile without -Werror (normally enabled in development builds)]),
124 werror=$enableval, :)
126 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
127 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
128 wno_missing_field_initializers=yes,
129 wno_missing_field_initializers=no)
130 AS_COMPILER_FLAG(-Wno-unused-parameter,
131 wno_unused_parameter=yes,
132 wno_unused_parameter=no)
134 ifelse(empathy_released, 1, [],
136 if test x$werror = xyes; then
137 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
139 if test x$wextra = xyes -a \
140 x$wno_missing_field_initializers = xyes -a \
141 x$wno_unused_parameter = xyes; then
142 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
146 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
147 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
148 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
149 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
150 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
152 AC_SUBST(ERROR_CFLAGS)
155 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
156 [build with support for gprof]),,
158 if test "x$enable_gprof" != "xno" ; then
160 LDFLAGS="$LDFLAGS -pg"
165 # -----------------------------------------------------------
166 # Pkg-Config dependency checks
167 # -----------------------------------------------------------
172 PKG_CHECK_MODULES(EMPATHY,
175 folks >= $FOLKS_REQUIRED
176 folks-telepathy >= $FOLKS_REQUIRED
177 glib-2.0 >= $GLIB_REQUIRED
178 gio-2.0 >= $GLIB_REQUIRED
179 gio-unix-2.0 >= $GLIB_REQUIRED
180 gnome-keyring-1 >= $KEYRING_REQUIRED
181 gnutls >= $GNUTLS_REQUIRED
184 gsettings-desktop-schemas
185 gstreamer-0.10 >= $GSTREAMER_REQUIRED
186 gstreamer-interfaces-0.10
188 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
189 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
191 gtk+-3.0 >= $GTK_REQUIRED
192 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
193 libnotify >= $LIBNOTIFY_REQUIRED
194 gcr-3 >= $GCR_REQUIRED
196 libpulse-mainloop-glib
197 webkitgtk-3.0 >= $WEBKIT_REQUIRED
200 PKG_CHECK_MODULES(YELL, [telepathy-yell])
202 PKG_CHECK_MODULES(EMPATHY_AV,
205 telepathy-farsight >= $TELEPATHY_FARSIGHT_REQUIRED
208 # -----------------------------------------------------------
210 # -----------------------------------------------------------
212 AS_HELP_STRING([--enable-call=@<:@no/yes/auto@:>@],
213 [build with Call interface support]),,
215 if test "x$enable_call" != "xno" ; then
216 PKG_CHECK_MODULES(EMPATHY_CALL,
223 ], have_call="yes", have_call="no" )
225 if test "x$have_call" = "xyes"; then
226 AC_DEFINE(HAVE_CALL, 1, [Define if you have Call channel support])
232 if test "x$enable_call" = "xyes" -a "x$have_call" != "xyes"; then
233 AC_MSG_ERROR([Could not find Call handler dependencies:
235 $EMPATHY_CALL_PKG_ERRORS])
237 AM_CONDITIONAL(HAVE_CALL, test "x$have_call" = "xyes")
240 # -----------------------------------------------------------
241 # Call support in tp-logger
242 # -----------------------------------------------------------
243 AC_ARG_ENABLE(call-logs,
244 AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
245 [build with call logs support]),,
246 [enable_call_logs=auto])
247 if test "x$enable_call_logs" != "xno" ; then
249 SAVE_CPPFLAGS=$CPPFLAGS
250 SAVE_LDFLAGS=$LDFLAGS
251 CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
252 CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
253 LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
255 AC_CHECK_HEADER(telepathy-logger/call-event.h,
256 have_call_logs="yes", have_call_logs="no")
259 CPPFLAGS=$SAVE_CPPFLAGS
260 LDFLAGS=$SAVE_LDFLAGS
262 if test "x$have_call_logs" = "xyes"; then
263 AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
269 if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
270 AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
271 built with --enable-call])
274 # -----------------------------------------------------------
275 # evolution-data-server (about-me)
276 # -----------------------------------------------------------
278 AS_HELP_STRING([--with-eds],
279 [build with evolution-data-server support]),,
281 if test x"$with_eds" = x"yes" ; then
282 PKG_CHECK_MODULES(EDS, [libebook-1.2])
283 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
286 # -----------------------------------------------------------
288 # -----------------------------------------------------------
291 AS_HELP_STRING([--disable-debug],
292 [compile without debug code]),
293 enable_debug=$enableval, enable_debug=yes )
295 if test x$enable_debug = xyes; then
296 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
299 # -----------------------------------------------------------
301 # -----------------------------------------------------------
302 IT_PROG_INTLTOOL([0.40.0])
304 AM_GNU_GETTEXT_VERSION([0.17])
305 AM_GNU_GETTEXT([external])
307 GETTEXT_PACKAGE=empathy
308 AC_SUBST(GETTEXT_PACKAGE)
309 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
311 # -----------------------------------------------------------
312 # Connectivity integration
313 # -----------------------------------------------------------
314 AC_ARG_WITH(connectivity,
315 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
316 [build with connectivity support]), ,
317 with_connectivity=auto)
319 if test "x$with_connectivity" = "xno"; then
323 elif test "x$with_connectivity" = "xconnman"; then
326 PKG_CHECK_MODULES(CONNMAN,
329 ], have_connman="yes", have_connman="no")
331 if test "x$have_connman" = "xyes"; then
332 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
338 PKG_CHECK_MODULES(NETWORK_MANAGER,
340 libnm-glib >= $NETWORK_MANAGER_REQUIRED
341 ], have_nm="yes", have_nm="no")
343 if test "x$have_nm" = "xyes"; then
344 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
348 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
349 AC_MSG_ERROR([Couldn't find connman dependencies:
351 $CONNMAN_PKG_ERRORS])
354 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
355 AC_MSG_ERROR([Couldn't find Network Manager dependencies:
357 $NETWORK_MANAGER_PKG_ERRORS])
360 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
361 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
363 # -----------------------------------------------------------
365 # -----------------------------------------------------------
367 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
368 [build with gudev support]), ,
371 if test "x$enable_gudev" != "xno"; then
373 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
374 have_gudev="yes", have_gudev="no")
376 if test "x$have_gudev" = "xyes"; then
377 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
383 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
384 AC_MSG_ERROR([Could not find gudev dependencies:
388 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
390 # -----------------------------------------------------------
391 # spellchecking checks: enchant and iso-codes
392 # -----------------------------------------------------------
394 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
395 [Enable spell checking]), ,
398 if test "x$enable_spell" != "xno"; then
399 PKG_CHECK_MODULES(ENCHANT,
401 enchant >= $ENCHANT_REQUIRED,
402 iso-codes >= $ISO_CODES_REQUIRED
403 ], have_enchant="yes", have_enchant="no")
405 if test "x$have_enchant" = "xyes"; then
406 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
407 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
408 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
409 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
410 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
416 AC_MSG_RESULT([$result])
422 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
423 AC_MSG_ERROR([Could not find spell-checking dependencies:
425 $ENCHANT_PKG_ERRORS])
428 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
430 # -----------------------------------------------------------
431 # Map view checks: libchamplain
432 # -----------------------------------------------------------
434 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
435 [Enable map view]), ,
438 if test "x$enable_map" != "xno"; then
440 PKG_CHECK_MODULES(LIBCHAMPLAIN,
445 ], have_libchamplain="yes", have_libchamplain="no")
447 if test "x$have_libchamplain" = "xyes"; then
448 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
454 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
455 AC_MSG_ERROR([Could not find map view dependencies:
457 $LIBCHAMPLAIN_PKG_ERRORS])
460 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
462 # -----------------------------------------------------------
463 # location checks: geoclue
464 # -----------------------------------------------------------
465 AC_ARG_ENABLE(location,
466 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
467 [Enable location awareness]), ,
468 enable_location=auto)
470 if test "x$enable_location" != "xno"; then
471 PKG_CHECK_MODULES(GEOCLUE,
473 geoclue >= $GEOCLUE_REQUIRED
474 ], have_geoclue="yes", have_geoclue="no")
476 if test "x$have_geoclue" = "xyes"; then
477 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
483 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
484 AC_MSG_ERROR([Could not find location dependencies:
486 $GEOCLUE_PKG_ERRORS])
489 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
490 AC_SUBST(GEOCLUE_CFLAGS)
491 AC_SUBST(GEOCLUE_LIBS)
493 # -----------------------------------------------------------
494 # location checks: geocode-glib
495 # -----------------------------------------------------------
496 AC_ARG_ENABLE(geocode,
497 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
498 [Enable geocode support]), ,
501 if test "x$enable_geocode" != "xno"; then
502 PKG_CHECK_MODULES(GEOCODE,
505 ], have_geocode="yes", have_geocode="no")
507 if test "x$have_geocode" = "xyes"; then
508 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
514 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
515 AC_MSG_ERROR([Could not find geocode dependencies:
517 $GEOCODE_PKG_ERRORS])
520 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
521 AC_SUBST(GEOCODE_CFLAGS)
522 AC_SUBST(GEOCODE_LIBS)
524 # -----------------------------------------------------------
525 # meego widgets support
526 # -----------------------------------------------------------
528 AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
529 [Enable meego widgets]), ,
532 if test "x$enable_meego" != "xno"; then
533 PKG_CHECK_MODULES(MEEGO,
537 ], have_meego="yes", have_meego="no")
539 if test "x$have_meego" = "xyes"; then
540 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
546 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
547 AC_MSG_ERROR([Could not find meego dependencies:
552 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
553 AC_SUBST(MEEGO_CFLAGS)
556 # -----------------------------------------------------------
558 # -----------------------------------------------------------
559 AC_ARG_ENABLE(nautilus-sendto,
560 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
561 [build nautilus-sendto plugin]), ,
562 enable_nautilus_sendto=auto)
564 if test "x$enable_nautilus_sendto" != "xno"; then
565 PKG_CHECK_MODULES(NST,
567 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
568 ], have_nst="yes", have_nst="no")
573 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
574 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
579 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
581 # -----------------------------------------------------------
583 # -----------------------------------------------------------
585 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
586 [build GOA MC plugin]), ,
589 if test "x$enable_goa" != "xno"; then
590 PKG_CHECK_MODULES(GOA,
592 mission-control-plugins
594 ], have_goa="yes", have_goa="no")
596 AC_MSG_CHECKING([Mission Control plugins dir])
597 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
599 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
604 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
605 AC_MSG_ERROR([Could not find GOA dependencies.])
608 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
610 # Optional dependency for avatar selection
611 AC_ARG_WITH([cheese],
612 AS_HELP_STRING([--with-cheese],
613 [enable cheese webcam support]),,
616 if test x"$with_cheese" != x"no" ; then
617 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
618 if test x${have_cheese} = xyes; then
619 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
621 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
622 AC_MSG_ERROR([Cheese configured but not found:
629 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
632 # -----------------------------------------------------------
633 # Coding style checks
634 # -----------------------------------------------------------
635 AC_ARG_ENABLE(coding-style-checks,
636 AS_HELP_STRING([--disable-coding-style-checks],
637 [do not check coding style using grep]),
638 [ENABLE_CODING_STYLE_CHECKS=$enableval],
639 [ENABLE_CODING_STYLE_CHECKS=yes])
641 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
642 # -----------------------------------------------------------
647 data/empathy.desktop.in
648 data/empathy-accounts.desktop.in
653 libempathy-gtk/Makefile
655 nautilus-sendto-plugin/Makefile
656 goa-mc-plugin/Makefile
659 tests/interactive/Makefile
668 Compiler....................: ${CC}
669 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
670 Linker Flags................: ${LDFLAGS}
671 Prefix......................: ${prefix}
672 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
675 Spell checking (enchant)....: ${have_enchant}
676 Display maps (libchamplain).: ${have_libchamplain}
677 Location awareness (Geoclue): ${have_geoclue}
678 Geocode support (Geocode)...: ${have_geocode}
679 Meego widgets...............: ${have_meego}
680 Cheese webcam support ......: ${have_cheese}
681 Camera monitoring...........: ${have_gudev}
684 NetworkManager integration..: ${have_nm}
685 ConnMan integration.........: ${have_connman}
688 Nautilus-sendto plugin......: ${have_nst}
689 GOA MC plugin...............: ${have_goa}
690 Salut E-D-S support.........: ${with_eds}
691 Exp. Call channel handler...: ${have_call}
692 Exp. Call log support.......: ${have_call_logs}