From 2f221a2b3a7afee94116750c67d29e41c354e61a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 9 Mar 2012 13:35:37 +0000 Subject: [PATCH 5/6] Install non-ABI-stable libraries used by plugins to a private directory This avoids having Gabble and Salut, or old Gabble and a future stable Wocky, fight over the libwocky.so symlink. If you're building for a tightly controlled platform where Gabble and Salut are definitely using the same Wocky version, you can put them in the normal libdir with ./configure pluginexeclibdir='${libdir}' or (when Salut has been updated with this change) make them share a private library directory: ./configure pluginexeclibdir='${libdir}/telepathy/ytstenut-1.0' Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46417 --- configure.ac | 12 +++++++++++- gabble/telepathy-gabble-uninstalled.pc.in | 1 + gabble/telepathy-gabble.pc.in | 3 ++- src/Makefile.am | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 059a3a0..15a16ea 100644 --- a/configure.ac +++ b/configure.ac @@ -238,6 +238,15 @@ AC_SUBST(GLIB_LIBS) GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` AC_SUBST(GLIB_GENMARSHAL) +# These must contain "exec" for automake to work right (install-exec, +# not install-data). +# +# Private directory for Wocky and the gabble-plugins library +if test "x$pluginexeclibdir" = x; then + pluginexeclibdir='${libdir}/telepathy/gabble-0/lib' +fi +AC_ARG_VAR([pluginexeclibdir]) + AC_ARG_ENABLE(plugins, AC_HELP_STRING([--disable-plugins], [disable plugin loader]), @@ -321,7 +330,8 @@ fi # 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} --enable-shared-suffix=${PACKAGE}-${VERSION}" + +ac_configure_args="$ac_configure_args --with-installed-headers=${wocky_install_headers_dir} --enable-shared-suffix=${PACKAGE}-${VERSION} --libdir=${pluginexeclibdir}" if test "x$ENABLE_CODING_STYLE_CHECKS" = xyes ; then ac_configure_args="$ac_configure_args --enable-coding-style-checks" diff --git a/gabble/telepathy-gabble-uninstalled.pc.in b/gabble/telepathy-gabble-uninstalled.pc.in index c4b1847..bc221c0 100644 --- a/gabble/telepathy-gabble-uninstalled.pc.in +++ b/gabble/telepathy-gabble-uninstalled.pc.in @@ -3,6 +3,7 @@ exec_prefix= abs_top_srcdir=@abs_top_srcdir@ abs_top_builddir=@abs_top_builddir@ libdir=@libdir@ +pluginexeclibdir=@pluginexeclibdir@ plugindir=${libdir}/telepathy/gabble-0 gabblepath=@abs_top_builddir@/src/telepathy-gabble # For plugins' tests diff --git a/gabble/telepathy-gabble.pc.in b/gabble/telepathy-gabble.pc.in index db7e87a..3faac34 100644 --- a/gabble/telepathy-gabble.pc.in +++ b/gabble/telepathy-gabble.pc.in @@ -5,6 +5,7 @@ includedir=@includedir@ libexecdir=@libexecdir@ plugindir=${libdir}/telepathy/gabble-0 +pluginexeclibdir=@pluginexeclibdir@ gabblepath=${libexecdir}/telepathy-gabble # For plugins' tests Name: Telepathy-Gabble @@ -12,5 +13,5 @@ Description: XMPP backend for the Telepathy framework Version: @VERSION@ Requires: pkg-config >= 0.21 Requires.private: glib-2.0 >= 2.16, gobject-2.0 >= 2.16, gio-2.0, telepathy-glib >= 0.7.37 -Libs: -L${libdir} -lgabble-plugins -lwocky +Libs: -L${pluginexeclibdir} -lgabble-plugins -lwocky Cflags: -I${includedir}/telepathy-gabble-0 diff --git a/src/Makefile.am b/src/Makefile.am index 3257b65..e8d24c5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -239,7 +239,7 @@ telepathy_gabble_LDFLAGS = -export-dynamic noinst_LTLIBRARIES = libgabble-convenience.la -lib_LTLIBRARIES = libgabble-plugins.la +pluginexeclib_LTLIBRARIES = libgabble-plugins.la # 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 -- 1.7.9.1