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