From f288177ac3c4815b99bdebe352595295170214e2 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 9 Mar 2012 13:38:04 +0000 Subject: [PATCH 6/6] Replace plugindir with an AC_ARG_VAR so it can be passed to configure This lets you configure the plugin directory: ./configure pluginexecdir='${libdir}/my-gabble-plugins' The directory-name variable has 'exec' in it because Automake installs unknown directory names with 'exec' in their variable name during "make install-exec", and other unknown directory names during "make install-data". Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46417 --- configure.ac | 5 +++++ gabble/telepathy-gabble-uninstalled.pc.in | 2 +- gabble/telepathy-gabble.pc.in | 3 +-- plugins/Makefile.am | 6 ++---- src/Makefile.am | 2 +- tests/twisted/tools/run-gabble.sh.in | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 15a16ea..541c907 100644 --- a/configure.ac +++ b/configure.ac @@ -246,6 +246,11 @@ if test "x$pluginexeclibdir" = x; then pluginexeclibdir='${libdir}/telepathy/gabble-0/lib' fi AC_ARG_VAR([pluginexeclibdir]) +# The actual plugins +if test "x$pluginexecdir" = x; then + pluginexecdir='${libdir}/telepathy/gabble-0/plugins' +fi +AC_ARG_VAR([pluginexecdir]) AC_ARG_ENABLE(plugins, AC_HELP_STRING([--disable-plugins], diff --git a/gabble/telepathy-gabble-uninstalled.pc.in b/gabble/telepathy-gabble-uninstalled.pc.in index bc221c0..4e1196f 100644 --- a/gabble/telepathy-gabble-uninstalled.pc.in +++ b/gabble/telepathy-gabble-uninstalled.pc.in @@ -3,9 +3,9 @@ exec_prefix= abs_top_srcdir=@abs_top_srcdir@ abs_top_builddir=@abs_top_builddir@ libdir=@libdir@ +pluginexecdir=@pluginexecdir@ pluginexeclibdir=@pluginexeclibdir@ -plugindir=${libdir}/telepathy/gabble-0 gabblepath=@abs_top_builddir@/src/telepathy-gabble # For plugins' tests Name: Telepathy-Gabble diff --git a/gabble/telepathy-gabble.pc.in b/gabble/telepathy-gabble.pc.in index 3faac34..5e0a46b 100644 --- a/gabble/telepathy-gabble.pc.in +++ b/gabble/telepathy-gabble.pc.in @@ -3,8 +3,7 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ libexecdir=@libexecdir@ - -plugindir=${libdir}/telepathy/gabble-0 +pluginexecdir=@pluginexecdir@ pluginexeclibdir=@pluginexeclibdir@ gabblepath=${libexecdir}/telepathy-gabble # For plugins' tests diff --git a/plugins/Makefile.am b/plugins/Makefile.am index e0f9749..a511604 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1,5 +1,3 @@ -plugindir = $(libdir)/telepathy/gabble-0 - installable_plugins = \ libconsole.la \ libgateways.la @@ -25,11 +23,11 @@ noinst_LTLIBRARIES = \ # because libtest.la is not installed, libtool will want to compile it as static # despite -shared (a convenience library), unless we also use -rpath -libtest_la_LDFLAGS = $(AM_LDFLAGS) -rpath $(plugindir) +libtest_la_LDFLAGS = $(AM_LDFLAGS) -rpath $(pluginexecdir) endif if ENABLE_PLUGINS -plugin_LTLIBRARIES = $(installable_plugins) +pluginexec_LTLIBRARIES = $(installable_plugins) dist_bin_SCRIPTS = \ telepathy-gabble-xmpp-console diff --git a/src/Makefile.am b/src/Makefile.am index e8d24c5..135de2f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -267,7 +267,7 @@ AM_CFLAGS = $(ERROR_CFLAGS) -I$(top_srcdir) -I$(top_builddir) \ @SOUP_CFLAGS@ @NICE_CFLAGS@ @GMODULE_CFLAGS@ \ -I $(top_srcdir)/lib -I $(top_builddir)/lib \ -DG_LOG_DOMAIN=\"gabble\" \ - -DPLUGIN_DIR=\"$(libdir)/telepathy/gabble-0\" + -DPLUGIN_DIR=\"$(pluginexecdir)\" # following flag is requied to make getnameinfo work if WINDOWS diff --git a/tests/twisted/tools/run-gabble.sh.in b/tests/twisted/tools/run-gabble.sh.in index 80b8694..3f2f4f5 100755 --- a/tests/twisted/tools/run-gabble.sh.in +++ b/tests/twisted/tools/run-gabble.sh.in @@ -4,7 +4,7 @@ G_DEBUG=fatal-warnings,fatal-criticals export G_DEBUG GABBLE_TIMING=1 export GABBLE_TIMING -GABBLE_PLUGIN_DIR="@gabbletestsdir@/plugins:@libdir@/telepathy/gabble-0" +GABBLE_PLUGIN_DIR="@gabbletestsdir@/plugins:@pluginexecdir@" export GABBLE_PLUGIN_DIR WOCKY_CAPS_CACHE=:memory: export WOCKY_CAPS_CACHE -- 1.7.9.1