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 AC_ARG_ENABLE(zeitgeist,
132 AC_HELP_STRING([--enable-zeitgeist],
133 [ build Zeitgeist support in the Telepathy backend]),
134 enable_zeitgeist=$enableval,
135 enable_zeitgeist=auto)
137 # Automatically check the dependencies for the libsocialweb backend
138 SW_CLIENT_REQUIRED=0.25.20
139 AC_ARG_ENABLE(libsocialweb-backend,
140 AC_HELP_STRING([--enable-libsocialweb-backend=@<:@no/yes/auto@:>@],
141 [build the Libsocialweb backend (default: auto)]),
142 enable_libsocialweb_backend=$enableval,
143 enable_libsocialweb_backend=auto )
145 # this may be overwritten farther down
146 AC_DEFINE(HAVE_LIBSOCIALWEB, [0],
147 [Define as 1 if you have the libsocialweb backend])
148 AS_IF([test "x$enable_libsocialweb_backend" != "xno"], [
149 PKG_CHECK_MODULES([SW_CLIENT], [libsocialweb-client >= $SW_CLIENT_REQUIRED],
150 have_libsocialweb_backend="yes", have_libsocialweb_backend="no")
151 AS_IF([test "x$have_libsocialweb_backend" = "xyes" -a \
152 "x$enable_vala" = "xyes"], [
153 VALA_CHECK_PACKAGES([telepathy-glib
156 libsocialweb-client],
158 have_libsocialweb_backend="no")
161 AS_IF([test "x$have_libsocialweb_backend" = "xyes"], [
162 AC_DEFINE(HAVE_LIBSOCIALWEB, [1],
163 [Define if you have the libsocialweb backend])
166 have_libsocialweb_backend=no
169 AS_IF([test "x$enable_libsocialweb_backend" = "xyes" -a \
170 "x$have_libsocialweb_backend" != "xyes"], [
171 AC_MSG_ERROR([Cannot find libsocialweb dependencies.])
174 AM_CONDITIONAL([ENABLE_LIBSOCIALWEB],
175 [test "x$have_libsocialweb_backend" = "xyes"])
177 # -----------------------------------------------------------
179 # -----------------------------------------------------------
183 VALADOC_REQUIRED=0.3.1
184 TRACKER_SPARQL_MAJOR=0.16
185 TRACKER_SPARQL_REQUIRED=0.15.2
186 EBOOK_REQUIRED=3.7.90
187 EDATASERVER_REQUIRED=3.5.3.1
188 ZEITGEIST_REQUIRED=0.3.14
191 AC_SUBST([TRACKER_SPARQL_MAJOR])
193 PKG_CHECK_MODULES([GLIB],
194 [glib-2.0 >= $GLIB_REQUIRED
195 gobject-2.0 >= $GLIB_REQUIRED])
196 PKG_CHECK_MODULES([GMODULE], [gmodule-no-export-2.0])
197 PKG_CHECK_MODULES([GIO], [gio-2.0 >= $GLIB_REQUIRED])
198 # FIXME: get rid of this when our dependencies stop using dbus-1 (GNOME#696177)
199 PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1 dbus-1])
201 PKG_CHECK_MODULES([GEE], [gee-0.8 >= $GEE_REQUIRED])
203 TP_GLIB_REQUIRED=0.19.0
205 AS_IF([test x$enable_telepathy_backend = xyes], [
206 PKG_CHECK_MODULES([TP_GLIB], [telepathy-glib >= $TP_GLIB_REQUIRED])])
207 case "x$enable_zeitgeist" in
209 AS_IF([test x$enable_telepathy_backend = xyes],
210 [PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-1.0 >= $ZEITGEIST_REQUIRED])]
211 [AC_MSG_ERROR([Zeitgeist support requires Zeitgeist development package])])
215 AS_IF([test x$enable_telepathy_backend = xyes],
216 [PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-1.0 >= $ZEITGEIST_REQUIRED],
217 have_zeitgeist="yes",have_zeitgeist="no")],
224 AC_MSG_ERROR([Unknown --enable-zeitgeist argument: $enable_zeitgeist])
227 AS_IF([test "x$have_zeitgeist" == "xyes"], [
228 ZEITGEIST_VALAFLAGS="-D HAVE_ZEITGEIST"
229 AC_SUBST([ZEITGEIST_VALAFLAGS])
230 ZEITGEIST_PKG="--pkg zeitgeist-1.0"
231 AC_SUBST([ZEITGEIST_PKG])
234 # Ignore post 0.20 deprecations
235 TP_GLIB_CFLAGS="$TP_GLIB_CFLAGS -DTP_VERSION_MIN_REQUIRED=TP_VERSION_0_20"
236 # Prevent post 0.20 APIs
237 TP_GLIB_CFLAGS="$TP_GLIB_CFLAGS -DTP_VERSION_MAX_ALLOWED=TP_VERSION_0_20"
239 AS_IF([test x$enable_tracker_backend = xyes], [
240 PKG_CHECK_MODULES([TRACKER_SPARQL],
241 [tracker-sparql-$TRACKER_SPARQL_MAJOR >= \
242 $TRACKER_SPARQL_REQUIRED])
245 AS_IF([test x$enable_eds_backend = xyes], [
246 PKG_CHECK_MODULES([EBOOK], [libebook-1.2 >= $EBOOK_REQUIRED
247 libebook-contacts-1.2 >= $EBOOK_REQUIRED])
248 PKG_CHECK_MODULES([EDATASERVER], [libedataserver-1.2 >= $EDATASERVER_REQUIRED])
251 AS_IF([test x$enable_ofono_backend = xyes], [
252 PKG_CHECK_MODULES([EBOOK], [libebook-1.2 >= $EBOOK_REQUIRED])
256 # Vala building options -- allows tarball builds without installing Vala
258 AC_ARG_ENABLE([vala],
259 AS_HELP_STRING([--enable-vala],
260 [Enable building from the Vala sources]),
261 [enable_vala=$enableval],
264 # will be re-set as necessary below
265 AM_CONDITIONAL([HAVE_INTROSPECTION], [test "x$enable_vala" = "xyes"])
268 # Force Vala for non-release builds
269 m4_if(folks_released, [1], [],
272 echo "Vala compiler required for non-release builds; requiring Vala..."
275 # Force Vala if generated source is missing or outdated
277 ! -e ${sd}tools/folks_import_vala.stamp -o \
278 ! -e ${sd}tests/folks/abstract_field_details_vala.stamp -o \
279 ! -e ${sd}tests/folks/aggregation_vala.stamp -o \
280 ! -e ${sd}tests/folks/backend_loading_vala.stamp -o \
281 ! -e ${sd}tests/key-file/individual_retrieval_vala.stamp -o \
282 ! -e ${sd}tests/lib/folks-test.vapi -o \
283 ! -e ${sd}tests/lib/key-file/kf-test.vapi -o \
284 ! -e ${sd}tests/lib/key-file/libkf_test_la_vala.stamp -o \
285 ! -e ${sd}tests/lib/telepathy/contactlist/tp-test-contactlist.gir -o \
286 ! -e ${sd}tests/lib/telepathy/contactlist/tp-test-contactlist.vapi -o \
287 ! -e ${sd}tests/lib/libfolks_test_la_vala.stamp -o \
288 ! -e ${sd}tests/telepathy/persona_store_capabilities_vala.stamp -o \
289 ! -e ${sd}tests/telepathy/individual_retrieval_vala.stamp -o \
290 ! -e ${sd}tests/telepathy/individual_properties_vala.stamp -o \
291 ! -e ${sd}tests/folks/backend_loading_vala.stamp -o \
292 ! -e ${sd}backends/key-file/key_file_la_vala.stamp -o \
293 ! -e ${sd}backends/telepathy/telepathy_la_vala.stamp \
295 ! -e ${sd}backends/telepathy/lib/folks-telepathy.vapi -o \
296 ! -e ${sd}backends/telepathy/lib/tp-lowlevel.gir -o \
297 ! -e ${sd}backends/telepathy/lib/tp-lowlevel.vapi -o \
298 ! -e ${sd}backends/telepathy/lib/libfolks_telepathy_la_vala.stamp -o \
299 ! -e ${sd}folks/folks-internal.h -o \
300 ! -e ${sd}folks/folks-internal.vapi -o \
301 ! -e ${sd}folks/libfolks_internal_la_vala.stamp -o \
302 ! -e ${sd}folks/folks.vapi -o \
303 ! -e ${sd}folks/libfolks_la_vala.stamp \
306 echo "Vala source needs to be re-compiled; requiring Vala..."
309 AS_IF([test "x$enable_vala" = "xyes"], [
310 AM_PROG_VALAC([$VALA_REQUIRED])
311 AS_IF([test "x$VALAC" = "x"], [
312 AC_MSG_ERROR([Vala requested but valac is not installed])
315 AC_PATH_PROG([VAPIGEN], [vapigen], [])
316 AS_IF([test "x$VAPIGEN" = "x"], [
317 AC_MSG_ERROR([Vala must be built with --enable-vapigen])
320 # require GLib >= 2.24 so GLib.Array, etc. reffing is handled
322 AM_VALAFLAGS="--target-glib=2.24"
323 # within the libfolks tree, select inline code paths
324 AM_VALAFLAGS="$AM_VALAFLAGS -D FOLKS_COMPILATION"
325 AC_SUBST([AM_VALAFLAGS])
326 AC_SUBST([VAPIGENFLAGS])
329 VALA_CHECK_PACKAGES([gio-2.0
332 AS_IF([test x$enable_telepathy_backend = xyes], [
333 VALA_CHECK_PACKAGES([telepathy-glib])
334 AS_IF([test "x$have_zeitgeist" == "xyes"], [
335 VALA_CHECK_PACKAGES([zeitgeist-1.0])
339 AS_IF([test x$enable_tracker_backend = xyes], [
340 VALA_CHECK_PACKAGES([tracker-sparql-$TRACKER_SPARQL_MAJOR])
343 AS_IF([test x$enable_eds_backend = xyes], [
344 VALA_CHECK_PACKAGES([libebook-1.2 libebook-contacts-1.2 libedataserver-1.2 libxml-2.0])
347 AS_IF([test x$enable_ofono_backend = xyes], [
348 VALA_CHECK_PACKAGES([libebook-1.2])
352 # this will set HAVE_INTROSPECTION
353 GOBJECT_INTROSPECTION_REQUIRE([1.30])
355 AM_CONDITIONAL([HAVE_VALA], [test "x$enable_vala" = "xyes"])
357 # Various functions that we need (used in C code generated from Vala)
358 AC_CHECK_FUNCS([memset])
359 AC_CHECK_FUNCS([strstr])
361 AM_CONDITIONAL([NOT_RELEASE], [test "x$folks_released" = "x0"])
363 # -----------------------------------------------------------
365 # -----------------------------------------------------------
367 FOLKS_MODULE_VERSION=folks_module_version
368 AC_SUBST([FOLKS_MODULE_VERSION])
369 AC_DEFINE([MODULE_VERSION], "folks_module_version", [Module interface version])
371 BACKEND_DIR='$(libdir)/folks/$(FOLKS_MODULE_VERSION)/backends'
372 AC_SUBST([BACKEND_DIR])
374 # -----------------------------------------------------------
376 # -----------------------------------------------------------
378 AC_ARG_ENABLE([import-tool],
379 AS_HELP_STRING([--enable-import-tool],
380 [Enable building the meta-contact import tool]),
381 [enable_import_tool=$enableval with_import_tool=$enableval],
382 [enable_import_tool=maybe with_import_tool=no])
383 AS_IF([test "$enable_import_tool" != "no"],
384 [PKG_CHECK_MODULES([LIBXML], [libxml-2.0],
385 [with_import_tool=yes], [with_import_tool=no])])
386 AS_IF([test "$enable_import_tool" = "yes" -a "$with_import_tool" = "no"],
387 [AC_MSG_ERROR([Import tool explicitly enabled, but libxml2 not found])])
388 AM_CONDITIONAL([ENABLE_IMPORT_TOOL], [test "$with_import_tool" = "yes"])
390 # Readline's required for the folks-inspect program
391 AC_ARG_ENABLE([inspect-tool],
392 AS_HELP_STRING([--enable-inspect-tool],
393 [Enable building the data inspection tool]),
394 [enable_inspect_tool=$enableval with_inspect_tool=$enableval],
395 [enable_inspect_tool=maybe with_inspect_tool=no])
396 AS_IF([test "$enable_inspect_tool" = "yes" -a "$enable_vala" != "yes"],
397 [AC_MSG_ERROR([Inspect tool explicitly enabled, but Vala wasn't enabled \
398 using --enable-vala])])
399 AS_IF([test "$enable_inspect_tool" = "maybe" -a "$enable_vala" != "yes"],
400 [AC_MSG_NOTICE([Inspect tool disabled, as Vala wasn't enabled using \
402 AS_IF([test "$enable_inspect_tool" != "no" -a "x$enable_vala" = "xyes"],
403 [AC_CHECK_LIB([readline], [main],
404 [with_inspect_tool=yes], [with_inspect_tool=no],
406 AS_IF([test "$enable_inspect_tool" != "no" -a "$with_inspect_tool" = "yes" -a \
407 "x$enable_vala" = "xyes"],
408 [VALA_CHECK_PACKAGES([readline])
409 LIBREADLINE="-lreadline -lncurses"
410 AC_DEFINE([HAVE_LIBREADLINE], [1], [Define if you have libreadline])
411 AC_SUBST([LIBREADLINE])])
412 AS_IF([test "$enable_inspect_tool" = "yes" -a "$with_inspect_tool" = "no"],
413 [AC_MSG_ERROR([Inspect tool explicitly enabled, but readline not found])])
414 AM_CONDITIONAL([ENABLE_INSPECT_TOOL], [test "$with_inspect_tool" = "yes"])
416 # -----------------------------------------------------------
418 # -----------------------------------------------------------
420 AC_ARG_ENABLE([tests],
421 AS_HELP_STRING([--enable-tests],[Enable building of tests]),
422 [enable_tests=$enableval], [enable_tests=yes])
423 AM_CONDITIONAL([ENABLE_TESTS], [test x$enable_tests = xyes])
425 # -----------------------------------------------------------
427 # -----------------------------------------------------------
429 AC_ARG_ENABLE([docs],
430 AS_HELP_STRING([--enable-docs],[Enable documentation generation]),
431 [enable_docs=$enableval], [enable_docs=no])
432 AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_docs = xyes])
435 AS_IF([test x$enable_docs = xyes], [
436 # make sure the library is new enough and the program exists
437 PKG_CHECK_MODULES([VALADOC], [valadoc-1.0 >= $VALADOC_REQUIRED])
438 AC_PATH_PROG([VALADOC], [valadoc], [:])
439 AS_IF([test "$VALADOC" != :], have_valadoc=yes)
441 AM_CONDITIONAL([HAVE_VALADOC], [test x$have_valadoc = xyes])
443 AS_IF([test "x$enable_docs" = "xyes" -a "x$have_valadoc" != "xyes"], [
444 AC_MSG_ERROR([Doc building requested but valadoc not installed.])
447 # -----------------------------------------------------------
449 # -----------------------------------------------------------
451 GETTEXT_PACKAGE=AC_PACKAGE_NAME
452 AC_SUBST(GETTEXT_PACKAGE)
453 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
454 IT_PROG_INTLTOOL([0.50.0])
456 # -----------------------------------------------------------
458 # -----------------------------------------------------------
460 # Disable GLib deprecation warnings for now (#670196); GValueArray is deprecated
461 # but we need it for dbus-glib. Porting to GDBus will solve this (#653198)
462 AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
464 # C_ERROR_CFLAGS are only used for C code from telepathy-glib for now,
465 # while ERROR_CFLAGS are used for everything.
469 AC_ARG_ENABLE([fatal-warnings],
470 AS_HELP_STRING([--disable-fatal-warnings],
471 [Make various warnings non-fatal]),
472 [enable_fatal_warnings=$enableval], [enable_fatal_warnings=yes])
474 AC_DEFUN([FOLKS_ADD_WARNING],
476 AS_COMPILER_FLAG([-Werror=$2],
478 AS_IF([test "x$enable_fatal_warnings" = xyes],
479 [$1="[$]$1 -Werror=$2"],
484 # It isn't 1970 any more. Require that we write proper ISO C with declarations,
485 # avoiding hard-to-trace bugs on platforms where sizeof(int) != sizeof(void *).
486 FOLKS_ADD_WARNING([ERROR_CFLAGS], [implicit])
487 FOLKS_ADD_WARNING([ERROR_CFLAGS], [missing-declarations])
488 FOLKS_ADD_WARNING([ERROR_CFLAGS], [missing-parameter-type])
489 FOLKS_ADD_WARNING([ERROR_CFLAGS], [missing-prototypes])
490 FOLKS_ADD_WARNING([ERROR_CFLAGS], [nested-externs])
491 FOLKS_ADD_WARNING([ERROR_CFLAGS], [old-style-declaration])
492 FOLKS_ADD_WARNING([ERROR_CFLAGS], [old-style-definition])
493 FOLKS_ADD_WARNING([ERROR_CFLAGS], [strict-prototypes])
495 AS_COMPILER_FLAG([-Wall], [C_ERROR_CFLAGS="-Wall"], [C_ERROR_CFLAGS=""])
496 AS_COMPILER_FLAG([-Werror], [werror=yes], [werror=no])
498 AC_ARG_ENABLE([debug],
499 AS_HELP_STRING([--disable-debug],[compile without debug code]),
500 [enable_debug=$enableval], [enable_debug=yes])
502 AS_COMPILER_FLAG([-Wextra], [wextra=yes], [wextra=no])
503 AS_COMPILER_FLAG([-Wno-missing-field-initializers],
504 [wno_missing_field_initializers=yes],
505 [wno_missing_field_initializers=no])
506 AS_COMPILER_FLAG([-Wno-unused-parameter],
507 [wno_unused_parameter=yes], [wno_unused_parameter=no])
508 AS_COMPILER_FLAG([-Wstrict-prototypes], [wstrict_prototypes=yes],
509 [wstrict_prototypes=no])
510 AS_COMPILER_FLAG([-Wmissing-prototypes], [wmissing_prototypes=yes],
511 [wmissing_prototypes=no])
512 AS_COMPILER_FLAG([-Wimplicit-function-declaration],
513 [wimplicit_function_declaration=yes],
514 [wimplicit_function_declaration=no])
515 AS_COMPILER_FLAG([-Wpointer-arith], [wpointer_arith=yes], [wpointer_arith=no])
516 AS_COMPILER_FLAG([-Winit-self], [winit_self=yes], [winit_self=no])
517 AS_COMPILER_FLAG([-Wformat=2], [wformat=yes], [wformat=no])
518 AS_COMPILER_FLAG([-Wmissing-include-dirs], [wmissing_include_dirs=yes],
519 [wmissing_include_dirs=no])
520 AS_COMPILER_FLAG([-Waggregate-return], [waggregate_return=yes],
521 [waggregate_return=no])
522 AS_COMPILER_FLAG([-Wdeclaration-after-statement],
523 [wdeclaration_after_statement=yes],
524 [wdeclaration_after_statement=no])
526 m4_if(folks_released, [1], [],
528 # Iff we support -Werror, then use it with all our compiler warnings.
529 if test x$werror = xyes; then
535 if test x$wextra = xyes -a \
536 x$wno_missing_field_initializers = xyes -a \
537 x$wno_unused_parameter = xyes -a x$wstrict_prototypes = xyes -a \
538 x$wmissing_prototypes = xyes -a \
539 x$wimplicit_function_declaration = xyes -a x$wpointer_arith = xyes \
540 -a x$winit_self = xyes -a x$wformat = xyes -a \
541 x$wmissing_include_dirs = xyes -a x$waggregate_return = xyes -a \
542 x$wdeclaration_after_statement = xyes; then
543 C_ERROR_CFLAGS="$C_ERROR_CFLAGS -Wextra \
544 -Wno-missing-field-initializers \
545 -Wno-unused-parameter ${flag}strict-prototypes \
546 ${flag}missing-prototypes ${flag}implicit-function-declaration \
547 ${flag}pointer-arith ${flag}init-self ${flag}format=2 \
548 ${flag}missing-include-dirs ${flag}aggregate-return \
549 ${flag}declaration-after-statement"
553 AS_COMPILER_FLAG([-D_POSIX_SOURCE], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -D_POSIX_SOURCE"])
554 AS_COMPILER_FLAG([-std=c99], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -std=c99"])
555 AS_COMPILER_FLAG([-Wshadow], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -Wshadow"])
556 AS_COMPILER_FLAG([-Wmissing-prototypes], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
557 -Wmissing-prototypes"])
558 AS_COMPILER_FLAG([-Wmissing-declarations], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
559 -Wmissing-declarations"])
560 AS_COMPILER_FLAG([-Wstrict-prototypes], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
561 -Wstrict-prototypes"])
563 AC_SUBST([ERROR_CFLAGS])
564 AC_SUBST([C_ERROR_CFLAGS])
566 # -----------------------------------------------------------
567 # Code coverage flags
568 # -----------------------------------------------------------
570 AC_ARG_ENABLE([code-coverage],
571 AS_HELP_STRING([--enable-code-coverage],
572 [compile with code coverage code]),
573 [enable_code_coverage=$enableval], [enable_code_coverage=no])
575 # Only enable code coverage if this isn't a release.
576 m4_if(folks_released, [1], [],
578 if test "x$GCC" = "xyes"; then
579 if test "x$enable_code_coverage" = "xyes"; then
580 CODE_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage -O0 -ggdb"
581 CODE_COVERAGE_LDFLAGS="-lgcov"
586 AC_SUBST([CODE_COVERAGE_CFLAGS])
587 AC_SUBST([CODE_COVERAGE_LDFLAGS])
590 AS_IF([test "x$enable_vala" = "xyes" && test "x$enable_fatal_warnings" = "xyes"],
591 [ERROR_INTROSPECTION_SCANNER_ARGS="\
592 $ERROR_INTROSPECTION_SCANNER_ARGS --warn-error"
593 ERROR_VALAFLAGS="$ERROR_VALAFLAGS --fatal-warnings"])
595 # Disable -g if we're building with code coverage enabled, since Vala's
596 # insertion of #line directives into .c files confuses lcov. For the moment,
597 # we'll have to do with looking at code coverage of the generated C files only.
598 # We set the debug flags in CODE_COVERAGE_CFLAGS instead in that case.
599 m4_if(folks_released, [1], [],
601 if test "x$enable_code_coverage" != "xyes" -o "x$GCC" != "xyes"; then
602 ERROR_VALAFLAGS="$ERROR_VALAFLAGS -g"
606 AC_SUBST([ERROR_INTROSPECTION_SCANNER_ARGS])
607 AC_SUBST([ERROR_VALAFLAGS])
609 # -----------------------------------------------------------
611 # -----------------------------------------------------------
613 AC_ARG_ENABLE([profiling],
614 AS_HELP_STRING([--enable-profiling],
615 [Enable building profiling points]),
616 [enable_profiling=$enableval],
617 [enable_profiling=no])
618 AM_CONDITIONAL([ENABLE_PROFILING], [test "$enable_profiling" = "yes"])
620 # -----------------------------------------------------------
622 # -----------------------------------------------------------
625 backends/telepathy/lib/folks-telepathy.pc
626 backends/telepathy/lib/folks-telepathy-uninstalled.pc
627 backends/tracker/lib/folks-tracker.deps
628 backends/tracker/lib/folks-tracker.pc
629 backends/tracker/lib/folks-tracker-uninstalled.pc
630 backends/eds/lib/folks-eds.pc
631 backends/eds/lib/folks-eds-uninstalled.pc
633 folks/folks-uninstalled.pc
634 folks/org.freedesktop.folks.gschema.xml
637 backends/key-file/Makefile
638 backends/libsocialweb/Makefile
639 backends/libsocialweb/lib/Makefile
640 backends/libsocialweb/lib/folks-libsocialweb.pc
641 backends/libsocialweb/lib/folks-libsocialweb-uninstalled.pc
642 backends/telepathy/Makefile
643 backends/telepathy/lib/Makefile
644 backends/tracker/Makefile
645 backends/tracker/lib/Makefile
646 backends/eds/Makefile
647 backends/eds/lib/Makefile
648 backends/ofono/Makefile
656 tests/key-file/Makefile
657 tests/libsocialweb/Makefile
658 tests/telepathy/Makefile
659 tests/tracker/Makefile
661 tests/lib/folks-test-uninstalled.pc
662 tests/lib/eds/Makefile
663 tests/lib/key-file/Makefile
664 tests/lib/libsocialweb/Makefile
665 tests/lib/telepathy/Makefile
666 tests/lib/tracker/Makefile
667 tests/lib/telepathy/contactlist/Makefile
670 tools/inspect/Makefile
678 Vala........................: ${enable_vala}
679 Vala Compiler...............: ${VALAC}
680 C Compiler Flags............: ${CFLAGS} ${ERROR_CFLAGS} ${CODE_COVERAGE_CFLAGS}
681 Linker Flags................: ${LDFLAGS} ${CODE_COVERAGE_LDFLAGS}
682 Prefix......................: ${prefix}
683 Bugreporting URL............: ${PACKAGE_BUGREPORT}
684 Documentation...............: ${have_valadoc}
685 Import tool.................: ${with_import_tool}
686 Inspector tool..............: ${with_inspect_tool}
687 Telepathy backend...........: ${enable_telepathy_backend}
688 Tracker backend.............: ${enable_tracker_backend}
689 Libsocialweb backend........: ${have_libsocialweb_backend}
690 E-D-S backend...............: ${enable_eds_backend}
691 Ofono backend...............: ${enable_ofono_backend}
692 Zeitgeist support...........: ${have_zeitgeist}
693 Build tests.................: ${enable_tests}