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