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