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