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