summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-03-09 13:38:04 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-03-23 14:11:48 +0000
commit352d2da805561ec0164a6e800cd3c3e3bbc629f3 (patch)
treeac54d59da94d4397d9c71d3d585d7ac91eb0cbcd
parentf06469da5cfc7c8dc750bce82099dde4b528a20b (diff)
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 Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--configure.ac5
-rw-r--r--gabble/telepathy-gabble-uninstalled.pc.in2
-rw-r--r--gabble/telepathy-gabble.pc.in3
-rw-r--r--plugins/Makefile.am6
-rw-r--r--src/Makefile.am2
-rwxr-xr-xtests/twisted/tools/run-gabble.sh.in2
6 files changed, 11 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 08922eda8..376e979dc 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 bc221c0c2..4e1196f00 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 3faac34da..5e0a46b89 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 e0f974940..a51160472 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 b5b281d04..28f02725f 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 80b86940f..3f2f4f580 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