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