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