[folks] Version the installed backends using the LT current version number
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Version the installed backends using the LT current version number
- Date: Mon, 2 Aug 2010 17:27:53 +0000 (UTC)
commit 8f0befca507bd6388327e800a264628272457d1b
Author: Philip Withnall <philip withnall collabora co uk>
Date: Fri Jul 23 13:38:53 2010 +0100
Version the installed backends using the LT current version number
This changes with every API/ABI change which is made to libfolks,
so it should ensure that only binary compatible modules are loaded
at runtime.
backends/telepathy/Makefile.am | 2 +-
configure.ac | 14 ++++++++++++++
folks/Makefile.am | 3 +--
3 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/backends/telepathy/Makefile.am b/backends/telepathy/Makefile.am
index a7882fd..60ed3e5 100644
--- a/backends/telepathy/Makefile.am
+++ b/backends/telepathy/Makefile.am
@@ -11,7 +11,7 @@ VALAFLAGS += --vapidir=. --vapidir=$(top_srcdir)/folks
noinst_LTLIBRARIES = libtp-lowlevel.la
folks_telepathydir = $(libdir)
folks_telepathy_LTLIBRARIES = libfolks-telepathy.la
-backenddir = $(libdir)/folks/backends/telepathy
+backenddir = $(BACKEND_DIR)/telepathy
backend_LTLIBRARIES = libfolks-backend-telepathy.la
##################################################################
diff --git a/configure.ac b/configure.ac
index 031afc4..d7eb769 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,8 @@ m4_define(folks_maybe_datestamp,
m4_define(folks_version, folks_full_version[]folks_maybe_datestamp)
+# Module API version.
+m4_define([folks_module_version], [folks_lt_current])
AC_INIT(folks, folks_version, folks)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -121,6 +123,18 @@ AC_SUBST(TP_GLIB_CFLAGS)
AC_SUBST(TP_GLIB_LIBS)
# -----------------------------------------------------------
+# Backends
+# -----------------------------------------------------------
+
+FOLKS_MODULE_VERSION=folks_module_version()
+AC_SUBST(FOLKS_MODULE_VERSION)
+AC_DEFINE([MODULE_VERSION], ["folks_module_version()"],
+ [Module interface version])
+
+BACKEND_DIR='$(libdir)/folks/$(FOLKS_MODULE_VERSION)/backends'
+AC_SUBST(BACKEND_DIR)
+
+# -----------------------------------------------------------
# Documentation
# -----------------------------------------------------------
AC_ARG_ENABLE(docs,
diff --git a/folks/Makefile.am b/folks/Makefile.am
index f9d3b83..1340473 100644
--- a/folks/Makefile.am
+++ b/folks/Makefile.am
@@ -1,11 +1,10 @@
sharedir = $(datadir)/folks
-backenddir = $(libdir)/folks
AM_CPPFLAGS = \
-include $(CONFIG_HEADER) \
-DPACKAGE_DATADIR=\"$(pkgdatadir)\" \
-DDATA_DIR=\"$(shareddir)\" \
- -DBACKEND_DIR=\"$(backenddir)\" \
+ -DBACKEND_DIR=\"$(BACKEND_DIR)\" \
-DG_LOG_DOMAIN=\"Core\" \
$(NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]