]> git.0d.be Git - empathy.git/blob - configure.ac
[l10n]Updated Catalan (Valencian) translation
[empathy.git] / configure.ac
1 dnl If not 1, append datestamp to the version number
2 m4_define(empathy_released, 0)
3
4 m4_define([empathy_major_version], [3])
5 m4_define([empathy_minor_version], [3])
6 m4_define([empathy_micro_version], [91])
7 m4_define([empathy_nano_version], [0])
8
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])])
15
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]))
18
19 m4_define(empathy_version, empathy_full_version[]empathy_maybe_datestamp)
20
21
22 AC_INIT([Empathy],
23         [empathy_version],
24         [http://bugzilla.gnome.org/browse.cgi?product=empathy],
25         [empathy],
26         [https://live.gnome.org/Empathy])
27
28 AC_PREREQ([2.64])
29 AC_COPYRIGHT([
30   Copyright (C) 2003-2007 Imendio AB
31   Copyright (C) 2007-2010 Collabora Ltd.
32 ])
33
34 # Minimal version required
35
36 # Hardp deps
37 FOLKS_REQUIRED=0.6.6
38 GNUTLS_REQUIRED=2.8.5
39
40 GLIB_REQUIRED=2.30.0
41 AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_30, [Ignore post 2.30 deprecations])
42 AC_DEFINE(GLIB_VERSION_MAX_REQUIRED, GLIB_VERSION_2_30, [Prevent post 2.30 APIs])
43
44 GTK_REQUIRED=3.3.6
45 AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_4, [Ignore post 3.4 deprecations])
46 AC_DEFINE(GDK_VERSION_MAX_REQUIRED, GDK_VERSION_3_4, [Prevent post 3.4 APIs])
47
48 CLUTTER_REQUIRED=1.8.0
49 AC_DEFINE(CLUTTER_VERSION_MIN_REQUIRED, CLUTTER_VERSION_1_8, [Ignore post 1.8 deprecations])
50 AC_DEFINE(CLUTTER_VERSION_MAX, CLUTTER_VERSION_1_8, [Prevent post 1.8 APIs])
51
52 CLUTTER_GTK_REQUIRED=0.90.3
53
54 GSTREAMER_REQUIRED=0.10.32
55 KEYRING_REQUIRED=2.26.0
56 GCR_REQUIRED=2.91.4
57 LIBCANBERRA_GTK_REQUIRED=0.25
58 LIBNOTIFY_REQUIRED=0.7.0
59 TELEPATHY_FARSTREAM_REQUIRED=0.2.1
60 TELEPATHY_GLIB_REQUIRED=0.17.5
61 TELEPATHY_LOGGER=0.2.10
62 WEBKIT_REQUIRED=1.3.13
63 GOA_REQUIRED=3.3.0
64
65 # Optional deps
66 ENCHANT_REQUIRED=1.2.0
67 GEOCLUE_REQUIRED=0.12
68 ISO_CODES_REQUIRED=0.35
69 NAUTILUS_SENDTO_REQUIRED=2.90.0
70 NETWORK_MANAGER_REQUIRED=0.7.0
71 CHAMPLAIN_REQUIRED=0.12.1
72
73 # Use --enable-maintainer-mode to disable deprecated symbols,
74 # disable single include and enable GSEAL. If this is not a released empathy,
75 # maintainer mode is forced
76 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
77 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
78 #GNOME_MAINTAINER_MODE_DEFINES
79
80 AC_CONFIG_MACRO_DIR([m4])
81 AC_CONFIG_HEADERS([config.h])
82 AC_CONFIG_SRCDIR([configure.ac])
83 AC_CONFIG_AUX_DIR(.)
84
85 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
86
87 # Support silent build rules. Disable
88 # by either passing --disable-silent-rules to configure or passing V=1
89 # to make
90 AM_SILENT_RULES([yes])
91
92 # Check for programs
93 AC_PROG_CC
94 AC_HEADER_STDC
95 AM_PROG_MKDIR_P
96 AM_PATH_GLIB_2_0
97 AC_PATH_XTRA
98
99 # Initialize libtool
100 LT_PREREQ([2.2])
101 LT_INIT
102
103 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
104 GLIB_GSETTINGS
105 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
106 AC_SUBST(GLIB_GENMARSHAL)
107
108 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
109 if test -z "$XSLTPROC"; then
110   AC_MSG_ERROR([xsltproc (from libxslt) is required])
111 fi
112 AM_PATH_PYTHON([2.3])
113
114 EMPATHY_ARG_VALGRIND
115
116
117 # -----------------------------------------------------------
118 # Error flags
119 # -----------------------------------------------------------
120 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
121 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
122
123 AC_ARG_ENABLE(Werror,
124   AS_HELP_STRING([--disable-Werror],
125                  [compile without -Werror (normally enabled in development builds)]),
126     werror=$enableval, :)
127
128 AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
129 AS_COMPILER_FLAG(-Wno-missing-field-initializers,
130         wno_missing_field_initializers=yes,
131         wno_missing_field_initializers=no)
132 AS_COMPILER_FLAG(-Wno-unused-parameter,
133         wno_unused_parameter=yes,
134         wno_unused_parameter=no)
135
136 ifelse(empathy_released, 1, [],
137     [
138         if test x$werror = xyes; then
139             ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
140         fi
141         if test x$wextra = xyes -a \
142             x$wno_missing_field_initializers = xyes -a \
143             x$wno_unused_parameter = xyes; then
144             ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter"
145         fi
146     ])
147
148 AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
149 AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
150 AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
151 AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
152 AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
153
154 AC_SUBST(ERROR_CFLAGS)
155
156 AC_ARG_ENABLE(gprof,
157             AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
158             [build with support for gprof]),,
159             [enable_gprof=no])
160 if test "x$enable_gprof" != "xno" ; then
161     CFLAGS="$CFLAGS -pg"
162     LDFLAGS="$LDFLAGS -pg"
163 fi
164
165 AC_SUBST(LDFLAGS)
166
167 # -----------------------------------------------------------
168 # Pkg-Config dependency checks
169 # -----------------------------------------------------------
170
171 AC_CHECK_LIBM
172 AC_SUBST(LIBM)
173
174 PKG_CHECK_MODULES(EMPATHY,
175 [
176    dbus-glib-1
177    folks >= $FOLKS_REQUIRED
178    folks-telepathy >= $FOLKS_REQUIRED
179    glib-2.0 >= $GLIB_REQUIRED
180    gio-2.0 >= $GLIB_REQUIRED
181    gio-unix-2.0 >= $GLIB_REQUIRED
182    gnome-keyring-1 >= $KEYRING_REQUIRED
183    gnutls >= $GNUTLS_REQUIRED
184    gmodule-export-2.0
185    gobject-2.0
186    gsettings-desktop-schemas
187    gstreamer-0.10 >= $GSTREAMER_REQUIRED
188    gstreamer-interfaces-0.10
189    libxml-2.0
190    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
191    telepathy-logger-0.2 >= $TELEPATHY_LOGGER
192    x11
193    gtk+-3.0 >= $GTK_REQUIRED
194    libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
195    libnotify >= $LIBNOTIFY_REQUIRED
196    gcr-3 >= $GCR_REQUIRED
197    libpulse
198    libpulse-mainloop-glib
199    webkitgtk-3.0 >= $WEBKIT_REQUIRED
200    libsoup-2.4
201 ])
202
203 PKG_CHECK_MODULES(EMPATHY_CALL,
204 [
205    farstream-0.1
206    telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
207    clutter-1.0 >= $CLUTTER_REQUIRED
208    clutter-gtk-1.0
209    clutter-gst-1.0
210 ])
211
212 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
213    [Name of provider for accounts imported from GOA])
214
215 # -----------------------------------------------------------
216 # Build empathy-av?
217 # -----------------------------------------------------------
218 AC_ARG_ENABLE(empathy-av,
219             AS_HELP_STRING([--enable-empathy-av=@<:@no/yes@:>@],
220             [build empathy-av (legacy call UI)]),,
221             [enable_empathy_av=no])
222 if test "x$enable_empathy_av" != "xno" ; then
223    PKG_CHECK_MODULES(EMPATHY_AV,
224    [
225       farstream-0.1
226       telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
227    ])
228    AC_DEFINE(HAVE_EMPATHY_AV, 1, [Define if you have StreamedMedia channel support])
229    have_empathy_av=yes
230 fi
231 AM_CONDITIONAL(HAVE_EMPATHY_AV, test "x$have_empathy_av" = "xyes")
232
233 # -----------------------------------------------------------
234 # Call support in tp-logger
235 # -----------------------------------------------------------
236 AC_ARG_ENABLE(call-logs,
237             AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
238             [build with call logs support]),,
239             [enable_call_logs=auto])
240 if test "x$enable_call_logs" != "xno" ; then
241    SAVE_CFLAGS=$CFLAGS
242    SAVE_CPPFLAGS=$CPPFLAGS
243    SAVE_LDFLAGS=$LDFLAGS
244    CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
245    CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
246    LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
247
248    AC_CHECK_HEADER(telepathy-logger/call-event.h,
249       have_call_logs="yes", have_call_logs="no")
250
251    CFLAGS=$SAVE_CFLAGS
252    CPPFLAGS=$SAVE_CPPFLAGS
253    LDFLAGS=$SAVE_LDFLAGS
254
255    if test "x$have_call_logs" = "xyes"; then
256       AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
257    fi
258 else
259   have_call_logs=no
260 fi
261
262 if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
263    AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
264                  built with --enable-call])
265 fi
266
267 # -----------------------------------------------------------
268 # evolution-data-server (about-me)
269 # -----------------------------------------------------------
270 AC_ARG_WITH(eds,
271             AS_HELP_STRING([--with-eds],
272                            [build with evolution-data-server support]),,
273             [with_eds=yes])
274 if test x"$with_eds" = x"yes" ; then
275    PKG_CHECK_MODULES(EDS, [libebook-1.2])
276    AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
277 fi
278
279 # -----------------------------------------------------------
280 # Enable debug
281 # -----------------------------------------------------------
282
283 AC_ARG_ENABLE(debug,
284   AS_HELP_STRING([--disable-debug],
285                  [compile without debug code]),
286     enable_debug=$enableval, enable_debug=yes )
287
288 if test x$enable_debug = xyes; then
289   AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
290 fi
291
292 # -----------------------------------------------------------
293 # Language Support
294 # -----------------------------------------------------------
295 IT_PROG_INTLTOOL([0.40.0])
296
297 GETTEXT_PACKAGE=empathy
298 AC_SUBST(GETTEXT_PACKAGE)
299 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
300
301 # -----------------------------------------------------------
302 # Connectivity integration
303 # -----------------------------------------------------------
304 AC_ARG_WITH(connectivity,
305               AS_HELP_STRING([--with-connectivity=@<:@nm/connman/auto/no@:>@],
306                              [build with connectivity support]), ,
307                              with_connectivity=auto)
308
309 if test "x$with_connectivity" = "xno"; then
310    have_nm=no
311    have_connman=no
312
313 elif test "x$with_connectivity" = "xconnman"; then
314    have_nm=no
315
316    PKG_CHECK_MODULES(CONNMAN,
317    [
318       dbus-glib-1
319    ], have_connman="yes", have_connman="no")
320
321    if test "x$have_connman" = "xyes"; then
322       AC_DEFINE(HAVE_CONNMAN, 1, [Define if you have connman dependencies])
323    fi
324
325 else
326    have_connman=no
327
328    PKG_CHECK_MODULES(NETWORK_MANAGER,
329    [
330       libnm-glib >= $NETWORK_MANAGER_REQUIRED
331    ], have_nm="yes", have_nm="no")
332
333    if test "x$have_nm" = "xyes"; then
334       AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
335    fi
336 fi
337
338 if test "x$with_connectivity" = "xconnman" -a "x$have_connman" != "xyes"; then
339    AC_MSG_ERROR([Couldn't find connman dependencies:
340
341 $CONNMAN_PKG_ERRORS])
342 fi
343
344 if test "x$with_connectivity" = "xnm" -a "x$have_nm" != "xyes"; then
345    AC_MSG_ERROR([Couldn't find Network Manager dependencies:
346
347 $NETWORK_MANAGER_PKG_ERRORS])
348 fi
349
350 AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
351 AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
352
353 # -----------------------------------------------------------
354 # gudev
355 # -----------------------------------------------------------
356 AC_ARG_ENABLE(gudev,
357               AS_HELP_STRING([--enable-gudev=@<:@no/yes/auto@:>@],
358                              [build with gudev support]), ,
359                              enable_gudev=auto)
360
361 if test "x$enable_gudev" != "xno"; then
362
363    PKG_CHECK_MODULES(UDEV, [gudev-1.0],
364         have_gudev="yes", have_gudev="no")
365
366    if test "x$have_gudev" = "xyes"; then
367       AC_DEFINE(HAVE_UDEV, 1, [Define if you have gudev])
368    fi
369 else
370    have_gudev=no
371 fi
372
373 if test "x$enable_gudev" = "xyes" -a "x$have_gudev" != "xyes"; then
374    AC_MSG_ERROR([Could not find gudev dependencies:
375
376 $UDEV_PKG_ERRORS])
377 fi
378 AM_CONDITIONAL(HAVE_UDEV, test "x$have_gudev" = "xyes")
379
380 # -----------------------------------------------------------
381 # spellchecking checks: enchant and iso-codes
382 # -----------------------------------------------------------
383 AC_ARG_ENABLE(spell,
384               AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
385                              [Enable spell checking]), ,
386                              enable_spell=auto)
387
388 if test "x$enable_spell" != "xno"; then
389    PKG_CHECK_MODULES(ENCHANT,
390    [
391       enchant >= $ENCHANT_REQUIRED,
392       iso-codes >= $ISO_CODES_REQUIRED
393    ], have_enchant="yes", have_enchant="no")
394
395    if test "x$have_enchant" = "xyes"; then
396       AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
397       if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
398          $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
399             AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
400             AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
401             result=yes
402       else
403             result=no
404             have_enchant="no"
405       fi
406       AC_MSG_RESULT([$result])
407    fi
408 else
409    have_enchant=no
410 fi
411
412 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
413    AC_MSG_ERROR([Could not find spell-checking dependencies:
414
415 $ENCHANT_PKG_ERRORS])
416 fi
417
418 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
419
420 # -----------------------------------------------------------
421 # Map view checks: libchamplain
422 # -----------------------------------------------------------
423 AC_ARG_ENABLE(map,
424               AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
425                              [Enable map view]), ,
426                              enable_map=auto)
427
428 if test "x$enable_map" != "xno"; then
429
430    PKG_CHECK_MODULES(LIBCHAMPLAIN,
431     [
432        clutter-gtk-1.0
433        champlain-gtk-0.12
434        champlain-0.12 >= $CHAMPLAIN_REQUIRED
435     ], have_libchamplain="yes", have_libchamplain="no")
436
437    if test "x$have_libchamplain" = "xyes"; then
438       AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
439    fi
440 else
441    have_libchamplain=no
442 fi
443
444 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
445    AC_MSG_ERROR([Could not find map view dependencies:
446
447 $LIBCHAMPLAIN_PKG_ERRORS])
448 fi
449
450 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
451
452 # -----------------------------------------------------------
453 # location checks: geoclue
454 # -----------------------------------------------------------
455 AC_ARG_ENABLE(location,
456               AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
457                              [Enable location awareness]), ,
458                              enable_location=auto)
459
460 if test "x$enable_location" != "xno"; then
461    PKG_CHECK_MODULES(GEOCLUE,
462    [
463       geoclue >= $GEOCLUE_REQUIRED
464    ], have_geoclue="yes", have_geoclue="no")
465
466    if test "x$have_geoclue" = "xyes"; then
467       AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
468    fi
469 else
470    have_geoclue="no"
471 fi
472
473 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
474    AC_MSG_ERROR([Could not find location dependencies:
475
476 $GEOCLUE_PKG_ERRORS])
477 fi
478
479 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
480 AC_SUBST(GEOCLUE_CFLAGS)
481 AC_SUBST(GEOCLUE_LIBS)
482
483 # -----------------------------------------------------------
484 # location checks: geocode-glib
485 # -----------------------------------------------------------
486 AC_ARG_ENABLE(geocode,
487               AS_HELP_STRING([--enable-geocode=@<:@no/yes/auto@:>@],
488                              [Enable geocode support]), ,
489                              enable_geocode=auto)
490
491 if test "x$enable_geocode" != "xno"; then
492    PKG_CHECK_MODULES(GEOCODE,
493    [
494       geocode-glib
495    ], have_geocode="yes", have_geocode="no")
496
497    if test "x$have_geocode" = "xyes"; then
498       AC_DEFINE(HAVE_GEOCODE, 1, [Define if you have geocode])
499    fi
500 else
501    have_geocode="no"
502 fi
503
504 if test "x$enable_geocode" = "xyes" -a "x$have_geocode" != "xyes"; then
505    AC_MSG_ERROR([Could not find geocode dependencies:
506
507 $GEOCODE_PKG_ERRORS])
508 fi
509
510 AM_CONDITIONAL(HAVE_GEOCODE, test "x$have_geocode" = "xyes")
511 AC_SUBST(GEOCODE_CFLAGS)
512 AC_SUBST(GEOCODE_LIBS)
513
514 # -----------------------------------------------------------
515 # meego widgets support
516 # -----------------------------------------------------------
517 AC_ARG_ENABLE(meego,
518               AS_HELP_STRING([--enable-meego=@<:@no/yes@:>@],
519                              [Enable meego widgets]), ,
520                              enable_meego=no)
521
522 if test "x$enable_meego" != "xno"; then
523     PKG_CHECK_MODULES(MEEGO,
524     [
525        mx-gtk-1.0
526        gio-unix-2.0
527     ], have_meego="yes", have_meego="no")
528
529     if test "x$have_meego" = "xyes"; then
530        AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
531     fi
532 else
533    have_meego="no"
534 fi
535
536 if test "x$enable_meego" = "xyes" -a "x$have_meego" != "xyes"; then
537    AC_MSG_ERROR([Could not find meego dependencies:
538
539 $MEEGO_PKG_ERRORS])
540 fi
541
542 AM_CONDITIONAL(HAVE_MEEGO, test "x$have_meego" = "xyes")
543 AC_SUBST(MEEGO_CFLAGS)
544 AC_SUBST(MEEGO_LIBS)
545
546 # -----------------------------------------------------------
547 # nautilus-sendto
548 # -----------------------------------------------------------
549 AC_ARG_ENABLE(nautilus-sendto,
550               AS_HELP_STRING([--enable-nautilus-sendto=@<:@no/yes/auto@:>@],
551                              [build nautilus-sendto plugin]), ,
552                              enable_nautilus_sendto=auto)
553
554 if test "x$enable_nautilus_sendto" != "xno"; then
555    PKG_CHECK_MODULES(NST,
556     [
557        nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
558     ], have_nst="yes", have_nst="no")
559 else
560    have_nst=no
561 fi
562
563 if test "x$enable_nautilus_sendto" = "xyes" -a "x$have_nst" != "xyes"; then
564    AC_MSG_ERROR([Could not find nautilus-sendto dependencies:
565
566 $NST_PKG_ERRORS])
567 fi
568
569 AM_CONDITIONAL(HAVE_NST, test "x$have_nst" = "xyes")
570
571 # -----------------------------------------------------------
572 # goa-mc-plugin
573 # -----------------------------------------------------------
574 AC_ARG_ENABLE(goa,
575               AS_HELP_STRING([--enable-goa=@<:@no/yes/auto@:>@],
576                              [build GOA MC plugin]), ,
577                              enable_goa=auto)
578
579 if test "x$enable_goa" != "xno"; then
580    PKG_CHECK_MODULES(GOA,
581     [
582        mission-control-plugins
583        goa-1.0 >= $GOA_REQUIRED
584     ], have_goa="yes", have_goa="no")
585
586    AC_MSG_CHECKING([Mission Control plugins dir])
587    MISSION_CONTROL_PLUGINS_DIR=`pkg-config --variable=plugindir mission-control-plugins`
588
589    AC_MSG_RESULT([$MISSION_CONTROL_PLUGINS_DIR])
590    AC_SUBST(MISSION_CONTROL_PLUGINS_DIR)
591 else
592    have_goa=no
593 fi
594
595 if test "x$enable_goa" = "xyes" -a "x$have_goa" != "xyes"; then
596    AC_MSG_ERROR([Could not find GOA dependencies.])
597 fi
598
599 if test "x$have_goa" = "xyes"; then
600    AC_DEFINE(HAVE_GOA, 1, [Define to 1 to enable GNOME Online Accounts])
601 fi
602
603 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
604
605 # Optional dependency for avatar selection
606 AC_ARG_WITH([cheese],
607             AS_HELP_STRING([--with-cheese],
608                            [enable cheese webcam support]),,
609             with_cheese=auto)
610
611 if test x"$with_cheese" != x"no" ; then
612    PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.91.91.1, [have_cheese=yes], [have_cheese=no])
613    if test x${have_cheese} = xyes; then
614      AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
615    fi
616    if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
617      AC_MSG_ERROR([Cheese configured but not found:
618
619 $CHEESE_PKG_ERRORS])
620    fi
621 else
622    have_cheese=no
623 fi
624 AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
625
626 # Help documentation
627 YELP_HELP_INIT
628
629 # -----------------------------------------------------------
630 # Coding style checks
631 # -----------------------------------------------------------
632 AC_ARG_ENABLE(coding-style-checks,
633   AS_HELP_STRING([--disable-coding-style-checks],
634                  [do not check coding style using grep]),
635     [ENABLE_CODING_STYLE_CHECKS=$enableval],
636     [ENABLE_CODING_STYLE_CHECKS=yes])
637
638 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
639 # -----------------------------------------------------------
640
641 AC_CONFIG_FILES([
642    Makefile
643    data/Makefile
644    data/empathy.desktop.in
645    data/empathy-accounts.desktop.in
646    data/icons/Makefile
647    extensions/Makefile
648    po/Makefile.in
649    libempathy/Makefile
650    libempathy-gtk/Makefile
651    src/Makefile
652    nautilus-sendto-plugin/Makefile
653    goa-mc-plugin/Makefile
654    help/Makefile
655    tests/Makefile
656    tests/interactive/Makefile
657    tests/xml/Makefile
658    tools/Makefile
659 ])
660 AC_OUTPUT
661
662 echo "
663 Configure summary:
664
665         Compiler....................:  ${CC}
666         Compiler Flags..............:  ${CFLAGS} ${ERROR_CFLAGS}
667         Linker Flags................:  ${LDFLAGS}
668         Prefix......................:  ${prefix}
669         Coding style checks.........:  ${ENABLE_CODING_STYLE_CHECKS}
670
671     Features:
672         Spell checking (enchant)....:  ${have_enchant}
673         Display maps (libchamplain).:  ${have_libchamplain}
674         Location awareness (Geoclue):  ${have_geoclue}
675         Geocode support (Geocode)...:  ${have_geocode}
676         Meego widgets...............:  ${have_meego}
677         Cheese webcam support ......:  ${have_cheese}
678         Camera monitoring...........:  ${have_gudev}
679
680     Connectivity:
681         NetworkManager integration..:  ${have_nm}
682         ConnMan integration.........:  ${have_connman}
683
684     Extras:
685         Nautilus-sendto plugin......:  ${have_nst}
686         GOA MC plugin...............:  ${have_goa}
687         Salut E-D-S support.........:  ${with_eds}
688         Exp. Call log support.......:  ${have_call_logs}
689         empathy-av (legacy).........:  ${enable_empathy_av}
690 "