m4_define([folks_major_version], [0])
m4_define([folks_minor_version], [9])
-m4_define([folks_micro_version], [1])
+m4_define([folks_micro_version], [3])
m4_define([folks_nano_version], [1])
# If library source has changed since last release, increment revision
# increment current and set revision to 0
# If public symbols have been added since last release, increment age
# If public symbols have been removed since last release, set age to 0
-m4_define([folks_lt_current], [38])
+m4_define([folks_lt_current], [39])
m4_define([folks_lt_revision], [1])
-m4_define([folks_lt_age], [13])
+m4_define([folks_lt_age], [14])
# Display the nano_version only if it's not '0'
m4_define([folks_base_version],
PKG_PROG_PKG_CONFIG([0.21])
GLIB_GSETTINGS
+# Always look for .pc files in /folks so backend support libraries can be
+# introspected properly
+PKG_CONFIG_PATH=$(pwd)/folks:$PKG_CONFIG_PATH
+AC_SUBST([PKG_CONFIG_PATH])
+
AC_SUBST([CFLAGS])
AC_SUBST([CPPFLAGS])
AC_SUBST([LDFLAGS])
FOLKS_MAJOR_MINOR_VERSION=folks_major_minor_version
AC_SUBST([FOLKS_MAJOR_MINOR_VERSION])
-API_VERSION=0.6
-AC_SUBST([API_VERSION])
+API_VERSION_MAJOR=0
+AC_SUBST([API_VERSION_MAJOR])
+API_VERSION_MINOR=6
+AC_SUBST([API_VERSION_MINOR])
+API_VERSION_DOT=$API_VERSION_MAJOR.$API_VERSION_MINOR
+AC_SUBST([API_VERSION_DOT])
AC_ARG_ENABLE(tracker-backend,
AC_HELP_STRING([--enable-tracker-backend],
AM_CONDITIONAL([ENABLE_TELEPATHY], [test "x$enable_telepathy_backend" = "xyes"])
+AC_ARG_ENABLE(zeitgeist,
+ AC_HELP_STRING([--enable-zeitgeist],
+ [ build Zeitgeist support in the Telepathy backend]),
+ enable_zeitgeist=$enableval,
+ enable_zeitgeist=auto)
+
# Automatically check the dependencies for the libsocialweb backend
SW_CLIENT_REQUIRED=0.25.20
AC_ARG_ENABLE(libsocialweb-backend,
VALADOC_REQUIRED=0.3.1
TRACKER_SPARQL_MAJOR=0.16
TRACKER_SPARQL_REQUIRED=0.15.2
-EBOOK_REQUIRED=3.7.90
+EBOOK_REQUIRED=3.8.1
EDATASERVER_REQUIRED=3.5.3.1
-ZEITGEIST_REQUIRED=0.3.14
+ZEITGEIST_REQUIRED=0.9.14
GEE_REQUIRED=0.8.4
AC_SUBST([TRACKER_SPARQL_MAJOR])
PKG_CHECK_MODULES([GEE], [gee-0.8 >= $GEE_REQUIRED])
TP_GLIB_REQUIRED=0.19.0
+
AS_IF([test x$enable_telepathy_backend = xyes], [
- PKG_CHECK_MODULES([TP_GLIB], [telepathy-glib >= $TP_GLIB_REQUIRED])
- PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-1.0 >= $ZEITGEIST_REQUIRED],
- have_zeitgeist="yes",have_zeitgeist="no")])
+ PKG_CHECK_MODULES([TP_GLIB], [telepathy-glib >= $TP_GLIB_REQUIRED])])
+case "x$enable_zeitgeist" in
+ xyes)
+ AS_IF([test x$enable_telepathy_backend = xyes],
+ [PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-2.0 >= $ZEITGEIST_REQUIRED],
+ ,
+ [AC_MSG_ERROR([Zeitgeist support requires Zeitgeist development package])])])
+ have_zeitgeist=yes
+ ;;
+ xauto)
+ AS_IF([test x$enable_telepathy_backend = xyes],
+ [PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-2.0 >= $ZEITGEIST_REQUIRED],
+ have_zeitgeist="yes",have_zeitgeist="no")],
+ [have_zeitgeist=no])
+ ;;
+ xno)
+ have_zeitgeist=no
+ ;;
+ x*)
+ AC_MSG_ERROR([Unknown --enable-zeitgeist argument: $enable_zeitgeist])
+esac
+
AS_IF([test "x$have_zeitgeist" == "xyes"], [
ZEITGEIST_VALAFLAGS="-D HAVE_ZEITGEIST"
AC_SUBST([ZEITGEIST_VALAFLAGS])
- ZEITGEIST_PKG="--pkg zeitgeist-1.0"
+ ZEITGEIST_PKG="--pkg zeitgeist-2.0"
AC_SUBST([ZEITGEIST_PKG])
])
# require GLib >= 2.24 so GLib.Array, etc. reffing is handled
# automatically
AM_VALAFLAGS="--target-glib=2.24"
+ # within the libfolks tree, select inline code paths
+ AM_VALAFLAGS="$AM_VALAFLAGS -D FOLKS_COMPILATION"
AC_SUBST([AM_VALAFLAGS])
AC_SUBST([VAPIGENFLAGS])
AC_SUBST([VAPIDIR])
AS_IF([test x$enable_telepathy_backend = xyes], [
VALA_CHECK_PACKAGES([telepathy-glib])
AS_IF([test "x$have_zeitgeist" == "xyes"], [
- VALA_CHECK_PACKAGES([zeitgeist-1.0])
+ VALA_CHECK_PACKAGES([zeitgeist-2.0])
])
])
# but we need it for dbus-glib. Porting to GDBus will solve this (#653198)
AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
-AS_COMPILER_FLAG([-Wall], [ERROR_CFLAGS="-Wall"], [ERROR_CFLAGS=""])
+# C_ERROR_CFLAGS are only used for C code from telepathy-glib for now,
+# while ERROR_CFLAGS are used for everything.
+
+ERROR_CFLAGS=
+
+AC_ARG_ENABLE([fatal-warnings],
+ AS_HELP_STRING([--disable-fatal-warnings],
+ [Make various warnings non-fatal]),
+ [enable_fatal_warnings=$enableval], [enable_fatal_warnings=yes])
+
+AC_DEFUN([FOLKS_ADD_WARNING],
+ [
+ AS_COMPILER_FLAG([-Werror=$2],
+ [
+ AS_IF([test "x$enable_fatal_warnings" = xyes],
+ [$1="[$]$1 -Werror=$2"],
+ [$1="[$]$1 -W$2"])
+ ])
+ ])
+
+# It isn't 1970 any more. Require that we write proper ISO C with declarations,
+# avoiding hard-to-trace bugs on platforms where sizeof(int) != sizeof(void *).
+FOLKS_ADD_WARNING([ERROR_CFLAGS], [implicit])
+FOLKS_ADD_WARNING([ERROR_CFLAGS], [missing-declarations])
+FOLKS_ADD_WARNING([ERROR_CFLAGS], [missing-parameter-type])
+FOLKS_ADD_WARNING([ERROR_CFLAGS], [missing-prototypes])
+FOLKS_ADD_WARNING([ERROR_CFLAGS], [nested-externs])
+FOLKS_ADD_WARNING([ERROR_CFLAGS], [old-style-declaration])
+FOLKS_ADD_WARNING([ERROR_CFLAGS], [old-style-definition])
+FOLKS_ADD_WARNING([ERROR_CFLAGS], [strict-prototypes])
+
+AS_COMPILER_FLAG([-Wall], [C_ERROR_CFLAGS="-Wall"], [C_ERROR_CFLAGS=""])
AS_COMPILER_FLAG([-Werror], [werror=yes], [werror=no])
AC_ARG_ENABLE([debug],
-a x$winit_self = xyes -a x$wformat = xyes -a \
x$wmissing_include_dirs = xyes -a x$waggregate_return = xyes -a \
x$wdeclaration_after_statement = xyes; then
- ERROR_CFLAGS="$ERROR_CFLAGS -Wextra \
+ C_ERROR_CFLAGS="$C_ERROR_CFLAGS -Wextra \
-Wno-missing-field-initializers \
-Wno-unused-parameter ${flag}strict-prototypes \
${flag}missing-prototypes ${flag}implicit-function-declaration \
fi
])
-AS_COMPILER_FLAG([-D_POSIX_SOURCE], [ERROR_CFLAGS="$ERROR_CFLAGS -D_POSIX_SOURCE"])
-AS_COMPILER_FLAG([-std=c99], [ERROR_CFLAGS="$ERROR_CFLAGS -std=c99"])
-AS_COMPILER_FLAG([-Wshadow], [ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow"])
-AS_COMPILER_FLAG([-Wmissing-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
+AS_COMPILER_FLAG([-D_POSIX_SOURCE], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -D_POSIX_SOURCE"])
+AS_COMPILER_FLAG([-std=c99], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -std=c99"])
+AS_COMPILER_FLAG([-Wshadow], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS -Wshadow"])
+AS_COMPILER_FLAG([-Wmissing-prototypes], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
-Wmissing-prototypes"])
-AS_COMPILER_FLAG([-Wmissing-declarations], [ERROR_CFLAGS="$ERROR_CFLAGS \
+AS_COMPILER_FLAG([-Wmissing-declarations], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
-Wmissing-declarations"])
-AS_COMPILER_FLAG([-Wstrict-prototypes], [ERROR_CFLAGS="$ERROR_CFLAGS \
+AS_COMPILER_FLAG([-Wstrict-prototypes], [C_ERROR_CFLAGS="$C_ERROR_CFLAGS \
-Wstrict-prototypes"])
AC_SUBST([ERROR_CFLAGS])
+AC_SUBST([C_ERROR_CFLAGS])
# -----------------------------------------------------------
# Code coverage flags
AC_SUBST([CODE_COVERAGE_LDFLAGS])
# Vala-related flags
-AC_ARG_ENABLE([fatal-warnings],
- AS_HELP_STRING([--disable-fatal-warnings],
- [Make warnings from valac and g-ir-scanner non-fatal]),
- [enable_fatal_warnings=$enableval], [enable_fatal_warnings=yes])
AS_IF([test "x$enable_vala" = "xyes" && test "x$enable_fatal_warnings" = "xyes"],
[ERROR_INTROSPECTION_SCANNER_ARGS="\
$ERROR_INTROSPECTION_SCANNER_ARGS --warn-error"