From 3238d0b0c4908e2da21418db97289e559d68fdd2 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 23 Mar 2012 15:10:18 +0000 Subject: [PATCH 4/4] Replace plugindir with an AC_ARG_VAR so it can be passed to configure Similar to https://bugs.freedesktop.org/show_bug.cgi?id=46417 in Gabble. This lets you configure the plugin directory: ./configure pluginexecdir='${libdir}/my-salut-plugins' --- configure.ac | 5 +++++ plugins/Makefile.am | 6 ++---- salut/telepathy-salut-uninstalled.pc.in | 2 +- salut/telepathy-salut.pc.in | 2 +- src/Makefile.am | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 578dbd9..610f1bb 100644 --- a/configure.ac +++ b/configure.ac @@ -281,6 +281,11 @@ if test "x$pluginexeclibdir" = x; then pluginexeclibdir='${libdir}/telepathy/salut-0/lib' fi AC_ARG_VAR([pluginexeclibdir]) +# The actual plugins +if test "x$pluginexecdir" = x; then + pluginexecdir='${libdir}/telepathy/salut-0/plugins' +fi +AC_ARG_VAR([pluginexecdir]) dnl plugins AC_ARG_ENABLE(plugins, diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 3bef2ce..5325b93 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1,5 +1,3 @@ -plugindir = $(libdir)/telepathy/salut-0 - # testing-only plugins noinst_LTLIBRARIES = \ test.la @@ -8,7 +6,7 @@ installable_plugins = $(NULL) if ENABLE_PLUGINS -plugin_LTLIBRARIES = $(installable_plugins) +pluginexec_LTLIBRARIES = $(installable_plugins) else # we still compile the plugin (just to make sure it compiles!) but we don't # install it @@ -23,7 +21,7 @@ test_la_SOURCES = \ # because test.la is not installed, libtool will want to compile it as static # despite -shared (a convenience library), unless we also use -rpath -test_la_LDFLAGS = $(AM_LDFLAGS) -rpath $(plugindir) +test_la_LDFLAGS = $(AM_LDFLAGS) -rpath $(pluginexecdir) AM_CFLAGS = $(ERROR_CFLAGS) \ -I $(top_srcdir) -I $(top_builddir) \ diff --git a/salut/telepathy-salut-uninstalled.pc.in b/salut/telepathy-salut-uninstalled.pc.in index ba10113..050c0b8 100644 --- a/salut/telepathy-salut-uninstalled.pc.in +++ b/salut/telepathy-salut-uninstalled.pc.in @@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@ abs_top_srcdir=@abs_top_srcdir@ abs_top_builddir=@abs_top_builddir@ libdir=@libdir@ +pluginexecdir=@pluginexecdir@ pluginexeclibdir=@pluginexeclibdir@ -plugindir=${libdir}/telepathy/salut-0 salutpath=${abs_top_builddir}/src/telepathy-salut Name: Telepathy-Salut (uninstalled) diff --git a/salut/telepathy-salut.pc.in b/salut/telepathy-salut.pc.in index 8d01d6b..d38a3df 100644 --- a/salut/telepathy-salut.pc.in +++ b/salut/telepathy-salut.pc.in @@ -4,7 +4,7 @@ libdir=@libdir@ includedir=@includedir@ libexecdir=@libexecdir@ -plugindir=${libdir}/telepathy/salut-0 +pluginexecdir=@pluginexecdir@ pluginexeclibdir=@pluginexeclibdir@ salutpath=${libexecdir}/telepathy-salut diff --git a/src/Makefile.am b/src/Makefile.am index 1a9d36a..7968c43 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -211,7 +211,7 @@ AM_CFLAGS = \ -I $(top_srcdir)/lib -I $(top_builddir)/lib \ -I $(top_srcdir)/salut \ -DG_LOG_DOMAIN=\"salut\" \ - -DPLUGIN_DIR=\"$(libdir)/telepathy/salut-0\" \ + -DPLUGIN_DIR=\"$(pluginexecdir)\" \ $(ERROR_CFLAGS) \ $(GCOV_CFLAGS) \ @LIBXML2_CFLAGS@ \ -- 1.7.9.1