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