[telepathy-mission-control/master] Use -release in LDFLAGS unless we're on Maemo

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Jun 5 08:25:58 PDT 2009


SONAME guarantees are not given for the MC libraries yet (if at all), so
we should use -release to encode the MC version number in the SONAME.

However, on Maemo, things already rely on having libmcclient.so.6 and
libmissioncontrol-server.so.6, so add --enable-mcclient-so6 and
--enable-mcserver-so6 options which pretend these libraries are already
stable. (On Maemo, it's easier to rebuild all reverse dependencies than
to bump the SONAME regularly.)
---
 configure.ac            |   30 ++++++++++++++++++++++++++++++
 libmcclient/Makefile.am |    9 +++++++--
 src/Makefile.am         |   13 +++++++++----
 3 files changed, 46 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index d8c4786..6fbb9cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -214,6 +214,36 @@ AC_ARG_ENABLE(server,
 )
 AM_CONDITIONAL(HAVE_SERVER, [test x$server_enabled = xyes])
 
+ENABLE_MC_CLIENT_SO6="no"
+AC_MSG_CHECKING(whether to pretend libmcclient is stable)
+AC_ARG_ENABLE(mcclient-so6,
+	[  --enable-mcclient-so6    pretend libmcclient is ABI-stable],
+	[
+		AC_MSG_RESULT(${enableval})
+		ENABLE_MC_CLIENT_SO6="${enableval}"
+	],
+	[
+		AC_MSG_RESULT(no)
+		ENABLE_MC_CLIENT_SO6="no"
+	]
+)
+AM_CONDITIONAL(ENABLE_MC_CLIENT_SO6, [test "x$ENABLE_MC_CLIENT_SO6" = xyes])
+
+ENABLE_MC_SERVER_SO6="no"
+AC_MSG_CHECKING(whether to pretend libmissioncontrol-server is stable)
+AC_ARG_ENABLE(mcserver-so6,
+	[  --enable-mcserver-so6    pretend libmissioncontrol-server is ABI-stable],
+	[
+		AC_MSG_RESULT(${enableval})
+		ENABLE_MC_SERVER_SO6="${enableval}"
+	],
+	[
+		AC_MSG_RESULT(no)
+		ENABLE_MC_SERVER_SO6="no"
+	]
+)
+AM_CONDITIONAL(ENABLE_MC_SERVER_SO6, [test "x$ENABLE_MC_SERVER_SO6" = xyes])
+
 plugins_enabled="no"
 AC_MSG_CHECKING(whether to support plugins)
 AC_ARG_ENABLE(plugins,
diff --git a/libmcclient/Makefile.am b/libmcclient/Makefile.am
index f4202cf..9fc1308 100644
--- a/libmcclient/Makefile.am
+++ b/libmcclient/Makefile.am
@@ -80,10 +80,15 @@ libmcclient_la_LIBADD = \
 	$(GLIB_LIBS)
 
 libmcclient_la_LDFLAGS = \
-	-export-symbols-regex "^(mc_)|(mission_control_)" \
-	-version-info "10":"0":"4"
+	-export-symbols-regex "^(mc_)|(mission_control_)"
+
+if ENABLE_MC_CLIENT_SO6
 # the redundant quoting here is to prevent the libtool command line from
 # looking like an error message in an oddly named file
+libmcclient_la_LDFLAGS += -version-info "10":"0":"4"
+else
+libmcclient_la_LDFLAGS += -release $(VERSION)
+endif
 
 %-marshal.h: %-marshal.list Makefile.am
 	glib-genmarshal --header --prefix=$(subst -,_,$*)_marshal $< > $*-marshal.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 3a606e1..20e199c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -97,10 +97,15 @@ lib_LTLIBRARIES = libmissioncontrol-server.la
 libmissioncontrol_server_la_LIBADD += $(GMODULE_LIBS)
 
 libmissioncontrol_server_la_LDFLAGS = \
-	-export-symbols-regex '^((mc_)|(mcd_)|(mission_control_))' \
-	-version-info "10":"0":"4"
+	-export-symbols-regex '^((mc_)|(mcd_)|(mission_control_))'
+
+if ENABLE_MC_SERVER_SO6
 # the redundant quoting here is to prevent the libtool command line from
 # looking like an error message in an oddly named file
+libmissioncontrol_server_la_LDFLAGS += -version-info "10":"0":"4"
+else
+libmissioncontrol_server_la_LDFLAGS += -release $(VERSION)
+endif
 
 mission_control_includedir = $(includedir)/mission-control
 mission_control_include_HEADERS = $(mc_headers)
@@ -111,9 +116,9 @@ nodist_geninclude_HEADERS = $(mc_gen_headers)
 INCLUDES += \
 	$(GMODULE_CFLAGS) \
 	-DMCD_DEFAULT_FILTER_PLUGIN_DIR=\"@pluginlibdir@\"
-else
+else # ENABLE_PLUGINS
 noinst_LTLIBRARIES = libmissioncontrol-server.la
-endif
+endif # ENABLE_PLUGINS
 
 libmissioncontrol_server_la_SOURCES = \
 	mcd-account.c \
-- 
1.5.6.5




More information about the telepathy-commits mailing list