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