1 # If not 1, append datestamp to the version number
2 m4_define([folks_released], [1])
4 m4_define([folks_major_version], [0])
5 m4_define([folks_minor_version], [9])
6 m4_define([folks_micro_version], [5])
7 m4_define([folks_nano_version], [0])
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], [41])
15 m4_define([folks_lt_revision], [0])
16 m4_define([folks_lt_age], [16])
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])
56 # Always look for .pc files in /folks so backend support libraries can be
57 # introspected properly
58 PKG_CONFIG_PATH=$(pwd)/folks:$PKG_CONFIG_PATH
59 AC_SUBST([PKG_CONFIG_PATH])
65 LT_CURRENT=folks_lt_current
66 LT_REVISION=folks_lt_revision
68 AC_SUBST([LT_CURRENT])
69 AC_SUBST([LT_REVISION])
72 FOLKS_MAJOR_MINOR_VERSION=folks_major_minor_version
73 AC_SUBST([FOLKS_MAJOR_MINOR_VERSION])
76 AC_SUBST([API_VERSION_MAJOR])
78 AC_SUBST([API_VERSION_MINOR])
79 API_VERSION_DOT=$API_VERSION_MAJOR.$API_VERSION_MINOR
80 AC_SUBST([API_VERSION_DOT])
82 AC_ARG_ENABLE(tracker-backend,
83 AC_HELP_STRING([--enable-tracker-backend],
84 [ build the Tracker backend]),
85 enable_tracker_backend=$enableval,
86 enable_tracker_backend=no )
88 AM_CONDITIONAL([ENABLE_TRACKER], [test "x$enable_tracker_backend" = "xyes"])
90 AS_IF([test "x$enable_tracker_backend" = "xyes"], [
91 AC_DEFINE(HAVE_TRACKER, [1],
92 [Define as 1 if you have the Tracker backend])
94 AC_DEFINE(HAVE_TRACKER, [0],
95 [Define as 1 if you have the Tracker backend])
98 AC_ARG_ENABLE(eds-backend,
99 AC_HELP_STRING([--enable-eds-backend],
100 [ build the E-D-S backend]),
101 enable_eds_backend=$enableval,
102 enable_eds_backend=yes )
104 AS_IF([test "x$enable_eds_backend" = "xyes"], [
105 AC_DEFINE(HAVE_EDS, [1], [Define as 1 if you have the eds backend])
107 AC_DEFINE(HAVE_EDS, [0], [Define as 1 if you have the eds backend])
110 AM_CONDITIONAL([ENABLE_EDS], [test "x$enable_eds_backend" = "xyes"])
112 AC_ARG_ENABLE(ofono-backend,
113 AC_HELP_STRING([--enable-ofono-backend],
114 [ build the ofono backend]),
115 enable_ofono_backend=$enableval,
116 enable_ofono_backend=yes )
118 AS_IF([test "x$enable_ofono_backend" = "xyes"], [
119 AC_DEFINE(HAVE_OFONO, [1], [Define as 1 if you have the ofono backend])
121 AC_DEFINE(HAVE_OFONO, [0], [Define as 1 if you have the ofono backend])
124 AM_CONDITIONAL([ENABLE_OFONO], [test "x$enable_ofono_backend" = "xyes"])
126 AC_ARG_ENABLE(telepathy-backend,
127 AC_HELP_STRING([--enable-telepathy-backend],
128 [ build the Telepathy backend]),
129 enable_telepathy_backend=$enableval,
130 enable_telepathy_backend=yes )
132 AS_IF([test "x$enable_telepathy_backend" = "xyes"], [
133 AC_DEFINE(HAVE_TELEPATHY, [1], [Define as 1 if you have the Telepathy backend])
135 AC_DEFINE(HAVE_TELEPATHY, [0], [Define as 1 if you have the Telepathy backend])
138 AM_CONDITIONAL([ENABLE_TELEPATHY], [test "x$enable_telepathy_backend" = "xyes"])
140 AC_ARG_ENABLE(zeitgeist,
141 AC_HELP_STRING([--enable-zeitgeist],
142 [ build Zeitgeist support in the Telepathy backend]),
143 enable_zeitgeist=$enableval,
144 enable_zeitgeist=auto)
146 # Automatically check the dependencies for the libsocialweb backend
147 SW_CLIENT_REQUIRED=0.25.20
148 AC_ARG_ENABLE(libsocialweb-backend,
149 AC_HELP_STRING([--enable-libsocialweb-backend=@<:@no/yes/auto@:>@],
150 [build the Libsocialweb backend (default: auto)]),
151 enable_libsocialweb_backend=$enableval,
152 enable_libsocialweb_backend=auto )
154 # this may be overwritten farther down
155 AC_DEFINE(HAVE_LIBSOCIALWEB, [0],
156 [Define as 1 if you have the libsocialweb backend])
157 AS_IF([test "x$enable_libsocialweb_backend" != "xno"], [
158 PKG_CHECK_MODULES([SW_CLIENT], [libsocialweb-client >= $SW_CLIENT_REQUIRED],
159 have_libsocialweb_backend="yes", have_libsocialweb_backend="no")
160 AS_IF([test "x$have_libsocialweb_backend" = "xyes" -a \
161 "x$enable_vala" = "xyes"], [
162 VALA_CHECK_PACKAGES([telepathy-glib
165 libsocialweb-client],
167 have_libsocialweb_backend="no")
170 AS_IF([test "x$have_libsocialweb_backend" = "xyes"], [
171 AC_DEFINE(HAVE_LIBSOCIALWEB, [1],
172 [Define if you have the libsocialweb backend])
175 have_libsocialweb_backend=no
178 AS_IF([test "x$enable_libsocialweb_backend" = "xyes" -a \
179 "x$have_libsocialweb_backend" != "xyes"], [
180 AC_MSG_ERROR([Cannot find libsocialweb dependencies.])
183 AM_CONDITIONAL([ENABLE_LIBSOCIALWEB],
184 [test "x$have_libsocialweb_backend" = "xyes"])
186 # -----------------------------------------------------------
188 # -----------------------------------------------------------
192 VALADOC_REQUIRED=0.3.1
193 TRACKER_SPARQL_MAJOR=0.16
194 TRACKER_SPARQL_REQUIRED=0.15.2
196 EDATASERVER_REQUIRED=3.5.3.1
197 ZEITGEIST_REQUIRED=0.9.14
200 AC_SUBST([TRACKER_SPARQL_MAJOR])
202 PKG_CHECK_MODULES([GLIB],
203 [glib-2.0 >= $GLIB_REQUIRED
204 gobject-2.0 >= $GLIB_REQUIRED])
205 PKG_CHECK_MODULES([GMODULE], [gmodule-no-export-2.0])
206 PKG_CHECK_MODULES([GIO], [gio-2.0 >= $GLIB_REQUIRED])
207 # FIXME: get rid of this when our dependencies stop using dbus-1 (GNOME#696177)
208 PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1 dbus-1])
210 PKG_CHECK_MODULES([GEE], [gee-0.8 >= $GEE_REQUIRED])
212 TP_GLIB_REQUIRED=0.19.0
214 AS_IF([test x$enable_telepathy_backend = xyes], [
215 PKG_CHECK_MODULES([TP_GLIB], [telepathy-glib >= $TP_GLIB_REQUIRED])])
216 case "x$enable_zeitgeist" in
218 AS_IF([test x$enable_telepathy_backend = xyes],
219 [PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-2.0 >= $ZEITGEIST_REQUIRED],
221 [AC_MSG_ERROR([Zeitgeist support requires Zeitgeist development package])])])
225 AS_IF([test x$enable_telepathy_backend = xyes],
226 [PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-2.0 >= $ZEITGEIST_REQUIRED],
227 have_zeitgeist="yes",have_zeitgeist="no")],
234 AC_MSG_ERROR([Unknown --enable-zeitgeist argument: $enable_zeitgeist])
237 AS_IF([test "x$have_zeitgeist" == "xyes"], [
238 ZEITGEIST_VALAFLAGS="-D HAVE_ZEITGEIST"
239 AC_SUBST([ZEITGEIST_VALAFLAGS])
240 ZEITGEIST_PKG="--pkg zeitgeist-2.0"
241 AC_SUBST([ZEITGEIST_PKG])
243 AM_CONDITIONAL([ENABLE_ZEITGEIST], [test "x$have_zeitgeist" = "xyes"])
245 # Ignore post 0.20 deprecations
246 TP_GLIB_CFLAGS="$TP_GLIB_CFLAGS -DTP_VERSION_MIN_REQUIRED=TP_VERSION_0_20"
247 # Prevent post 0.20 APIs
248 TP_GLIB_CFLAGS="$TP_GLIB_CFLAGS -DTP_VERSION_MAX_ALLOWED=TP_VERSION_0_20"
250 AS_IF([test x$enable_tracker_backend = xyes], [
251 PKG_CHECK_MODULES([TRACKER_SPARQL],
252 [tracker-sparql-$TRACKER_SPARQL_MAJOR >= \
253 $TRACKER_SPARQL_REQUIRED])
256 AS_IF([test x$enable_eds_backend = xyes], [
257 PKG_CHECK_MODULES([EBOOK], [libebook-1.2 >= $EBOOK_REQUIRED
258 libebook-contacts-1.2 >= $EBOOK_REQUIRED])
259 PKG_CHECK_MODULES([EDATASERVER], [libedataserver-1.2 >= $EDATASERVER_REQUIRED])
262 AS_IF([test x$enable_ofono_backend = xyes], [
263 PKG_CHECK_MODULES([EBOOK], [libebook-1.2 >= $EBOOK_REQUIRED])
267 # Vala building options -- allows tarball builds without installing Vala
269 AC_ARG_ENABLE([vala],
270 AS_HELP_STRING([--enable-vala],
271 [Enable building from the Vala sources]),
272 [enable_vala=$enableval],
275 # will be re-set as necessary below
276 AM_CONDITIONAL([HAVE_INTROSPECTION], [test "x$enable_vala" = "xyes"])
279 # Force Vala for non-release builds
280 m4_if(folks_released, [1], [],
283 echo "Vala compiler required for non-release builds; requiring Vala..."
286 # Force Vala if generated source is missing or outdated
288 ! -e ${sd}tools/folks_import_vala.stamp -o \
289 ! -e ${sd}tests/folks/abstract_field_details_vala.stamp -o \
290 ! -e ${sd}tests/folks/aggregation_vala.stamp -o \
291 ! -e ${sd}tests/folks/backend_loading_vala.stamp -o \
292 ! -e ${sd}tests/key-file/individual_retrieval_vala.stamp -o \
293 ! -e ${sd}tests/lib/folks-test.vapi -o \
294 ! -e ${sd}tests/lib/key-file/kf-test.vapi -o \
295 ! -e ${sd}tests/lib/key-file/libkf_test_la_vala.stamp -o \
296 ! -e ${sd}tests/lib/telepathy/contactlist/tp-test-contactlist.gir -o \
297 ! -e ${sd}tests/lib/telepathy/contactlist/tp-test-contactlist.vapi -o \
298 ! -e ${sd}tests/lib/libfolks_test_la_vala.stamp -o \
299 ! -e ${sd}tests/telepathy/persona_store_capabilities_vala.stamp -o \
300 ! -e ${sd}tests/telepathy/individual_retrieval_vala.stamp -o \
301 ! -e ${sd}tests/telepathy/individual_properties_vala.stamp -o \
302 ! -e ${sd}tests/folks/backend_loading_vala.stamp -o \
303 ! -e ${sd}backends/key-file/key_file_la_vala.stamp -o \
304 ! -e ${sd}backends/telepathy/telepathy_la_vala.stamp \
306 ! -e ${sd}backends/telepathy/lib/folks-telepathy.vapi -o \
307 ! -e ${sd}backends/telepathy/lib/tp-lowlevel.gir -o \
308 ! -e ${sd}backends/telepathy/lib/tp-lowlevel.vapi -o \
309 ! -e ${sd}backends/telepathy/lib/libfolks_telepathy_la_vala.stamp -o \
310 ! -e ${sd}folks/folks-internal.h -o \
311 ! -e ${sd}folks/folks-internal.vapi -o \
312 ! -e ${sd}folks/libfolks_internal_la_vala.stamp -o \
313 ! -e ${sd}folks/folks.vapi -o \
314 ! -e ${sd}folks/libfolks_la_vala.stamp \
317 echo "Vala source needs to be re-compiled; requiring Vala..."
320 AS_IF([test "x$enable_vala" = "xyes"], [
321 AM_PROG_VALAC([$VALA_REQUIRED])
322 AS_IF([test "x$VALAC" = "x"], [
323 AC_MSG_ERROR([Vala requested but valac is not installed])
326 AC_PATH_PROG([VAPIGEN], [vapigen], [])
327 AS_IF([test "x$VAPIGEN" = "x"], [
328 AC_MSG_ERROR([Vala must be built with --enable-vapigen])
331 # require GLib >= 2.24 so GLib.Array, etc. reffing is handled
333 AM_VALAFLAGS="--target-glib=2.24"
334 # within the libfolks tree, select inline code paths
335 AM_VALAFLAGS="$AM_VALAFLAGS -D FOLKS_COMPILATION"
336 AC_SUBST([AM_VALAFLAGS])
337 AC_SUBST([VAPIGENFLAGS])
340 VALA_CHECK_PACKAGES([gio-2.0
343 AS_IF([test x$enable_telepathy_backend = xyes], [
344 VALA_CHECK_PACKAGES([telepathy-glib])
345 AS_IF([test "x$have_zeitgeist" == "xyes"], [
346 VALA_CHECK_PACKAGES([zeitgeist-2.0])
350 AS_IF([test x$enable_tracker_backend = xyes], [
351 VALA_CHECK_PACKAGES([tracker-sparql-$TRACKER_SPARQL_MAJOR])
354 AS_IF([test x$enable_eds_backend = xyes], [
355 VALA_CHECK_PACKAGES([libebook-1.2 libebook-contacts-1.2 libedataserver-1.2 libxml-2.0])
358 AS_IF([test x$enable_ofono_backend = xyes], [
359 VALA_CHECK_PACKAGES([libebook-1.2])
363 # this will set HAVE_INTROSPECTION
364 GOBJECT_INTROSPECTION_REQUIRE([1.30])
366 AM_CONDITIONAL([HAVE_VALA], [test "x$enable_vala" = "xyes"])
368 # Various functions that we need (used in C code generated from Vala)
369 AC_CHECK_FUNCS([memset])
370 AC_CHECK_FUNCS([strstr])
372 AM_CONDITIONAL([NOT_RELEASE], [test "x$folks_released" = "x0"])
374 # -----------------------------------------------------------
376 # -----------------------------------------------------------
378 FOLKS_MODULE_VERSION=folks_module_version
379 AC_SUBST([FOLKS_MODULE_VERSION])
380 AC_DEFINE([MODULE_VERSION], "folks_module_version", [Module interface version])
382 BACKEND_DIR='$(libdir)/folks/$(FOLKS_MODULE_VERSION)/backends'
383 AC_SUBST([BACKEND_DIR])
385 # -----------------------------------------------------------
387 # -----------------------------------------------------------
389 AC_ARG_ENABLE([import-tool],
390 AS_HELP_STRING([--enable-import-tool],
391 [Enable building the meta-contact import tool]),
392 [enable_import_tool=$enableval with_import_tool=$enableval],
393 [enable_import_tool=maybe with_import_tool=no])
394 AS_IF([test "$enable_import_tool" != "no"],
395 [PKG_CHECK_MODULES([LIBXML], [libxml-2.0],
396 [with_import_tool=yes], [with_import_tool=no])])
397 AS_IF([test "$enable_import_tool" = "yes" -a "$with_import_tool" = "no"],
398 [AC_MSG_ERROR([Import tool explicitly enabled, but libxml2 not found])])
399 AM_CONDITIONAL([ENABLE_IMPORT_TOOL], [test "$with_import_tool" = "yes"])
401 # Readline's required for the folks-inspect program
402 AC_ARG_ENABLE([inspect-tool],
403 AS_HELP_STRING([--enable-inspect-tool],
404 [Enable building the data inspection tool]),
405 [enable_inspect_tool=$enableval with_inspect_tool=$enableval],
406 [enable_inspect_tool=maybe with_inspect_tool=no])
407 AS_IF([test "$enable_inspect_tool" = "yes" -a "$enable_vala" != "yes"],
408 [AC_MSG_ERROR([Inspect tool explicitly enabled, but Vala wasn't enabled \
409 using --enable-vala])])
410 AS_IF([test "$enable_inspect_tool" = "maybe" -a "$enable_vala" != "yes"],
411 [AC_MSG_NOTICE([Inspect tool disabled, as Vala wasn't enabled using \
413 AS_IF([test "$enable_inspect_tool" != "no" -a "x$enable_vala" = "xyes"],
414 [AC_CHECK_LIB([readline], [main],
415 [with_inspect_tool=yes], [with_inspect_tool=no],
417 AS_IF([test "$enable_inspect_tool" != "no" -a "$with_inspect_tool" = "yes" -a \
418 "x$enable_vala" = "xyes"],
419 [VALA_CHECK_PACKAGES([readline])
420 LIBREADLINE="-lreadline -lncurses"
421 AC_DEFINE([HAVE_LIBREADLINE], [1], [Define if you have libreadline])
422 AC_SUBST([LIBREADLINE])])
423 AS_IF([test "$enable_inspect_tool" = "yes" -a "$with_inspect_tool" = "no"],
424 [AC_MSG_ERROR([Inspect tool explicitly enabled, but readline not found])])
425 AM_CONDITIONAL([ENABLE_INSPECT_TOOL], [test "$with_inspect_tool" = "yes"])
427 # -----------------------------------------------------------
429 # -----------------------------------------------------------
431 AC_ARG_ENABLE([tests],
432 AS_HELP_STRING([--enable-tests],[Enable building of tests]),
433 [enable_tests=$enableval], [enable_tests=yes])
434 AM_CONDITIONAL([ENABLE_TESTS], [test x$enable_tests = xyes])
436 # -----------------------------------------------------------
438 # -----------------------------------------------------------
440 AC_ARG_ENABLE([docs],
441 AS_HELP_STRING([--enable-docs],[Enable documentation generation]),
442 [enable_docs=$enableval], [enable_docs=no])
443 AM_CONDITIONAL([ENABLE_DOCS], [test x$enable_docs = xyes])
446 AS_IF([test x$enable_docs = xyes], [
447 # make sure the library is new enough and the program exists
448 PKG_CHECK_MODULES([VALADOC], [valadoc-1.0 >= $VALADOC_REQUIRED])
449 AC_PATH_PROG([VALADOC], [valadoc], [:])
450 AS_IF([test "$VALADOC" != :], have_valadoc=yes)
452 AM_CONDITIONAL([HAVE_VALADOC], [test x$have_valadoc = xyes])
454 AS_IF([test "x$enable_docs" = "xyes" -a "x$have_valadoc" != "xyes"], [
455 AC_MSG_ERROR([Doc building requested but valadoc not installed.])
458 # -----------------------------------------------------------
460 # -----------------------------------------------------------
462 GETTEXT_PACKAGE=AC_PACKAGE_NAME
463 AC_SUBST(GETTEXT_PACKAGE)
464 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
465 IT_PROG_INTLTOOL([0.50.0])
467 # -----------------------------------------------------------
469 # -----------------------------------------------------------
471 # Disable GLib deprecation warnings for now (#670196); GValueArray is deprecated
472 # but we need it for dbus-glib. Porting to GDBus will solve this (#653198)
473 AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
475 # C_ERROR_CFLAGS are only used for C code from telepathy-glib for now,
476 # while ERROR_CFLAGS are used for everything.
480 AC_ARG_ENABLE([fatal-warnings],
481 AS_HELP_STRING([--disable-fatal-warnings],
482 [Make various warnings non-fatal]),
483 [enable_fatal_warnings=$enableval], [enable_fatal_warnings=yes])
485 AC_DEFUN([FOLKS_ADD_WARNING],
487 AS_COMPILER_FLAG([-Werror=$2],
489 AS_IF([test "x$enable_fatal_warnings" = xyes],
490 [$1="[$]$1 -Werror=$2"],
495 # It isn't 1970 any more. Require that we write proper ISO C with declarations,
496 # avoiding hard-to-trace bugs on platforms where sizeof(int) != sizeof(void *).
497 FOLKS_ADD_WARNING([ERROR_CFLAGS], [implicit])
498 FOLKS_ADD_WARNING([ERROR_CFLAGS], [missing-declarations])
499 FOLKS_ADD_WARNING([ERROR_CFLAGS], [missing-parameter-type])
500 FOLKS_ADD_WARNING([ERROR_CFLAGS], [missing-prototypes])
501 FOLKS_ADD_WARNING([ERROR_CFLAGS], [nested-externs])
502 FOLKS_ADD_WARNING([ERROR_CFLAGS], [old-style-declaration])
503 FOLKS_ADD_WARNING([ERROR_CFLAGS], [old-style-definition])
504 FOLKS_ADD_WARNING([ERROR_CFLAGS], [strict-prototypes])
506 AS_COMPILER_FLAG([-Wall], [C_ERROR_CFLAGS="-Wall"], [C_ERROR_CFLAGS=""])
507 AS_COMPILER_FLAG([-Werror], [werror=yes], [werror=no])
509 AC_ARG_ENABLE([debug],
510 AS_HELP_STRING([--disable-debug],[compile without debug code]),
511 [enable_debug=$enableval], [enable_debug=yes])
513 AS_COMPILER_FLAG([-Wextra], [wextra=yes], [wextra=no])
514 AS_COMPILER_FLAG([-Wno-missing-field-initializers],
515 [wno_missing_field_initializers=yes],
516 [wno_missing_field_initializers=no])
517 AS_COMPILER_FLAG([-Wno-unused-parameter],
518 [wno_unused_parameter=yes], [wno_unused_parameter=no])
519 AS_COMPILER_FLAG([-Wstrict-prototypes], [wstrict_prototypes=yes],
520 [wstrict_prototypes=no])
521 AS_COMPILER_FLAG([-Wmissing-prototypes], [wmissing_prototypes=yes],
522 [wmissing_prototypes=no])
523 AS_COMPILER_FLAG([-Wimplicit-function-declaration],
524 [wimplicit_function_declaration=yes],
525 [wimplicit_function_declaration=no])
526 AS_COMPILER_FLAG([-Wpointer-arith], [wpointer_arith=yes], [wpointer_arith=no])
527 AS_COMPILER_FLAG([-Winit-self], [winit_self=yes], [winit_self=no])
528 AS_COMPILER_FLAG([-Wformat=2], [wformat=yes], [wformat=no])
529 AS_COMPILER_FLAG([-Wmissing-include-dirs], [wmissing_include_dirs=yes],
530 [wmissing_include_dirs=no])
531 AS_COMPILER_FLAG([-Waggregate-return], [waggregate_return=yes],
532 [waggregate_return=no])
533 AS_COMPILER_FLAG([-Wdeclaration-after-statement],
534 [wdeclaration_after_statement=yes],
535 [wdeclaration_after_statement=no])
537 m4_if(folks_released, [1], [],
539 # Iff we support -Werror, then use it with all our compiler warnings.
540 if test x$werror = xyes; then
546 if test x$wextra = xyes -a \
547 x$wno_missing_field_initializers = xyes -a \
548 x$wno_unused_parameter = xyes -a x$wstrict_prototypes = xyes -a \
549 x$wmissing_prototypes = xyes -a \
550 x$wimplicit_function_declaration = xyes -a x$wpointer_arith = xyes \
551 -a x$winit_self = xyes -a x$wformat = xyes -a \
552 x$wmissing_include_dirs = xyes -a x$waggregate_return = xyes -a \
553 x$wdeclaration_after_statement = xyes; then
554 C_ERROR_CFLAGS="$C_ERROR_CFLAGS -Wextra \
555 -Wno-missing-field-initializers \
556 -Wno-unused-parameter ${flag}strict-prototypes \
557 ${flag}missing-prototypes ${flag}implicit-function-declaration \
558 ${flag}pointer-arith ${flag}init-self ${flag}format=2 \
559 ${flag}missing-include-dirs ${flag}aggregate-return \
560 ${flag}declaration-after-statement"
564 AS_COMPILER_FLAG([-D_POSIX_SOURCE], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -D_POSIX_SOURCE"])
565 AS_COMPILER_FLAG([-std=c99], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -std=c99"])
566 AS_COMPILER_FLAG([-Wshadow], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -Wshadow"])
567 AS_COMPILER_FLAG([-Wmissing-prototypes], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
568 -Wmissing-prototypes"])
569 AS_COMPILER_FLAG([-Wmissing-declarations], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
570 -Wmissing-declarations"])
571 AS_COMPILER_FLAG([-Wstrict-prototypes], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
572 -Wstrict-prototypes"])
574 AC_SUBST([ERROR_CFLAGS])
575 AC_SUBST([C_ERROR_CFLAGS])
577 # -----------------------------------------------------------
578 # Code coverage flags
579 # -----------------------------------------------------------
581 AC_ARG_ENABLE([code-coverage],
582 AS_HELP_STRING([--enable-code-coverage],
583 [compile with code coverage code]),
584 [enable_code_coverage=$enableval], [enable_code_coverage=no])
586 # Only enable code coverage if this isn't a release.
587 m4_if(folks_released, [1], [],
589 if test "x$GCC" = "xyes"; then
590 if test "x$enable_code_coverage" = "xyes"; then
591 CODE_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage -O0 -ggdb"
592 CODE_COVERAGE_LDFLAGS="-lgcov"
597 AC_SUBST([CODE_COVERAGE_CFLAGS])
598 AC_SUBST([CODE_COVERAGE_LDFLAGS])
601 AS_IF([test "x$enable_vala" = "xyes" && test "x$enable_fatal_warnings" = "xyes"],
602 [ERROR_INTROSPECTION_SCANNER_ARGS="\
603 $ERROR_INTROSPECTION_SCANNER_ARGS --warn-error"
604 ERROR_VALAFLAGS="$ERROR_VALAFLAGS --fatal-warnings"])
606 # Disable -g if we're building with code coverage enabled, since Vala's
607 # insertion of #line directives into .c files confuses lcov. For the moment,
608 # we'll have to do with looking at code coverage of the generated C files only.
609 # We set the debug flags in CODE_COVERAGE_CFLAGS instead in that case.
610 m4_if(folks_released, [1], [],
612 if test "x$enable_code_coverage" != "xyes" -o "x$GCC" != "xyes"; then
613 ERROR_VALAFLAGS="$ERROR_VALAFLAGS -g"
617 AC_SUBST([ERROR_INTROSPECTION_SCANNER_ARGS])
618 AC_SUBST([ERROR_VALAFLAGS])
620 # -----------------------------------------------------------
622 # -----------------------------------------------------------
624 AC_ARG_ENABLE([profiling],
625 AS_HELP_STRING([--enable-profiling],
626 [Enable building profiling points]),
627 [enable_profiling=$enableval],
628 [enable_profiling=no])
629 AM_CONDITIONAL([ENABLE_PROFILING], [test "$enable_profiling" = "yes"])
631 # -----------------------------------------------------------
633 # -----------------------------------------------------------
636 backends/telepathy/lib/folks-telepathy.pc
637 backends/telepathy/lib/folks-telepathy-uninstalled.pc
638 backends/tracker/lib/folks-tracker.deps
639 backends/tracker/lib/folks-tracker.pc
640 backends/tracker/lib/folks-tracker-uninstalled.pc
641 backends/eds/lib/folks-eds.pc
642 backends/eds/lib/folks-eds-uninstalled.pc
644 folks/folks-uninstalled.pc
645 folks/org.freedesktop.folks.gschema.xml
648 backends/key-file/Makefile
649 backends/libsocialweb/Makefile
650 backends/libsocialweb/lib/Makefile
651 backends/libsocialweb/lib/folks-libsocialweb.pc
652 backends/libsocialweb/lib/folks-libsocialweb-uninstalled.pc
653 backends/telepathy/Makefile
654 backends/telepathy/lib/Makefile
655 backends/tracker/Makefile
656 backends/tracker/lib/Makefile
657 backends/eds/Makefile
658 backends/eds/lib/Makefile
659 backends/ofono/Makefile
667 tests/key-file/Makefile
668 tests/libsocialweb/Makefile
669 tests/telepathy/Makefile
670 tests/tracker/Makefile
672 tests/lib/folks-test-uninstalled.pc
673 tests/lib/eds/Makefile
674 tests/lib/key-file/Makefile
675 tests/lib/libsocialweb/Makefile
676 tests/lib/telepathy/Makefile
677 tests/lib/tracker/Makefile
678 tests/lib/telepathy/contactlist/Makefile
681 tools/inspect/Makefile
689 Vala........................: ${enable_vala}
690 Vala Compiler...............: ${VALAC}
691 C Compiler Flags............: ${CFLAGS} ${ERROR_CFLAGS} ${CODE_COVERAGE_CFLAGS}
692 Linker Flags................: ${LDFLAGS} ${CODE_COVERAGE_LDFLAGS}
693 Prefix......................: ${prefix}
694 Bugreporting URL............: ${PACKAGE_BUGREPORT}
695 Documentation...............: ${have_valadoc}
696 Import tool.................: ${with_import_tool}
697 Inspector tool..............: ${with_inspect_tool}
698 Telepathy backend...........: ${enable_telepathy_backend}
699 Tracker backend.............: ${enable_tracker_backend}
700 Libsocialweb backend........: ${have_libsocialweb_backend}
701 E-D-S backend...............: ${enable_eds_backend}
702 Ofono backend...............: ${enable_ofono_backend}
703 Zeitgeist support...........: ${have_zeitgeist}
704 Build tests.................: ${enable_tests}