Folks 0.7.2 release.
[platform/upstream/folks.git] / configure.ac
1 # If not 1, append datestamp to the version number
2 m4_define([folks_released], [1])
3
4 m4_define([folks_major_version], [0])
5 m4_define([folks_minor_version], [7])
6 m4_define([folks_micro_version], [2])
7 m4_define([folks_nano_version], [0])
8
9 # If library source has changed since last release, increment revision
10 # If public symbols have been added, removed or changed since last release,
11 #  increment current and set revision to 0
12 # If public symbols have been added since last release, increment age
13 # If public symbols have been removed since last release, set age to 0
14 m4_define([folks_lt_current], [34])
15 m4_define([folks_lt_revision], [0])
16 m4_define([folks_lt_age], [9])
17
18 # Display the nano_version only if it's not '0'
19 m4_define([folks_base_version],
20           folks_major_version.folks_minor_version.folks_micro_version)
21 m4_define([folks_full_version],
22           [m4_if(folks_nano_version, [0],
23                  folks_base_version, folks_base_version.folks_nano_version)])
24
25 m4_define([folks_maybe_datestamp],
26           m4_if(folks_released, [1],
27                 [], [m4_esyscmd([date +.%Y%m%d | tr -d '\n\r'])]))
28
29 m4_define([folks_version], folks_full_version[]folks_maybe_datestamp)
30 m4_define([folks_major_minor_version], folks_major_version.folks_minor_version)
31 m4_define([folks_module_version], folks_lt_current)
32
33 AC_INIT([folks], folks_version,
34         [https://bugzilla.gnome.org/browse.cgi?product=folks], [folks],
35         [http://telepathy.freedesktop.org/wiki/Folks])
36 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37
38 AC_PREREQ([2.65])
39 AC_COPYRIGHT([Copyright (C) 2010 Collabora Ltd.])
40
41 AC_CONFIG_MACRO_DIR([m4])
42 AC_CONFIG_SRCDIR([Makefile.am])
43 AC_CONFIG_HEADERS(config.h)
44 AC_CONFIG_SRCDIR([configure.ac])
45 AM_INIT_AUTOMAKE([1.11 dist-bzip2 no-define
46                   no-dist-gzip tar-ustar -Wno-portability])
47 AM_MAINTAINER_MODE([enable])
48
49 AC_PROG_CC
50 AM_PROG_CC_C_O
51 AC_DISABLE_STATIC
52 LT_INIT
53 PKG_PROG_PKG_CONFIG([0.21])
54 GLIB_GSETTINGS
55
56 AC_SUBST([CFLAGS])
57 AC_SUBST([CPPFLAGS])
58 AC_SUBST([LDFLAGS])
59
60 LT_CURRENT=folks_lt_current
61 LT_REVISION=folks_lt_revision
62 LT_AGE=folks_lt_age
63 AC_SUBST([LT_CURRENT])
64 AC_SUBST([LT_REVISION])
65 AC_SUBST([LT_AGE])
66
67 FOLKS_MAJOR_MINOR_VERSION=folks_major_minor_version
68 AC_SUBST([FOLKS_MAJOR_MINOR_VERSION])
69
70 API_VERSION=0.6
71 AC_SUBST([API_VERSION])
72
73 AC_ARG_ENABLE(tracker-backend,
74         AC_HELP_STRING([--enable-tracker-backend],
75                        [ build the Tracker backend]),
76         enable_tracker_backend=$enableval,
77         enable_tracker_backend=no )
78
79 AM_CONDITIONAL([ENABLE_TRACKER], [test "x$enable_tracker_backend" = "xyes"])
80
81 if test "x$enable_tracker_backend" = "xyes"; then
82         AC_DEFINE(HAVE_TRACKER, [1],
83                   [Define as 1 if you have the Tracker backend])
84 else
85         AC_DEFINE(HAVE_TRACKER, [0],
86                   [Define as 1 if you have the Tracker backend])
87 fi
88
89 AC_ARG_ENABLE(eds-backend,
90         AC_HELP_STRING([--enable-eds-backend],
91                        [ build the E-D-S backend]),
92         enable_eds_backend=$enableval,
93         enable_eds_backend=yes )
94
95 if test "x$enable_eds_backend" = "xyes"; then
96         AC_DEFINE(HAVE_EDS, [1], [Define as 1 if you have the eds backend])
97 else
98         AC_DEFINE(HAVE_EDS, [0], [Define as 1 if you have the eds backend])
99 fi
100
101
102 AM_CONDITIONAL([ENABLE_EDS], [test "x$enable_eds_backend" = "xyes"])
103
104 # Automatically check the dependencies for the libsocialweb backend
105 SW_CLIENT_REQUIRED=0.25.20
106 AC_ARG_ENABLE(libsocialweb-backend,
107         AC_HELP_STRING([--enable-libsocialweb-backend=@<:@no/yes/auto@:>@],
108                        [build the Libsocialweb backend (default: auto)]),
109         enable_libsocialweb_backend=$enableval,
110         enable_libsocialweb_backend=auto )
111
112 # this may be overwritten farther down
113 AC_DEFINE(HAVE_LIBSOCIALWEB, [0],
114           [Define as 1 if you have the libsocialweb backend])
115 if test "x$enable_libsocialweb_backend" != "xno"; then
116   PKG_CHECK_MODULES([SW_CLIENT], [libsocialweb-client >= $SW_CLIENT_REQUIRED],
117       have_libsocialweb_backend="yes", have_libsocialweb_backend="no")
118   if test "x$have_libsocialweb_backend" = "xyes" -a \
119           "x$enable_vala" = "xyes"; then
120     VALA_CHECK_PACKAGES([telepathy-glib
121                          gio-2.0
122                          gee-1.0
123                          libsocialweb-client],
124         ,
125         have_libsocialweb_backend="no")
126   fi
127
128   if test "x$have_libsocialweb_backend" = "xyes"; then
129     AC_DEFINE(HAVE_LIBSOCIALWEB, [1],
130               [Define if you have the libsocialweb backend])
131   fi
132 else
133    have_libsocialweb_backend=no
134 fi
135
136 if test "x$enable_libsocialweb_backend" = "xyes" -a \
137   "x$have_libsocialweb_backend" != "xyes"; then
138     AC_MSG_ERROR([Cannot find libsocialweb dependencies.])
139 fi
140
141 AM_CONDITIONAL([ENABLE_LIBSOCIALWEB],
142         [test "x$have_libsocialweb_backend" = "xyes"])
143
144 # -----------------------------------------------------------
145 # Dependencies
146 # -----------------------------------------------------------
147
148 GLIB_REQUIRED=2.26.0
149 VALA_REQUIRED=0.15.2
150 VALADOC_REQUIRED=0.3.1
151 TRACKER_SPARQL_MAJOR=0.14
152 TRACKER_SPARQL_REQUIRED=0.13.1
153 EBOOK_REQUIRED=3.5.3
154 EDATASERVER_REQUIRED=3.5.4
155 ZEITGEIST_REQUIRED=0.3.14
156
157 AC_SUBST([TRACKER_SPARQL_MAJOR])
158
159 PKG_CHECK_MODULES([GLIB],
160                   [glib-2.0 >= $GLIB_REQUIRED
161                    gobject-2.0 >= $GLIB_REQUIRED])
162 PKG_CHECK_MODULES([GMODULE], [gmodule-no-export-2.0])
163 PKG_CHECK_MODULES([GIO], [gio-2.0 >= $GLIB_REQUIRED])
164 PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1])
165
166 # FIXME: We depend on libgee < 0.7 because 0.7 breaks API. bgo#627746
167 PKG_CHECK_MODULES([GEE], [gee-1.0 < 0.7],
168                   have_gee_0_6_x="yes",
169                   have_gee_0_6_x="no")
170
171 if test "x$have_gee_0_6_x" != "xyes"; then
172     AC_MSG_ERROR([
173 Gee 0.6.x required but not installed.
174
175 Note that Gee 0.8.x provides gee-0.8 (but gee-1.0 is, confusingly, provided by
176 Gee 0.6.x)])
177 fi
178
179 TP_GLIB_REQUIRED=0.19.0
180 PKG_CHECK_MODULES([TP_GLIB], [telepathy-glib >= $TP_GLIB_REQUIRED])
181
182 # Ignore post 0.20 deprecations
183 TP_GLIB_CFLAGS="$TP_GLIB_CFLAGS -DTP_VERSION_MIN_REQUIRED=TP_VERSION_0_20"
184 # Prevent post 0.20 APIs
185 TP_GLIB_CFLAGS="$TP_GLIB_CFLAGS -DTP_VERSION_MAX_ALLOWED=TP_VERSION_0_20"
186
187 if test x$enable_tracker_backend = xyes; then
188         PKG_CHECK_MODULES([TRACKER_SPARQL],
189                           [tracker-sparql-$TRACKER_SPARQL_MAJOR >= \
190                            $TRACKER_SPARQL_REQUIRED])
191 fi
192
193 if test x$enable_eds_backend = xyes; then
194         PKG_CHECK_MODULES([EBOOK], [libebook-1.2 >= $EBOOK_REQUIRED])
195         PKG_CHECK_MODULES([EDATASERVER], [libedataserver-1.2 >= $EDATASERVER_REQUIRED])
196 fi
197
198 PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-1.0 >= $ZEITGEIST_REQUIRED])
199
200 #
201 # Vala building options -- allows tarball builds without installing Vala
202 #
203 AC_ARG_ENABLE([vala],
204               AS_HELP_STRING([--enable-vala],
205                              [Enable building from the Vala sources]),
206               [enable_vala=$enableval],
207               [enable_vala=no])
208
209 # will be re-set as necessary below
210 AM_CONDITIONAL([HAVE_INTROSPECTION], [test "x$enable_vala" = "xyes"])
211 sd=${srcdir}/
212
213 # Force Vala for non-release builds
214 m4_if(folks_released, [1], [],
215     [
216         enable_vala=yes
217         echo "Vala compiler required for non-release builds; requiring Vala..."
218     ])
219
220 # Force Vala if generated source is missing or outdated
221 if test \
222         ! -e ${sd}tools/folks_import_vala.stamp -o \
223         ! -e ${sd}tests/folks/abstract_field_details_vala.stamp -o \
224         ! -e ${sd}tests/folks/aggregation_vala.stamp -o \
225         ! -e ${sd}tests/folks/backend_loading_vala.stamp -o \
226         ! -e ${sd}tests/key-file/individual_retrieval_vala.stamp -o \
227         ! -e ${sd}tests/lib/folks-test.vapi -o \
228         ! -e ${sd}tests/lib/key-file/kf-test.vapi -o \
229         ! -e ${sd}tests/lib/key-file/libkf_test_la_vala.stamp -o \
230         ! -e ${sd}tests/lib/telepathy/contactlist/tp-test-contactlist.gir -o \
231         ! -e ${sd}tests/lib/telepathy/contactlist/tp-test-contactlist.vapi -o \
232         ! -e ${sd}tests/lib/libfolks_test_la_vala.stamp -o \
233         ! -e ${sd}tests/telepathy/persona_store_capabilities_vala.stamp -o \
234         ! -e ${sd}tests/telepathy/individual_retrieval_vala.stamp -o \
235         ! -e ${sd}tests/telepathy/individual_properties_vala.stamp -o \
236         ! -e ${sd}tests/folks/backend_loading_vala.stamp -o \
237         ! -e ${sd}backends/key-file/key_file_la_vala.stamp -o \
238         ! -e ${sd}backends/telepathy/telepathy_la_vala.stamp \
239                 -o \
240         ! -e ${sd}backends/telepathy/lib/folks-telepathy.vapi -o \
241         ! -e ${sd}backends/telepathy/lib/tp-lowlevel.gir -o \
242         ! -e ${sd}backends/telepathy/lib/tp-lowlevel.vapi -o \
243         ! -e ${sd}backends/telepathy/lib/libfolks_telepathy_la_vala.stamp -o \
244         ! -e ${sd}folks/folks-internal.h -o \
245         ! -e ${sd}folks/folks-internal.vapi -o \
246         ! -e ${sd}folks/libfolks_internal_la_vala.stamp -o \
247         ! -e ${sd}folks/folks.vapi -o \
248         ! -e ${sd}folks/libfolks_la_vala.stamp ; then
249         enable_vala=yes
250         echo "Vala source needs to be re-compiled; requiring Vala..."
251 fi
252
253 if test "x$enable_vala" = "xyes" ; then
254         AM_PROG_VALAC([$VALA_REQUIRED])
255         if test "x$VALAC" = "x"; then
256               AC_MSG_ERROR([Vala requested but valac is not installed])
257         fi
258
259         AC_PATH_PROG([VAPIGEN], [vapigen], [])
260         if test "x$VAPIGEN" = "x"; then
261               AC_MSG_ERROR([Vala must be built with --enable-vapigen])
262         fi
263
264         # require GLib >= 2.24 so GLib.Array, etc. reffing is handled
265         # automatically
266         VALAFLAGS="$VALAFLAGS --target-glib=2.24"
267         AC_SUBST([VALAFLAGS])
268         AC_SUBST([VAPIGENFLAGS])
269         AC_SUBST([VAPIDIR])
270
271         VALA_CHECK_PACKAGES([telepathy-glib
272                              gio-2.0
273                              gee-1.0
274                              zeitgeist-1.0])
275
276         if test x$enable_tracker_backend = xyes; then
277           VALA_CHECK_PACKAGES([tracker-sparql-$TRACKER_SPARQL_MAJOR])
278         fi
279
280         if test x$enable_eds_backend = xyes; then
281           VALA_CHECK_PACKAGES([libebook-1.2 libedataserver-1.2 libxml-2.0])
282         fi
283 fi
284
285 # this will set HAVE_INTROSPECTION
286 GOBJECT_INTROSPECTION_REQUIRE([1.30])
287
288 AM_CONDITIONAL([HAVE_VALA], [test "x$enable_vala" = "xyes"])
289
290 # Various functions that we need (used in C code generated from Vala)
291 AC_CHECK_FUNCS([memset])
292 AC_CHECK_FUNCS([strstr])
293
294 # -----------------------------------------------------------
295 # Backends
296 # -----------------------------------------------------------
297
298 FOLKS_MODULE_VERSION=folks_module_version
299 AC_SUBST([FOLKS_MODULE_VERSION])
300 AC_DEFINE([MODULE_VERSION], "folks_module_version", [Module interface version])
301
302 BACKEND_DIR='$(libdir)/folks/$(FOLKS_MODULE_VERSION)/backends'
303 AC_SUBST([BACKEND_DIR])
304
305 BACKEND_KF='$(top_builddir)/backends/key-file/.libs/key-file.so'
306 AC_SUBST([BACKEND_KF])
307 BACKEND_TP='$(top_builddir)/backends/telepathy/.libs/telepathy.so'
308 AC_SUBST([BACKEND_TP])
309
310 if test x$have_libsocialweb_backend = xyes; then
311   BACKEND_LIBSOCIALWEB='$(top_builddir)/backends/libsocialweb/.libs/libsocialweb.so'
312   AC_SUBST([BACKEND_LIBSOCIALWEB])
313 fi
314
315 if test x$enable_tracker_backend = xyes; then
316   BACKEND_TRACKER='$(top_builddir)/backends/tracker/.libs/tracker.so'
317   AC_SUBST([BACKEND_TRACKER])
318 fi
319
320 if test x$enable_eds_backend = xyes; then
321   BACKEND_EDS='$(top_builddir)/backends/eds/.libs/eds.so'
322   AC_SUBST([BACKEND_EDS])
323 fi
324
325 # All of the backend libraries in our tree; to be used by the tests
326 BACKEND_UNINST_PATH='$(BACKEND_KF):$(BACKEND_TP)'
327 if test x$have_libsocialweb_backend = xyes; then
328   LIBSOCIALWEB_BACKEND_UNINST_PATH='$(BACKEND_LIBSOCIALWEB)'
329   BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$LIBSOCIALWEB_BACKEND_UNINST_PATH"
330 fi
331 if test x$enable_tracker_backend = xyes; then
332   TRACKER_BACKEND_UNINST_PATH='$(BACKEND_TRACKER)'
333   BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$TRACKER_BACKEND_UNINST_PATH"
334 fi
335 if test x$enable_eds_backend = xyes; then
336   EDS_BACKEND_UNINST_PATH='$(BACKEND_EDS)'
337   BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$EDS_BACKEND_UNINST_PATH"
338 fi
339 AC_SUBST([BACKEND_UNINST_PATH])
340
341 # -----------------------------------------------------------
342 # Tools
343 # -----------------------------------------------------------
344
345 AC_ARG_ENABLE([import-tool],
346               AS_HELP_STRING([--enable-import-tool],
347                              [Enable building the meta-contact import tool]),
348               [enable_import_tool=$enableval with_import_tool=$enableval],
349               [enable_import_tool=maybe with_import_tool=no])
350 AS_IF([test "$enable_import_tool" != "no"],
351       [PKG_CHECK_MODULES([LIBXML], [libxml-2.0],
352                          [with_import_tool=yes], [with_import_tool=no])])
353 AS_IF([test "$enable_import_tool" = "yes" -a "$with_import_tool" = "no"],
354       [AC_MSG_ERROR([Import tool explicitly enabled, but libxml2 not found])])
355 AM_CONDITIONAL([ENABLE_IMPORT_TOOL], [test "$with_import_tool" = "yes"])
356
357 # Readline's required for the folks-inspect program
358 AC_ARG_ENABLE([inspect-tool],
359               AS_HELP_STRING([--enable-inspect-tool],
360                              [Enable building the data inspection tool]),
361               [enable_inspect_tool=$enableval with_inspect_tool=$enableval],
362               [enable_inspect_tool=maybe with_inspect_tool=no])
363 AS_IF([test "$enable_inspect_tool" = "yes" -a "$enable_vala" != "yes"],
364       [AC_MSG_ERROR([Inspect tool explicitly enabled, but Vala wasn't enabled \
365                      using --enable-vala])])
366 AS_IF([test "$enable_inspect_tool" = "maybe" -a "$enable_vala" != "yes"],
367       [AC_MSG_NOTICE([Inspect tool disabled, as Vala wasn't enabled using \
368                       --enable-vala])])
369 AS_IF([test "$enable_inspect_tool" != "no" -a "x$enable_vala" = "xyes"],
370       [AC_CHECK_LIB([readline], [main],
371                     [with_inspect_tool=yes], [with_inspect_tool=no],
372                     [-lncurses])])
373 AS_IF([test "$enable_inspect_tool" != "no" -a "$with_inspect_tool" = "yes" -a \
374        "x$enable_vala" = "xyes"],
375       [VALA_CHECK_PACKAGES([readline])
376        LIBREADLINE="-lreadline -lncurses"
377        AC_DEFINE([HAVE_LIBREADLINE], [1], [Define if you have libreadline])
378        AC_SUBST([LIBREADLINE])])
379 AS_IF([test "$enable_inspect_tool" = "yes" -a "$with_inspect_tool" = "no"],
380       [AC_MSG_ERROR([Inspect tool explicitly enabled, but readline not found])])
381 AM_CONDITIONAL([ENABLE_INSPECT_TOOL], [test "$with_inspect_tool" = "yes"])
382
383 # -----------------------------------------------------------
384 # Documentation
385 # -----------------------------------------------------------
386
387 AC_ARG_ENABLE([docs],
388               AS_HELP_STRING([--enable-docs],[Enable documentation generation]),
389               [enable_docs=$enableval], [enable_docs=no])
390 AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_docs = xyes])
391
392 have_valadoc=no
393 if test x$enable_docs = xyes; then
394   # make sure the library is new enough and the program exists
395   PKG_CHECK_MODULES([VALADOC], [valadoc-1.0 >= $VALADOC_REQUIRED])
396   AC_PATH_PROG([VALADOC], [valadoc], [:])
397   AS_IF([test "$VALADOC" != :], have_valadoc=yes)
398 fi
399 AM_CONDITIONAL([HAVE_VALADOC], [test x$have_valadoc = xyes])
400
401 if test "x$enable_docs" = "xyes" -a "x$have_valadoc" != "xyes"; then
402     AC_MSG_ERROR([Doc building requested but valadoc not installed.])
403 fi
404
405 # -----------------------------------------------------------
406 # Gettext
407 # -----------------------------------------------------------
408
409 GETTEXT_PACKAGE=AC_PACKAGE_NAME
410 AC_SUBST(GETTEXT_PACKAGE)
411 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
412 IT_PROG_INTLTOOL([0.50.0])
413
414 # -----------------------------------------------------------
415 # Error flags
416 # -----------------------------------------------------------
417
418 # Disable GLib deprecation warnings for now (#670196); GValueArray is deprecated
419 # but we need it for dbus-glib. Porting to GDBus will solve this (#653198)
420 AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
421
422 AS_COMPILER_FLAG([-Wall], [ERROR_CFLAGS="-Wall"], [ERROR_CFLAGS=""])
423 AS_COMPILER_FLAG([-Werror], [werror=yes], [werror=no])
424
425 AC_ARG_ENABLE([debug],
426               AS_HELP_STRING([--disable-debug],[compile without debug code]),
427               [enable_debug=$enableval], [enable_debug=yes])
428
429 AC_ARG_ENABLE([Werror],
430               AS_HELP_STRING([--disable-Werror],
431                              [compile without -Werror (normally enabled in
432                               development builds)]),
433               [werror=$enableval], [werror=yes])
434
435 AS_COMPILER_FLAG([-Wextra], [wextra=yes], [wextra=no])
436 AS_COMPILER_FLAG([-Wno-missing-field-initializers],
437                  [wno_missing_field_initializers=yes],
438                  [wno_missing_field_initializers=no])
439 AS_COMPILER_FLAG([-Wno-unused-parameter],
440                  [wno_unused_parameter=yes], [wno_unused_parameter=no])
441
442 m4_if(folks_released, [1], [],
443     [
444         if test x$werror = xyes; then
445             ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
446         fi
447         if test x$wextra = xyes -a \
448             x$wno_missing_field_initializers = xyes -a \
449             x$wno_unused_parameter = xyes; then
450             ERROR_CFLAGS="$ERROR_CFLAGS -Wextra \
451                 -Wno-missing-field-initializers -Wno-unused-parameter"
452         fi
453     ])
454
455 AS_COMPILER_FLAG([-D_POSIX_SOURCE], [ERROR_CFLAGS="$ERROR_CFLAGS -D_POSIX_SOURCE"])
456 AS_COMPILER_FLAG([-std=c99], [ERROR_CFLAGS="$ERROR_CFLAGS -std=c99"])
457 AS_COMPILER_FLAG([-Wshadow], [ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow"])
458 AS_COMPILER_FLAG([-Wmissing-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
459                                           -Wmissing-prototypes"])
460 AS_COMPILER_FLAG([-Wmissing-declarations], [ERROR_CFLAGS="$ERROR_CFLAGS \
461                                             -Wmissing-declarations"])
462 AS_COMPILER_FLAG([-Wstrict-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
463                                          -Wstrict-prototypes"])
464
465 AC_SUBST([ERROR_CFLAGS])
466
467 # -----------------------------------------------------------
468 # Code coverage flags
469 # -----------------------------------------------------------
470
471 AC_ARG_ENABLE([code-coverage],
472               AS_HELP_STRING([--enable-code-coverage],
473                              [compile with code coverage code]),
474               [enable_code_coverage=$enableval], [enable_code_coverage=no])
475
476 # Only enable code coverage if this isn't a release.
477 m4_if(folks_released, [1], [],
478     [
479         if test "x$GCC" = "xyes"; then
480             if test "x$enable_code_coverage" = "xyes"; then
481                 CODE_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage -O0 -ggdb"
482                 CODE_COVERAGE_LDFLAGS="-lgcov"
483             fi
484         fi
485     ])
486
487 AC_SUBST([CODE_COVERAGE_CFLAGS])
488 AC_SUBST([CODE_COVERAGE_LDFLAGS])
489
490 # Vala-related flags
491 AC_ARG_ENABLE([fatal-warnings],
492               AS_HELP_STRING([--disable-fatal-warnings],
493                              [Make warnings from valac and g-ir-scanner non-fatal]),
494               [enable_fatal_warnings=$enableval], [enable_fatal_warnings=yes])
495 AS_IF([test "x$enable_vala" = "xyes" && test "x$enable_fatal_warnings" = "xyes"],
496       [ERROR_INTROSPECTION_SCANNER_ARGS="\
497                         $ERROR_INTROSPECTION_SCANNER_ARGS --warn-error"
498        ERROR_VALAFLAGS="$ERROR_VALAFLAGS --fatal-warnings"])
499
500 # Disable -g if we're building with code coverage enabled, since Vala's
501 # insertion of #line directives into .c files confuses lcov. For the moment,
502 # we'll have to do with looking at code coverage of the generated C files only.
503 # We set the debug flags in CODE_COVERAGE_CFLAGS instead in that case.
504 m4_if(folks_released, [1], [],
505     [
506         if test "x$enable_code_coverage" != "xyes" -o "x$GCC" != "xyes"; then
507             ERROR_VALAFLAGS="$ERROR_VALAFLAGS -g"
508         fi
509     ])
510
511 AC_SUBST([ERROR_INTROSPECTION_SCANNER_ARGS])
512 AC_SUBST([ERROR_VALAFLAGS])
513
514 # -----------------------------------------------------------
515 # Profiling
516 # -----------------------------------------------------------
517
518 AC_ARG_ENABLE([profiling],
519               AS_HELP_STRING([--enable-profiling],
520                              [Enable building profiling points]),
521               [enable_profiling=$enableval],
522               [enable_profiling=no])
523 AM_CONDITIONAL([ENABLE_PROFILING], [test "$enable_profiling" = "yes"])
524
525 # -----------------------------------------------------------
526 # Final output
527 # -----------------------------------------------------------
528
529 # FIXME: We can't remove gconf.path until bgo#635379 is fixed, since we need to
530 # safely contain EDS' use of GConf for the EDS backend tests.
531 # Note that our use of gconf.path doesn't actually need GConf to be installed,
532 # though, so it's not a hard dependency of folks.
533
534 AC_CONFIG_FILES([
535     backends/telepathy/lib/folks-telepathy.pc
536     backends/telepathy/lib/folks-telepathy-uninstalled.pc
537     backends/tracker/lib/folks-tracker.deps
538     backends/tracker/lib/folks-tracker.pc
539     backends/tracker/lib/folks-tracker-uninstalled.pc
540     backends/eds/lib/folks-eds.pc
541     backends/eds/lib/folks-eds-uninstalled.pc
542     folks/folks.pc
543     folks/folks-uninstalled.pc
544     folks/org.freedesktop.folks.gschema.xml
545     Makefile
546     backends/Makefile
547     backends/key-file/Makefile
548     backends/libsocialweb/Makefile
549     backends/libsocialweb/lib/Makefile
550     backends/libsocialweb/lib/folks-libsocialweb.pc
551     backends/libsocialweb/lib/folks-libsocialweb-uninstalled.pc
552     backends/telepathy/Makefile
553     backends/telepathy/lib/Makefile
554     backends/tracker/Makefile
555     backends/tracker/lib/Makefile
556     backends/eds/Makefile
557     backends/eds/lib/Makefile
558     folks/Makefile
559     docs/Makefile
560     po/Makefile.in
561     tests/Makefile
562     tests/data/Makefile
563     tests/data/gconf.path
564     tests/eds/Makefile
565     tests/folks/Makefile
566     tests/key-file/Makefile
567     tests/libsocialweb/Makefile
568     tests/telepathy/Makefile
569     tests/tracker/Makefile
570     tests/lib/Makefile
571     tests/lib/folks-test-uninstalled.pc
572     tests/lib/eds/Makefile
573     tests/lib/key-file/Makefile
574     tests/lib/libsocialweb/Makefile
575     tests/lib/libsocialweb/session.conf
576     tests/lib/telepathy/Makefile
577     tests/lib/tracker/Makefile
578     tests/lib/telepathy/contactlist/Makefile
579     tests/lib/telepathy/contactlist/session.conf
580     tests/tools/Makefile
581     tools/Makefile
582     tools/inspect/Makefile
583 ])
584
585 AC_OUTPUT
586
587 echo "
588 Configure summary:
589
590         Vala........................:  ${enable_vala}
591         Vala Compiler...............:  ${VALAC}
592         C Compiler Flags............:  ${CFLAGS} ${ERROR_CFLAGS} ${CODE_COVERAGE_CFLAGS}
593         Linker Flags................:  ${LDFLAGS} ${CODE_COVERAGE_LDFLAGS}
594         Prefix......................:  ${prefix}
595         Bugreporting URL............:  ${PACKAGE_BUGREPORT}
596         Documentation...............:  ${have_valadoc}
597         Import tool.................:  ${with_import_tool}
598         Inspector tool..............:  ${with_inspect_tool}
599         Tracker backend.............:  ${enable_tracker_backend}
600         Libsocialweb backend........:  ${have_libsocialweb_backend}
601         E-D-S backend...............:  ${enable_eds_backend}
602
603 "