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