]> git.0d.be Git - empathy.git/blob - configure.ac
Run from the source directory without installing
[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], [90])
7 m4_define([empathy_nano_version], [2])
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_FARSTREAM_REQUIRED=0.2.1
47 TELEPATHY_GLIB_REQUIRED=0.17.5
48 TELEPATHY_LOGGER=0.2.10
49 WEBKIT_REQUIRED=1.3.13
50 GOA_REQUIRED=3.3.0
51
52 # Optional deps
53 CLUTTER_REQUIRED=1.7.14
54 CLUTTER_GTK_REQUIRED=0.90.3
55 ENCHANT_REQUIRED=1.2.0
56 GEOCLUE_REQUIRED=0.11
57 ISO_CODES_REQUIRED=0.35
58 NAUTILUS_SENDTO_REQUIRED=2.90.0
59 NETWORK_MANAGER_REQUIRED=0.7.0
60 CHAMPLAIN_REQUIRED=0.12.1
61
62 # Use --enable-maintainer-mode to disable deprecated symbols,
63 # disable single include and enable GSEAL. If this is not a released empathy,
64 # maintainer mode is forced
65 # FIXME: don't disable deprecated symbols until bgo #636654 has been fixed
66 #ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
67 #GNOME_MAINTAINER_MODE_DEFINES
68
69 # Disable GLib deprecation warnings for now; we don't want to bump the GLib dep
70 # and make things harder for contributiors without good reason. We'll re-enable
71 # those warnings later during the cycle (bgo #662662)
72 AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
73
74 # FIXME: bgo #669673
75 AC_DEFINE(CLUTTER_DISABLE_DEPRECATION_WARNINGS, 1, [Build with Clutter deprecated])
76
77 AC_CONFIG_MACRO_DIR([m4])
78 AC_CONFIG_HEADERS([config.h])
79 AC_CONFIG_SRCDIR([configure.ac])
80 AC_CONFIG_AUX_DIR(.)
81
82 AM_INIT_AUTOMAKE([1.11 no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
83
84 # Support silent build rules. Disable
85 # by either passing --disable-silent-rules to configure or passing V=1
86 # to make
87 AM_SILENT_RULES([yes])
88
89 # Check for programs
90 AC_PROG_CC
91 AC_HEADER_STDC
92 AM_PROG_MKDIR_P
93 AM_PATH_GLIB_2_0
94 AC_PATH_XTRA
95
96 # Initialize libtool
97 LT_PREREQ([2.2])
98 LT_INIT
99
100 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
101 GLIB_GSETTINGS
102 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
103 AC_SUBST(GLIB_GENMARSHAL)
104
105 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
106 if test -z "$XSLTPROC"; then
107   AC_MSG_ERROR([xsltproc (from libxslt) is required])
108 fi
109 AM_PATH_PYTHON([2.3])
110
111 EMPATHY_ARG_VALGRIND
112
113
114 # -----------------------------------------------------------
115 # Error flags
116 # -----------------------------------------------------------
117 AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
118 AS_COMPILER_FLAG(-Werror, werror=yes, werror=no)
119
120 AC_ARG_ENABLE(Werror,
121   AS_HELP_STRING([--disable-Werror],
122                  [compile without -Werror (normally enabled in development builds)]),
123     werror=$enableval, :)
124
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)
132
133 ifelse(empathy_released, 1, [],
134     [
135         if test x$werror = xyes; then
136             ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
137         fi
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"
142         fi
143     ])
144
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")
150
151 AC_SUBST(ERROR_CFLAGS)
152
153 AC_ARG_ENABLE(gprof,
154             AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@],
155             [build with support for gprof]),,
156             [enable_gprof=no])
157 if test "x$enable_gprof" != "xno" ; then
158     CFLAGS="$CFLAGS -pg"
159     LDFLAGS="$LDFLAGS -pg"
160 fi
161
162 AC_SUBST(LDFLAGS)
163
164 # -----------------------------------------------------------
165 # Pkg-Config dependency checks
166 # -----------------------------------------------------------
167
168 AC_CHECK_LIBM
169 AC_SUBST(LIBM)
170
171 PKG_CHECK_MODULES(EMPATHY,
172 [
173    dbus-glib-1
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
181    gmodule-export-2.0
182    gobject-2.0
183    gsettings-desktop-schemas
184    gstreamer-0.10 >= $GSTREAMER_REQUIRED
185    gstreamer-interfaces-0.10
186    libxml-2.0
187    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
188    telepathy-logger-0.2 >= $TELEPATHY_LOGGER
189    x11
190    gtk+-3.0 >= $GTK_REQUIRED
191    libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED
192    libnotify >= $LIBNOTIFY_REQUIRED
193    gcr-3 >= $GCR_REQUIRED
194    libpulse
195    libpulse-mainloop-glib
196    webkitgtk-3.0 >= $WEBKIT_REQUIRED
197    libsoup-2.4
198 ])
199
200 PKG_CHECK_MODULES(EMPATHY_CALL,
201 [
202    farstream-0.1
203    telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
204    clutter-1.0 >= $CLUTTER_REQUIRED
205    clutter-gtk-1.0
206    clutter-gst-1.0
207 ])
208
209 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
210    [Name of provider for accounts imported from GOA])
211
212 # -----------------------------------------------------------
213 # Build empathy-av?
214 # -----------------------------------------------------------
215 AC_ARG_ENABLE(empathy-av,
216             AS_HELP_STRING([--enable-empathy-av=@<:@no/yes@:>@],
217             [build empathy-av (legacy call UI)]),,
218             [enable_empathy_av=no])
219 if test "x$enable_empathy_av" != "xno" ; then
220    PKG_CHECK_MODULES(EMPATHY_AV,
221    [
222       farstream-0.1
223       telepathy-farstream >= $TELEPATHY_FARSTREAM_REQUIRED
224    ])
225    AC_DEFINE(HAVE_EMPATHY_AV, 1, [Define if you have StreamedMedia channel support])
226    have_empathy_av=yes
227 fi
228 AM_CONDITIONAL(HAVE_EMPATHY_AV, test "x$have_empathy_av" = "xyes")
229
230 # -----------------------------------------------------------
231 # Call support in tp-logger
232 # -----------------------------------------------------------
233 AC_ARG_ENABLE(call-logs,
234             AS_HELP_STRING([--enable-call-logs=@<:@no/yes/auto@:>@],
235             [build with call logs support]),,
236             [enable_call_logs=auto])
237 if test "x$enable_call_logs" != "xno" ; then
238    SAVE_CFLAGS=$CFLAGS
239    SAVE_CPPFLAGS=$CPPFLAGS
240    SAVE_LDFLAGS=$LDFLAGS
241    CFLAGS="$CFLAGS $EMPATHY_CFLAGS"
242    CPPFLAGS="$CPPFLAGS $EMPATHY_CFLAGS"
243    LDFLAGS="$LDFLAGS $EMPATHY_LDFLAGS"
244
245    AC_CHECK_HEADER(telepathy-logger/call-event.h,
246       have_call_logs="yes", have_call_logs="no")
247
248    CFLAGS=$SAVE_CFLAGS
249    CPPFLAGS=$SAVE_CPPFLAGS
250    LDFLAGS=$SAVE_LDFLAGS
251
252    if test "x$have_call_logs" = "xyes"; then
253       AC_DEFINE(HAVE_CALL_LOGS, 1, [Define if you have call log support])
254    fi
255 else
256   have_call_logs=no
257 fi
258
259 if test "x$enable_call_logs" = "xyes" -a "x$have_call_logs" != "xyes"; then
260    AC_MSG_ERROR([Call logs support requested but telepathy-logger wasn't
261                  built with --enable-call])
262 fi
263
264 # -----------------------------------------------------------
265 # evolution-data-server (about-me)
266 # -----------------------------------------------------------
267 AC_ARG_WITH(eds,
268             AS_HELP_STRING([--with-eds],
269                            [build with evolution-data-server support]),,
270             [with_eds=yes])
271 if test x"$with_eds" = x"yes" ; then
272    PKG_CHECK_MODULES(EDS, [libebook-1.2])
273    AC_DEFINE(HAVE_EDS, 1, [Define if we have libebook])
274 fi
275
276 # -----------------------------------------------------------
277 # Enable debug
278 # -----------------------------------------------------------
279
280 AC_ARG_ENABLE(debug,
281   AS_HELP_STRING([--disable-debug],
282                  [compile without debug code]),
283     enable_debug=$enableval, enable_debug=yes )
284
285 if test x$enable_debug = xyes; then
286   AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
287 fi
288
289 # -----------------------------------------------------------
290 # Language Support
291 # -----------------------------------------------------------
292 IT_PROG_INTLTOOL([0.40.0])
293
294 AM_GNU_GETTEXT_VERSION([0.17])
295 AM_GNU_GETTEXT([external])
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.14
434        champlain-0.14 >= $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 "