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