1 # If not 1, append datestamp to the version number
2 m4_define([folks_released], [0])
4 m4_define([folks_major_version], [0])
5 m4_define([folks_minor_version], [9])
6 m4_define([folks_micro_version], [1])
7 m4_define([folks_nano_version], [1])
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], [38])
15 m4_define([folks_lt_revision], [1])
16 m4_define([folks_lt_age], [13])
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)])
25 m4_define([folks_maybe_datestamp],
26 m4_if(folks_released, [1],
27 [], [m4_esyscmd([date +.%Y%m%d | tr -d '\n\r'])]))
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)
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])])
39 AC_COPYRIGHT([Copyright (C) 2010 Collabora Ltd.])
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-xz no-define
46 no-dist-gzip tar-ustar -Wno-portability color-tests])
47 AM_MAINTAINER_MODE([enable])
53 PKG_PROG_PKG_CONFIG([0.21])
60 LT_CURRENT=folks_lt_current
61 LT_REVISION=folks_lt_revision
63 AC_SUBST([LT_CURRENT])
64 AC_SUBST([LT_REVISION])
67 FOLKS_MAJOR_MINOR_VERSION=folks_major_minor_version
68 AC_SUBST([FOLKS_MAJOR_MINOR_VERSION])
71 AC_SUBST([API_VERSION])
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 )
79 AM_CONDITIONAL([ENABLE_TRACKER], [test "x$enable_tracker_backend" = "xyes"])
81 AS_IF([test "x$enable_tracker_backend" = "xyes"], [
82 AC_DEFINE(HAVE_TRACKER, [1],
83 [Define as 1 if you have the Tracker backend])
85 AC_DEFINE(HAVE_TRACKER, [0],
86 [Define as 1 if you have the Tracker backend])
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 )
95 AS_IF([test "x$enable_eds_backend" = "xyes"], [
96 AC_DEFINE(HAVE_EDS, [1], [Define as 1 if you have the eds backend])
98 AC_DEFINE(HAVE_EDS, [0], [Define as 1 if you have the eds backend])
101 AM_CONDITIONAL([ENABLE_EDS], [test "x$enable_eds_backend" = "xyes"])
103 AC_ARG_ENABLE(ofono-backend,
104 AC_HELP_STRING([--enable-ofono-backend],
105 [ build the ofono backend]),
106 enable_ofono_backend=$enableval,
107 enable_ofono_backend=yes )
109 AS_IF([test "x$enable_ofono_backend" = "xyes"], [
110 AC_DEFINE(HAVE_OFONO, [1], [Define as 1 if you have the ofono backend])
112 AC_DEFINE(HAVE_OFONO, [0], [Define as 1 if you have the ofono backend])
115 AM_CONDITIONAL([ENABLE_OFONO], [test "x$enable_ofono_backend" = "xyes"])
117 AC_ARG_ENABLE(telepathy-backend,
118 AC_HELP_STRING([--enable-telepathy-backend],
119 [ build the Telepathy backend]),
120 enable_telepathy_backend=$enableval,
121 enable_telepathy_backend=yes )
123 AS_IF([test "x$enable_telepathy_backend" = "xyes"], [
124 AC_DEFINE(HAVE_TELEPATHY, [1], [Define as 1 if you have the Telepathy backend])
126 AC_DEFINE(HAVE_TELEPATHY, [0], [Define as 1 if you have the Telepathy backend])
129 AM_CONDITIONAL([ENABLE_TELEPATHY], [test "x$enable_telepathy_backend" = "xyes"])
131 # Automatically check the dependencies for the libsocialweb backend
132 SW_CLIENT_REQUIRED=0.25.20
133 AC_ARG_ENABLE(libsocialweb-backend,
134 AC_HELP_STRING([--enable-libsocialweb-backend=@<:@no/yes/auto@:>@],
135 [build the Libsocialweb backend (default: auto)]),
136 enable_libsocialweb_backend=$enableval,
137 enable_libsocialweb_backend=auto )
139 # this may be overwritten farther down
140 AC_DEFINE(HAVE_LIBSOCIALWEB, [0],
141 [Define as 1 if you have the libsocialweb backend])
142 AS_IF([test "x$enable_libsocialweb_backend" != "xno"], [
143 PKG_CHECK_MODULES([SW_CLIENT], [libsocialweb-client >= $SW_CLIENT_REQUIRED],
144 have_libsocialweb_backend="yes", have_libsocialweb_backend="no")
145 AS_IF([test "x$have_libsocialweb_backend" = "xyes" -a \
146 "x$enable_vala" = "xyes"], [
147 VALA_CHECK_PACKAGES([telepathy-glib
150 libsocialweb-client],
152 have_libsocialweb_backend="no")
155 AS_IF([test "x$have_libsocialweb_backend" = "xyes"], [
156 AC_DEFINE(HAVE_LIBSOCIALWEB, [1],
157 [Define if you have the libsocialweb backend])
160 have_libsocialweb_backend=no
163 AS_IF([test "x$enable_libsocialweb_backend" = "xyes" -a \
164 "x$have_libsocialweb_backend" != "xyes"], [
165 AC_MSG_ERROR([Cannot find libsocialweb dependencies.])
168 AM_CONDITIONAL([ENABLE_LIBSOCIALWEB],
169 [test "x$have_libsocialweb_backend" = "xyes"])
171 # -----------------------------------------------------------
173 # -----------------------------------------------------------
177 VALADOC_REQUIRED=0.3.1
178 TRACKER_SPARQL_MAJOR=0.16
179 TRACKER_SPARQL_REQUIRED=0.15.2
180 EBOOK_REQUIRED=3.7.90
181 EDATASERVER_REQUIRED=3.5.3.1
182 ZEITGEIST_REQUIRED=0.3.14
185 AC_SUBST([TRACKER_SPARQL_MAJOR])
187 PKG_CHECK_MODULES([GLIB],
188 [glib-2.0 >= $GLIB_REQUIRED
189 gobject-2.0 >= $GLIB_REQUIRED])
190 PKG_CHECK_MODULES([GMODULE], [gmodule-no-export-2.0])
191 PKG_CHECK_MODULES([GIO], [gio-2.0 >= $GLIB_REQUIRED])
192 # FIXME: get rid of this when our dependencies stop using dbus-1 (GNOME#696177)
193 PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1 dbus-1])
195 PKG_CHECK_MODULES([GEE], [gee-0.8 >= $GEE_REQUIRED])
197 TP_GLIB_REQUIRED=0.19.0
198 AS_IF([test x$enable_telepathy_backend = xyes], [
199 PKG_CHECK_MODULES([TP_GLIB], [telepathy-glib >= $TP_GLIB_REQUIRED])
200 PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-1.0 >= $ZEITGEIST_REQUIRED],
201 have_zeitgeist="yes",have_zeitgeist="no")])
202 AS_IF([test "x$have_zeitgeist" == "xyes"], [
203 ZEITGEIST_VALAFLAGS="-D HAVE_ZEITGEIST"
204 AC_SUBST([ZEITGEIST_VALAFLAGS])
205 ZEITGEIST_PKG="--pkg zeitgeist-1.0"
206 AC_SUBST([ZEITGEIST_PKG])
209 # Ignore post 0.20 deprecations
210 TP_GLIB_CFLAGS="$TP_GLIB_CFLAGS -DTP_VERSION_MIN_REQUIRED=TP_VERSION_0_20"
211 # Prevent post 0.20 APIs
212 TP_GLIB_CFLAGS="$TP_GLIB_CFLAGS -DTP_VERSION_MAX_ALLOWED=TP_VERSION_0_20"
214 AS_IF([test x$enable_tracker_backend = xyes], [
215 PKG_CHECK_MODULES([TRACKER_SPARQL],
216 [tracker-sparql-$TRACKER_SPARQL_MAJOR >= \
217 $TRACKER_SPARQL_REQUIRED])
220 AS_IF([test x$enable_eds_backend = xyes], [
221 PKG_CHECK_MODULES([EBOOK], [libebook-1.2 >= $EBOOK_REQUIRED
222 libebook-contacts-1.2 >= $EBOOK_REQUIRED])
223 PKG_CHECK_MODULES([EDATASERVER], [libedataserver-1.2 >= $EDATASERVER_REQUIRED])
226 AS_IF([test x$enable_ofono_backend = xyes], [
227 PKG_CHECK_MODULES([EBOOK], [libebook-1.2 >= $EBOOK_REQUIRED])
231 # Vala building options -- allows tarball builds without installing Vala
233 AC_ARG_ENABLE([vala],
234 AS_HELP_STRING([--enable-vala],
235 [Enable building from the Vala sources]),
236 [enable_vala=$enableval],
239 # will be re-set as necessary below
240 AM_CONDITIONAL([HAVE_INTROSPECTION], [test "x$enable_vala" = "xyes"])
243 # Force Vala for non-release builds
244 m4_if(folks_released, [1], [],
247 echo "Vala compiler required for non-release builds; requiring Vala..."
250 # Force Vala if generated source is missing or outdated
252 ! -e ${sd}tools/folks_import_vala.stamp -o \
253 ! -e ${sd}tests/folks/abstract_field_details_vala.stamp -o \
254 ! -e ${sd}tests/folks/aggregation_vala.stamp -o \
255 ! -e ${sd}tests/folks/backend_loading_vala.stamp -o \
256 ! -e ${sd}tests/key-file/individual_retrieval_vala.stamp -o \
257 ! -e ${sd}tests/lib/folks-test.vapi -o \
258 ! -e ${sd}tests/lib/key-file/kf-test.vapi -o \
259 ! -e ${sd}tests/lib/key-file/libkf_test_la_vala.stamp -o \
260 ! -e ${sd}tests/lib/telepathy/contactlist/tp-test-contactlist.gir -o \
261 ! -e ${sd}tests/lib/telepathy/contactlist/tp-test-contactlist.vapi -o \
262 ! -e ${sd}tests/lib/libfolks_test_la_vala.stamp -o \
263 ! -e ${sd}tests/telepathy/persona_store_capabilities_vala.stamp -o \
264 ! -e ${sd}tests/telepathy/individual_retrieval_vala.stamp -o \
265 ! -e ${sd}tests/telepathy/individual_properties_vala.stamp -o \
266 ! -e ${sd}tests/folks/backend_loading_vala.stamp -o \
267 ! -e ${sd}backends/key-file/key_file_la_vala.stamp -o \
268 ! -e ${sd}backends/telepathy/telepathy_la_vala.stamp \
270 ! -e ${sd}backends/telepathy/lib/folks-telepathy.vapi -o \
271 ! -e ${sd}backends/telepathy/lib/tp-lowlevel.gir -o \
272 ! -e ${sd}backends/telepathy/lib/tp-lowlevel.vapi -o \
273 ! -e ${sd}backends/telepathy/lib/libfolks_telepathy_la_vala.stamp -o \
274 ! -e ${sd}folks/folks-internal.h -o \
275 ! -e ${sd}folks/folks-internal.vapi -o \
276 ! -e ${sd}folks/libfolks_internal_la_vala.stamp -o \
277 ! -e ${sd}folks/folks.vapi -o \
278 ! -e ${sd}folks/libfolks_la_vala.stamp \
281 echo "Vala source needs to be re-compiled; requiring Vala..."
284 AS_IF([test "x$enable_vala" = "xyes"], [
285 AM_PROG_VALAC([$VALA_REQUIRED])
286 AS_IF([test "x$VALAC" = "x"], [
287 AC_MSG_ERROR([Vala requested but valac is not installed])
290 AC_PATH_PROG([VAPIGEN], [vapigen], [])
291 AS_IF([test "x$VAPIGEN" = "x"], [
292 AC_MSG_ERROR([Vala must be built with --enable-vapigen])
295 # require GLib >= 2.24 so GLib.Array, etc. reffing is handled
297 AM_VALAFLAGS="--target-glib=2.24"
298 AC_SUBST([AM_VALAFLAGS])
299 AC_SUBST([VAPIGENFLAGS])
302 VALA_CHECK_PACKAGES([gio-2.0
305 AS_IF([test x$enable_telepathy_backend = xyes], [
306 VALA_CHECK_PACKAGES([telepathy-glib])
307 AS_IF([test "x$have_zeitgeist" == "xyes"], [
308 VALA_CHECK_PACKAGES([zeitgeist-1.0])
312 AS_IF([test x$enable_tracker_backend = xyes], [
313 VALA_CHECK_PACKAGES([tracker-sparql-$TRACKER_SPARQL_MAJOR])
316 AS_IF([test x$enable_eds_backend = xyes], [
317 VALA_CHECK_PACKAGES([libebook-1.2 libebook-contacts-1.2 libedataserver-1.2 libxml-2.0])
320 AS_IF([test x$enable_ofono_backend = xyes], [
321 VALA_CHECK_PACKAGES([libebook-1.2])
325 # this will set HAVE_INTROSPECTION
326 GOBJECT_INTROSPECTION_REQUIRE([1.30])
328 AM_CONDITIONAL([HAVE_VALA], [test "x$enable_vala" = "xyes"])
330 # Various functions that we need (used in C code generated from Vala)
331 AC_CHECK_FUNCS([memset])
332 AC_CHECK_FUNCS([strstr])
334 AM_CONDITIONAL([NOT_RELEASE], [test "x$folks_released" = "x0"])
336 # -----------------------------------------------------------
338 # -----------------------------------------------------------
340 FOLKS_MODULE_VERSION=folks_module_version
341 AC_SUBST([FOLKS_MODULE_VERSION])
342 AC_DEFINE([MODULE_VERSION], "folks_module_version", [Module interface version])
344 BACKEND_DIR='$(libdir)/folks/$(FOLKS_MODULE_VERSION)/backends'
345 AC_SUBST([BACKEND_DIR])
347 BACKEND_KF='$(top_builddir)/backends/key-file/.libs/key-file.so'
348 AC_SUBST([BACKEND_KF])
349 BACKEND_TP='$(top_builddir)/backends/telepathy/.libs/telepathy.so'
350 AC_SUBST([BACKEND_TP])
352 AS_IF([test x$have_libsocialweb_backend = xyes], [
353 BACKEND_LIBSOCIALWEB='$(top_builddir)/backends/libsocialweb/.libs/libsocialweb.so'
354 AC_SUBST([BACKEND_LIBSOCIALWEB])
357 AS_IF([test x$enable_tracker_backend = xyes], [
358 BACKEND_TRACKER='$(top_builddir)/backends/tracker/.libs/tracker.so'
359 AC_SUBST([BACKEND_TRACKER])
362 AS_IF([test x$enable_eds_backend = xyes], [
363 BACKEND_EDS='$(top_builddir)/backends/eds/.libs/eds.so'
364 AC_SUBST([BACKEND_EDS])
367 if test x$enable_ofono_backend = xyes; then
368 BACKEND_OFONO='$(top_builddir)/backends/ofono/.libs/ofono.so'
369 AC_SUBST([BACKEND_OFONO])
372 # All of the backend libraries in our tree; to be used by the tests
373 BACKEND_UNINST_PATH='$(BACKEND_KF):$(BACKEND_TP)'
374 AS_IF([test x$have_libsocialweb_backend = xyes], [
375 LIBSOCIALWEB_BACKEND_UNINST_PATH='$(BACKEND_LIBSOCIALWEB)'
376 BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$LIBSOCIALWEB_BACKEND_UNINST_PATH"
378 AS_IF([test x$enable_tracker_backend = xyes], [
379 TRACKER_BACKEND_UNINST_PATH='$(BACKEND_TRACKER)'
380 BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$TRACKER_BACKEND_UNINST_PATH"
382 AS_IF([test x$enable_eds_backend = xyes], [
383 EDS_BACKEND_UNINST_PATH='$(BACKEND_EDS)'
384 BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$EDS_BACKEND_UNINST_PATH"
386 AS_IF([test x$enable_ofono_backend = xyes], [
387 OFONO_BACKEND_UNINST_PATH='$(BACKEND_OFONO)'
388 BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$OFONO_BACKEND_UNINST_PATH"
390 AC_SUBST([BACKEND_UNINST_PATH])
392 # -----------------------------------------------------------
394 # -----------------------------------------------------------
396 AC_ARG_ENABLE([import-tool],
397 AS_HELP_STRING([--enable-import-tool],
398 [Enable building the meta-contact import tool]),
399 [enable_import_tool=$enableval with_import_tool=$enableval],
400 [enable_import_tool=maybe with_import_tool=no])
401 AS_IF([test "$enable_import_tool" != "no"],
402 [PKG_CHECK_MODULES([LIBXML], [libxml-2.0],
403 [with_import_tool=yes], [with_import_tool=no])])
404 AS_IF([test "$enable_import_tool" = "yes" -a "$with_import_tool" = "no"],
405 [AC_MSG_ERROR([Import tool explicitly enabled, but libxml2 not found])])
406 AM_CONDITIONAL([ENABLE_IMPORT_TOOL], [test "$with_import_tool" = "yes"])
408 # Readline's required for the folks-inspect program
409 AC_ARG_ENABLE([inspect-tool],
410 AS_HELP_STRING([--enable-inspect-tool],
411 [Enable building the data inspection tool]),
412 [enable_inspect_tool=$enableval with_inspect_tool=$enableval],
413 [enable_inspect_tool=maybe with_inspect_tool=no])
414 AS_IF([test "$enable_inspect_tool" = "yes" -a "$enable_vala" != "yes"],
415 [AC_MSG_ERROR([Inspect tool explicitly enabled, but Vala wasn't enabled \
416 using --enable-vala])])
417 AS_IF([test "$enable_inspect_tool" = "maybe" -a "$enable_vala" != "yes"],
418 [AC_MSG_NOTICE([Inspect tool disabled, as Vala wasn't enabled using \
420 AS_IF([test "$enable_inspect_tool" != "no" -a "x$enable_vala" = "xyes"],
421 [AC_CHECK_LIB([readline], [main],
422 [with_inspect_tool=yes], [with_inspect_tool=no],
424 AS_IF([test "$enable_inspect_tool" != "no" -a "$with_inspect_tool" = "yes" -a \
425 "x$enable_vala" = "xyes"],
426 [VALA_CHECK_PACKAGES([readline])
427 LIBREADLINE="-lreadline -lncurses"
428 AC_DEFINE([HAVE_LIBREADLINE], [1], [Define if you have libreadline])
429 AC_SUBST([LIBREADLINE])])
430 AS_IF([test "$enable_inspect_tool" = "yes" -a "$with_inspect_tool" = "no"],
431 [AC_MSG_ERROR([Inspect tool explicitly enabled, but readline not found])])
432 AM_CONDITIONAL([ENABLE_INSPECT_TOOL], [test "$with_inspect_tool" = "yes"])
434 # -----------------------------------------------------------
436 # -----------------------------------------------------------
438 AC_ARG_ENABLE([tests],
439 AS_HELP_STRING([--enable-tests],[Enable building of tests]),
440 [enable_tests=$enableval], [enable_tests=yes])
441 AS_IF([test "$enable_tests" = "yes" -a "$enable_telepathy_backend" = "no"],
442 [AC_MSG_ERROR([The Telepathy backend must be enabled to build tests])])
443 AM_CONDITIONAL([ENABLE_TESTS], [test x$enable_tests = xyes])
445 # -----------------------------------------------------------
447 # -----------------------------------------------------------
449 AC_ARG_ENABLE([docs],
450 AS_HELP_STRING([--enable-docs],[Enable documentation generation]),
451 [enable_docs=$enableval], [enable_docs=no])
452 AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_docs = xyes])
455 AS_IF([test x$enable_docs = xyes], [
456 # make sure the library is new enough and the program exists
457 PKG_CHECK_MODULES([VALADOC], [valadoc-1.0 >= $VALADOC_REQUIRED])
458 AC_PATH_PROG([VALADOC], [valadoc], [:])
459 AS_IF([test "$VALADOC" != :], have_valadoc=yes)
461 AM_CONDITIONAL([HAVE_VALADOC], [test x$have_valadoc = xyes])
463 AS_IF([test "x$enable_docs" = "xyes" -a "x$have_valadoc" != "xyes"], [
464 AC_MSG_ERROR([Doc building requested but valadoc not installed.])
467 # -----------------------------------------------------------
469 # -----------------------------------------------------------
471 GETTEXT_PACKAGE=AC_PACKAGE_NAME
472 AC_SUBST(GETTEXT_PACKAGE)
473 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
474 IT_PROG_INTLTOOL([0.50.0])
476 # -----------------------------------------------------------
478 # -----------------------------------------------------------
480 # Disable GLib deprecation warnings for now (#670196); GValueArray is deprecated
481 # but we need it for dbus-glib. Porting to GDBus will solve this (#653198)
482 AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
484 AS_COMPILER_FLAG([-Wall], [ERROR_CFLAGS="-Wall"], [ERROR_CFLAGS=""])
485 AS_COMPILER_FLAG([-Werror], [werror=yes], [werror=no])
487 AC_ARG_ENABLE([debug],
488 AS_HELP_STRING([--disable-debug],[compile without debug code]),
489 [enable_debug=$enableval], [enable_debug=yes])
491 AS_COMPILER_FLAG([-Wextra], [wextra=yes], [wextra=no])
492 AS_COMPILER_FLAG([-Wno-missing-field-initializers],
493 [wno_missing_field_initializers=yes],
494 [wno_missing_field_initializers=no])
495 AS_COMPILER_FLAG([-Wno-unused-parameter],
496 [wno_unused_parameter=yes], [wno_unused_parameter=no])
497 AS_COMPILER_FLAG([-Wstrict-prototypes], [wstrict_prototypes=yes],
498 [wstrict_prototypes=no])
499 AS_COMPILER_FLAG([-Wmissing-prototypes], [wmissing_prototypes=yes],
500 [wmissing_prototypes=no])
501 AS_COMPILER_FLAG([-Wimplicit-function-declaration],
502 [wimplicit_function_declaration=yes],
503 [wimplicit_function_declaration=no])
504 AS_COMPILER_FLAG([-Wpointer-arith], [wpointer_arith=yes], [wpointer_arith=no])
505 AS_COMPILER_FLAG([-Winit-self], [winit_self=yes], [winit_self=no])
506 AS_COMPILER_FLAG([-Wformat=2], [wformat=yes], [wformat=no])
507 AS_COMPILER_FLAG([-Wmissing-include-dirs], [wmissing_include_dirs=yes],
508 [wmissing_include_dirs=no])
509 AS_COMPILER_FLAG([-Waggregate-return], [waggregate_return=yes],
510 [waggregate_return=no])
511 AS_COMPILER_FLAG([-Wdeclaration-after-statement],
512 [wdeclaration_after_statement=yes],
513 [wdeclaration_after_statement=no])
515 m4_if(folks_released, [1], [],
517 # Iff we support -Werror, then use it with all our compiler warnings.
518 if test x$werror = xyes; then
524 if test x$wextra = xyes -a \
525 x$wno_missing_field_initializers = xyes -a \
526 x$wno_unused_parameter = xyes -a x$wstrict_prototypes = xyes -a \
527 x$wmissing_prototypes = xyes -a \
528 x$wimplicit_function_declaration = xyes -a x$wpointer_arith = xyes \
529 -a x$winit_self = xyes -a x$wformat = xyes -a \
530 x$wmissing_include_dirs = xyes -a x$waggregate_return = xyes -a \
531 x$wdeclaration_after_statement = xyes; then
532 ERROR_CFLAGS="$ERROR_CFLAGS -Wextra \
533 -Wno-missing-field-initializers \
534 -Wno-unused-parameter ${flag}strict-prototypes \
535 ${flag}missing-prototypes ${flag}implicit-function-declaration \
536 ${flag}pointer-arith ${flag}init-self ${flag}format=2 \
537 ${flag}missing-include-dirs ${flag}aggregate-return \
538 ${flag}declaration-after-statement"
542 AS_COMPILER_FLAG([-D_POSIX_SOURCE], [ERROR_CFLAGS="$ERROR_CFLAGS -D_POSIX_SOURCE"])
543 AS_COMPILER_FLAG([-std=c99], [ERROR_CFLAGS="$ERROR_CFLAGS -std=c99"])
544 AS_COMPILER_FLAG([-Wshadow], [ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow"])
545 AS_COMPILER_FLAG([-Wmissing-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
546 -Wmissing-prototypes"])
547 AS_COMPILER_FLAG([-Wmissing-declarations], [ERROR_CFLAGS="$ERROR_CFLAGS \
548 -Wmissing-declarations"])
549 AS_COMPILER_FLAG([-Wstrict-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
550 -Wstrict-prototypes"])
552 AC_SUBST([ERROR_CFLAGS])
554 # -----------------------------------------------------------
555 # Code coverage flags
556 # -----------------------------------------------------------
558 AC_ARG_ENABLE([code-coverage],
559 AS_HELP_STRING([--enable-code-coverage],
560 [compile with code coverage code]),
561 [enable_code_coverage=$enableval], [enable_code_coverage=no])
563 # Only enable code coverage if this isn't a release.
564 m4_if(folks_released, [1], [],
566 if test "x$GCC" = "xyes"; then
567 if test "x$enable_code_coverage" = "xyes"; then
568 CODE_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage -O0 -ggdb"
569 CODE_COVERAGE_LDFLAGS="-lgcov"
574 AC_SUBST([CODE_COVERAGE_CFLAGS])
575 AC_SUBST([CODE_COVERAGE_LDFLAGS])
578 AC_ARG_ENABLE([fatal-warnings],
579 AS_HELP_STRING([--disable-fatal-warnings],
580 [Make warnings from valac and g-ir-scanner non-fatal]),
581 [enable_fatal_warnings=$enableval], [enable_fatal_warnings=yes])
582 AS_IF([test "x$enable_vala" = "xyes" && test "x$enable_fatal_warnings" = "xyes"],
583 [ERROR_INTROSPECTION_SCANNER_ARGS="\
584 $ERROR_INTROSPECTION_SCANNER_ARGS --warn-error"
585 ERROR_VALAFLAGS="$ERROR_VALAFLAGS --fatal-warnings"])
587 # Disable -g if we're building with code coverage enabled, since Vala's
588 # insertion of #line directives into .c files confuses lcov. For the moment,
589 # we'll have to do with looking at code coverage of the generated C files only.
590 # We set the debug flags in CODE_COVERAGE_CFLAGS instead in that case.
591 m4_if(folks_released, [1], [],
593 if test "x$enable_code_coverage" != "xyes" -o "x$GCC" != "xyes"; then
594 ERROR_VALAFLAGS="$ERROR_VALAFLAGS -g"
598 AC_SUBST([ERROR_INTROSPECTION_SCANNER_ARGS])
599 AC_SUBST([ERROR_VALAFLAGS])
601 # -----------------------------------------------------------
603 # -----------------------------------------------------------
605 AC_ARG_ENABLE([profiling],
606 AS_HELP_STRING([--enable-profiling],
607 [Enable building profiling points]),
608 [enable_profiling=$enableval],
609 [enable_profiling=no])
610 AM_CONDITIONAL([ENABLE_PROFILING], [test "$enable_profiling" = "yes"])
612 # -----------------------------------------------------------
614 # -----------------------------------------------------------
617 backends/telepathy/lib/folks-telepathy.pc
618 backends/telepathy/lib/folks-telepathy-uninstalled.pc
619 backends/tracker/lib/folks-tracker.deps
620 backends/tracker/lib/folks-tracker.pc
621 backends/tracker/lib/folks-tracker-uninstalled.pc
622 backends/eds/lib/folks-eds.pc
623 backends/eds/lib/folks-eds-uninstalled.pc
625 folks/folks-uninstalled.pc
626 folks/org.freedesktop.folks.gschema.xml
629 backends/key-file/Makefile
630 backends/libsocialweb/Makefile
631 backends/libsocialweb/lib/Makefile
632 backends/libsocialweb/lib/folks-libsocialweb.pc
633 backends/libsocialweb/lib/folks-libsocialweb-uninstalled.pc
634 backends/telepathy/Makefile
635 backends/telepathy/lib/Makefile
636 backends/tracker/Makefile
637 backends/tracker/lib/Makefile
638 backends/eds/Makefile
639 backends/eds/lib/Makefile
640 backends/ofono/Makefile
648 tests/key-file/Makefile
649 tests/libsocialweb/Makefile
650 tests/telepathy/Makefile
651 tests/tracker/Makefile
653 tests/lib/folks-test-uninstalled.pc
654 tests/lib/eds/Makefile
655 tests/lib/key-file/Makefile
656 tests/lib/libsocialweb/Makefile
657 tests/lib/telepathy/Makefile
658 tests/lib/tracker/Makefile
659 tests/lib/telepathy/contactlist/Makefile
660 tests/lib/telepathy/contactlist/session.conf
663 tools/inspect/Makefile
671 Vala........................: ${enable_vala}
672 Vala Compiler...............: ${VALAC}
673 C Compiler Flags............: ${CFLAGS} ${ERROR_CFLAGS} ${CODE_COVERAGE_CFLAGS}
674 Linker Flags................: ${LDFLAGS} ${CODE_COVERAGE_LDFLAGS}
675 Prefix......................: ${prefix}
676 Bugreporting URL............: ${PACKAGE_BUGREPORT}
677 Documentation...............: ${have_valadoc}
678 Import tool.................: ${with_import_tool}
679 Inspector tool..............: ${with_inspect_tool}
680 Telepathy backend...........: ${enable_telepathy_backend}
681 Tracker backend.............: ${enable_tracker_backend}
682 Libsocialweb backend........: ${have_libsocialweb_backend}
683 E-D-S backend...............: ${enable_eds_backend}
684 Ofono backend...............: ${enable_ofono_backend}
685 Zeitgeist support...........: ${have_zeitgeist}
686 Build tests.................: ${enable_tests}