From 6448ee601d6db5d9826282b12a6c9a254c5adc92 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 23 Feb 2012 12:01:26 +0000 Subject: [PATCH] Build Wocky as a version-specific shared library --- configure.ac | 11 +---------- lib/ext/wocky | 2 +- src/Makefile.am | 8 +++++++- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 522accb..4690d11 100644 --- a/configure.ac +++ b/configure.ac @@ -314,16 +314,7 @@ AM_CONDITIONAL([WANT_TWISTED_TESTS], test false != "$TEST_PYTHON") # AX_CONFIG_DIR doesn't make it very easy to pass extra arguments to the # submodule's configure. prev_ac_configure_args=$ac_configure_args -ac_configure_args="$ac_configure_args --with-installed-headers=${wocky_install_headers_dir}" - -# Code from the submodules will be linked in to the gabble-plugins.so shared library, so they need -# to be compiled as position-independent code. Pass on any other flags we got as well. -# -# On some platforms -fPIC results in a "all code is position independent" warning though, so let's -# try to compile with -Werror to find out if the current platform is one of these. -sub_cflags="$CFLAGS" -TP_COMPILER_FLAG([-fPIC -Werror], [sub_cflags+=" -fPIC"]) -ac_configure_args+=" CFLAGS=\"$sub_cflags\"" +ac_configure_args="$ac_configure_args --with-installed-headers=${wocky_install_headers_dir} --enable-shared-suffix=${PACKAGE}-${VERSION}" if test "x$ENABLE_CODING_STYLE_CHECKS" = xyes ; then ac_configure_args+=" --enable-coding-style-checks" diff --git a/lib/ext/wocky b/lib/ext/wocky index 81fe73c..520016c 160000 --- a/lib/ext/wocky +++ b/lib/ext/wocky @@ -1 +1 @@ -Subproject commit 81fe73ceb5b0693a92c2247bdb1da11b363b79dd +Subproject commit 520016c06c3c7440c925bde233842deafce76208 diff --git a/src/Makefile.am b/src/Makefile.am index 9ab4a15..b500a98 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -230,7 +230,13 @@ noinst_LTLIBRARIES = libgabble-convenience.la lib_LTLIBRARIES = libgabble-plugins.la -libgabble_plugins_la_LDFLAGS = -shared -no-undefined -avoid-version +# Gabble's plugin API is not stable yet (it can't be, since neither is Wocky), +# so use -release to make the SONAME of the plugin library change with every +# Gabble release. +libgabble_plugins_la_LDFLAGS = \ + -no-undefined \ + -release $(VERSION) \ + $(NULL) libgabble_plugins_la_LIBADD = \ $(ALL_LIBS) -- 1.7.9.1