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_REQUIRED=1.7.14
53 CLUTTER_GTK_REQUIRED=0.90.3
54 ENCHANT_REQUIRED=1.2.0
56 ISO_CODES_REQUIRED=0.35
57 NAUTILUS_SENDTO_REQUIRED=2.90.0
58 NETWORK_MANAGER_REQUIRED=0.7.0
60 # Use --enable-maintainer-mode to disable deprecated symbols,
61 # disable single include and enable GSEAL. If this is not a released empathy,
62 # maintainer mode is forced
63 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
64 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
65 #GNOME_MAINTAINER_MODE_DEFINES
68 prev_top_build_prefix=$ac_top_build_prefix
69 prev_ac_configure_args=$ac_configure_args
70 ac_configure_args="$ac_configure_args --disable-shared-library"
71 AX_CONFIG_DIR([telepathy-yell])
72 ac_top_build_prefix=$prev_top_build_prefix
73 ac_configure_args=$prev_ac_configure_args
74 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"telepathy-yell/telepathy-yell
76 AC_CONFIG_MACRO_DIR([m4])
77 AC_CONFIG_HEADERS([config.h])
78 AC_CONFIG_SRCDIR([configure.ac])
81 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
83 # Support silent build rules. Disable
84 # by either passing --disable-silent-rules to configure or passing V=1
86 AM_SILENT_RULES([yes])
99 GNOME_DOC_INIT([0.17.3])
100 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
102 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
103 AC_SUBST(GLIB_GENMARSHAL)
105 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
106 if test -z "$XSLTPROC"; then
107 AC_MSG_ERROR([xsltproc (from libxslt) is required])
109 AM_PATH_PYTHON([2.3])
114 # -----------------------------------------------------------
116 # -----------------------------------------------------------
117 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
118 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
120 AC_ARG_ENABLE(Werror,
121 AS_HELP_STRING([--disable-Werror],
122 [compile without -Werror (normally enabled in development builds)]),
123 werror=$enableval, :)
125 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
126 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
127 wno_missing_field_initializers=yes,
128 wno_missing_field_initializers=no)
129 AS_COMPILER_FLAG(-Wno-unused-parameter,
130 wno_unused_parameter=yes,
131 wno_unused_parameter=no)
133 ifelse(empathy_released, 1, [],
135 if test x$werror = xyes; then
136 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
138 if test x$wextra = xyes -a \
139 x$wno_missing_field_initializers = xyes -a \
140 x$wno_unused_parameter = xyes; then
141 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
145 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
146 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
147 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
148 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
149 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
151 AC_SUBST(ERROR_CFLAGS)
154 AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
155 [build with support for gprof]),,
157 if test "x$enable_gprof" != "xno" ; then
159 LDFLAGS="$LDFLAGS -pg"
164 # -----------------------------------------------------------
165 # Pkg-Config dependency checks
166 # -----------------------------------------------------------
171 PKG_CHECK_MODULES(EMPATHY,
174 folks >= $FOLKS_REQUIRED
175 folks-telepathy >= $FOLKS_REQUIRED
176 glib-2.0 >= $GLIB_REQUIRED
177 gio-2.0 >= $GLIB_REQUIRED
178 gio-unix-2.0 >= $GLIB_REQUIRED
179 gnome-keyring-1 >= $KEYRING_REQUIRED
180 gnutls >= $GNUTLS_REQUIRED
183 gsettings-desktop-schemas
184 gstreamer-0.10 >= $GSTREAMER_REQUIRED
185 gstreamer-interfaces-0.10
187 telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
188 telepathy-logger-0.2 >= $TELEPATHY_LOGGER
190 gtk+-3.0 >= $GTK_REQUIRED
191 libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
192 libnotify >= $LIBNOTIFY_REQUIRED
193 gcr-3 >= $GCR_REQUIRED
195 libpulse-mainloop-glib
196 webkitgtk-3.0 >= $WEBKIT_REQUIRED
199 PKG_CHECK_MODULES(YELL, [telepathy-yell])
201 PKG_CHECK_MODULES(EMPATHY_AV,
204 telepathy-farsight >= $TELEPATHY_FARSIGHT_REQUIRED
207 # -----------------------------------------------------------
209 # -----------------------------------------------------------
211 AS_HELP_STRING([--enable-call=@<:@no/yes/auto@:>@],
212 [build with Call interface support]),,
214 if test "x$enable_call" != "xno" ; then
215 PKG_CHECK_MODULES(EMPATHY_CALL,
219 clutter-1.0 >= $CLUTTER_REQUIRED
222 ], have_call="yes", have_call="no" )
224 if test "x$have_call" = "xyes"; then
225 AC_DEFINE(HAVE_CALL, 1, [Define if you have Call channel support])
231 if test "x$enable_call" = "xyes" -a "x$have_call" != "xyes"; then
232 AC_MSG_ERROR([Could not find Call handler dependencies:
234 $EMPATHY_CALL_PKG_ERRORS])
236 AM_CONDITIONAL(HAVE_CALL, test "x$have_call" = "xyes")
239 # -----------------------------------------------------------
240 # Call support in tp-logger
241 # -----------------------------------------------------------
242 AC_ARG_ENABLE(call-logs,
243 AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
244 [build with call logs support]),,
245 [enable_call_logs=auto])
246 if test "x$enable_call_logs" != "xno" ; then
248 SAVE_CPPFLAGS=$CPPFLAGS
249 SAVE_LDFLAGS=$LDFLAGS
250 CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
251 CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
252 LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
254 AC_CHECK_HEADER(telepathy-logger/call-event.h,
255 have_call_logs="yes", have_call_logs="no")
258 CPPFLAGS=$SAVE_CPPFLAGS
259 LDFLAGS=$SAVE_LDFLAGS
261 if test "x$have_call_logs" = "xyes"; then
262 AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
268 if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
269 AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
270 built with --enable-call])
273 # -----------------------------------------------------------
274 # evolution-data-server (about-me)
275 # -----------------------------------------------------------
277 AS_HELP_STRING([--with-eds],
278 [build with evolution-data-server support]),,
280 if test x"$with_eds" = x"yes" ; then
281 PKG_CHECK_MODULES(EDS, [libebook-1.2])
282 AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
285 # -----------------------------------------------------------
287 # -----------------------------------------------------------
290 AS_HELP_STRING([--disable-debug],
291 [compile without debug code]),
292 enable_debug=$enableval, enable_debug=yes )
294 if test x$enable_debug = xyes; then
295 AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
298 # -----------------------------------------------------------
300 # -----------------------------------------------------------
301 IT_PROG_INTLTOOL([0.40.0])
303 AM_GNU_GETTEXT_VERSION([0.17])
304 AM_GNU_GETTEXT([external])
306 GETTEXT_PACKAGE=empathy
307 AC_SUBST(GETTEXT_PACKAGE)
308 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
310 # -----------------------------------------------------------
311 # Connectivity integration
312 # -----------------------------------------------------------
313 AC_ARG_WITH(connectivity,
314 AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
315 [build with connectivity support]), ,
316 with_connectivity=auto)
318 if test "x$with_connectivity" = "xno"; then
322 elif test "x$with_connectivity" = "xconnman"; then
325 PKG_CHECK_MODULES(CONNMAN,
328 ], have_connman="yes", have_connman="no")
330 if test "x$have_connman" = "xyes"; then
331 AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
337 PKG_CHECK_MODULES(NETWORK_MANAGER,
339 libnm-glib >= $NETWORK_MANAGER_REQUIRED
340 ], have_nm="yes", have_nm="no")
342 if test "x$have_nm" = "xyes"; then
343 AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
347 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
348 AC_MSG_ERROR([Couldn't find connman dependencies:
350 $CONNMAN_PKG_ERRORS])
353 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
354 AC_MSG_ERROR([Couldn't find Network Manager dependencies:
356 $NETWORK_MANAGER_PKG_ERRORS])
359 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
360 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
362 # -----------------------------------------------------------
364 # -----------------------------------------------------------
366 AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
367 [build with gudev support]), ,
370 if test "x$enable_gudev" != "xno"; then
372 PKG_CHECK_MODULES(UDEV, [gudev-1.0],
373 have_gudev="yes", have_gudev="no")
375 if test "x$have_gudev" = "xyes"; then
376 AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
382 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
383 AC_MSG_ERROR([Could not find gudev dependencies:
387 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
389 # -----------------------------------------------------------
390 # spellchecking checks: enchant and iso-codes
391 # -----------------------------------------------------------
393 AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
394 [Enable spell checking]), ,
397 if test "x$enable_spell" != "xno"; then
398 PKG_CHECK_MODULES(ENCHANT,
400 enchant >= $ENCHANT_REQUIRED,
401 iso-codes >= $ISO_CODES_REQUIRED
402 ], have_enchant="yes", have_enchant="no")
404 if test "x$have_enchant" = "xyes"; then
405 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
406 if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
407 $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
408 AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
409 AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
415 AC_MSG_RESULT([$result])
421 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
422 AC_MSG_ERROR([Could not find spell-checking dependencies:
424 $ENCHANT_PKG_ERRORS])
427 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
429 # -----------------------------------------------------------
430 # Map view checks: libchamplain
431 # -----------------------------------------------------------
433 AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
434 [Enable map view]), ,
437 if test "x$enable_map" != "xno"; then
439 PKG_CHECK_MODULES(LIBCHAMPLAIN,
444 ], have_libchamplain="yes", have_libchamplain="no")
446 if test "x$have_libchamplain" = "xyes"; then
447 AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
453 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
454 AC_MSG_ERROR([Could not find map view dependencies:
456 $LIBCHAMPLAIN_PKG_ERRORS])
459 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
461 # -----------------------------------------------------------
462 # location checks: geoclue
463 # -----------------------------------------------------------
464 AC_ARG_ENABLE(location,
465 AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
466 [Enable location awareness]), ,
467 enable_location=auto)
469 if test "x$enable_location" != "xno"; then
470 PKG_CHECK_MODULES(GEOCLUE,
472 geoclue >= $GEOCLUE_REQUIRED
473 ], have_geoclue="yes", have_geoclue="no")
475 if test "x$have_geoclue" = "xyes"; then
476 AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
482 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
483 AC_MSG_ERROR([Could not find location dependencies:
485 $GEOCLUE_PKG_ERRORS])
488 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
489 AC_SUBST(GEOCLUE_CFLAGS)
490 AC_SUBST(GEOCLUE_LIBS)
492 # -----------------------------------------------------------
493 # location checks: geocode-glib
494 # -----------------------------------------------------------
495 AC_ARG_ENABLE(geocode,
496 AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
497 [Enable geocode support]), ,
500 if test "x$enable_geocode" != "xno"; then
501 PKG_CHECK_MODULES(GEOCODE,
504 ], have_geocode="yes", have_geocode="no")
506 if test "x$have_geocode" = "xyes"; then
507 AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
513 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
514 AC_MSG_ERROR([Could not find geocode dependencies:
516 $GEOCODE_PKG_ERRORS])
519 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
520 AC_SUBST(GEOCODE_CFLAGS)
521 AC_SUBST(GEOCODE_LIBS)
523 # -----------------------------------------------------------
524 # meego widgets support
525 # -----------------------------------------------------------
527 AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
528 [Enable meego widgets]), ,
531 if test "x$enable_meego" != "xno"; then
532 PKG_CHECK_MODULES(MEEGO,
536 ], have_meego="yes", have_meego="no")
538 if test "x$have_meego" = "xyes"; then
539 AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
545 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
546 AC_MSG_ERROR([Could not find meego dependencies:
551 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
552 AC_SUBST(MEEGO_CFLAGS)
555 # -----------------------------------------------------------
557 # -----------------------------------------------------------
558 AC_ARG_ENABLE(nautilus-sendto,
559 AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
560 [build nautilus-sendto plugin]), ,
561 enable_nautilus_sendto=auto)
563 if test "x$enable_nautilus_sendto" != "xno"; then
564 PKG_CHECK_MODULES(NST,
566 nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
567 ], have_nst="yes", have_nst="no")
572 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
573 AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
578 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
580 # -----------------------------------------------------------
582 # -----------------------------------------------------------
584 AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
585 [build GOA MC plugin]), ,
588 if test "x$enable_goa" != "xno"; then
589 PKG_CHECK_MODULES(GOA,
591 mission-control-plugins
593 ], have_goa="yes", have_goa="no")
595 AC_MSG_CHECKING([Mission Control plugins dir])
596 MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
598 AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
603 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
604 AC_MSG_ERROR([Could not find GOA dependencies.])
607 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
609 # Optional dependency for avatar selection
610 AC_ARG_WITH([cheese],
611 AS_HELP_STRING([--with-cheese],
612 [enable cheese webcam support]),,
615 if test x"$with_cheese" != x"no" ; then
616 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
617 if test x${have_cheese} = xyes; then
618 AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
620 if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
621 AC_MSG_ERROR([Cheese configured but not found:
628 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
631 # -----------------------------------------------------------
632 # Coding style checks
633 # -----------------------------------------------------------
634 AC_ARG_ENABLE(coding-style-checks,
635 AS_HELP_STRING([--disable-coding-style-checks],
636 [do not check coding style using grep]),
637 [ENABLE_CODING_STYLE_CHECKS=$enableval],
638 [ENABLE_CODING_STYLE_CHECKS=yes])
640 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
641 # -----------------------------------------------------------
646 data/empathy.desktop.in
647 data/empathy-accounts.desktop.in
652 libempathy-gtk/Makefile
654 nautilus-sendto-plugin/Makefile
655 goa-mc-plugin/Makefile
658 tests/interactive/Makefile
667 Compiler....................: ${CC}
668 Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
669 Linker Flags................: ${LDFLAGS}
670 Prefix......................: ${prefix}
671 Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
674 Spell checking (enchant)....: ${have_enchant}
675 Display maps (libchamplain).: ${have_libchamplain}
676 Location awareness (Geoclue): ${have_geoclue}
677 Geocode support (Geocode)...: ${have_geocode}
678 Meego widgets...............: ${have_meego}
679 Cheese webcam support ......: ${have_cheese}
680 Camera monitoring...........: ${have_gudev}
683 NetworkManager integration..: ${have_nm}
684 ConnMan integration.........: ${have_connman}
687 Nautilus-sendto plugin......: ${have_nst}
688 GOA MC plugin...............: ${have_goa}
689 Salut E-D-S support.........: ${with_eds}
690 Exp. Call channel handler...: ${have_call}
691 Exp. Call log support.......: ${have_call_logs}