summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-02-23 19:09:27 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-02-23 19:09:30 +0000
commit19fa30c84df6211b328cb4902ca2e841b7378881 (patch)
tree14ba6f4fcacdc2ad530e138bfe6f2089585f4f18
parente5d1f92c8df2467983a2df33bdcd7b5286c9e26a (diff)
parent1fb967336847742c27612092a60b43ea782f92b9 (diff)
Merge branch 'plugins'
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
-rw-r--r--configure.ac15
-rw-r--r--gabble/Makefile.am2
-rw-r--r--plugins/Makefile.am19
3 files changed, 26 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index bd770eeaf..2e4c105ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -139,14 +139,19 @@ GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
AC_ARG_ENABLE(plugins,
- AC_HELP_STRING([--enable-plugins],
- [enable experimental plugin support]),
- [enable_plugins=$enableval], [enable_plugins=no])
+ AC_HELP_STRING([--disable-plugins],
+ [disable plugin loader]),
+ [enable_plugins=$enableval], [enable_plugins=yes])
if test x$enable_plugins = xyes; then
AC_DEFINE(ENABLE_PLUGINS, [], [Enable plugins])
- dnl If we want plugins, we need gmodule
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
+
+ AC_ARG_ENABLE(plugin-api,
+ AC_HELP_STRING([--enable-plugin-api],
+ [install headers for third-party plugins (experimental)]),
+ [enable_plugin_api=$enableval],
+ [enable_plugin_api=no])
fi
AC_SUBST(GMODULE_CFLAGS)
@@ -155,6 +160,8 @@ AC_SUBST(GMODULE_LIBS)
AM_CONDITIONAL(ENABLE_PLUGINS, test x$enable_plugins = xyes)
AC_SUBST(ENABLE_PLUGINS)
+AM_CONDITIONAL(ENABLE_PLUGIN_API, test x$enable_plugin_api = xyes)
+
AC_ARG_ENABLE(channel-type-call,
AC_HELP_STRING([--disable-channel-type-call],
[disable support for the draft Channel.Type.Call]),
diff --git a/gabble/Makefile.am b/gabble/Makefile.am
index de7a6cae9..1a44a96b6 100644
--- a/gabble/Makefile.am
+++ b/gabble/Makefile.am
@@ -1,4 +1,4 @@
-if ENABLE_PLUGINS
+if ENABLE_PLUGIN_API
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = telepathy-gabble.pc
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 041f3d1d9..c54ff9e0f 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -1,25 +1,34 @@
plugindir = $(libdir)/telepathy/gabble-0
-# installable plugins
-plugin_LTLIBRARIES = \
+installable_plugins = \
gateways.la
# testing-only plugins
noinst_LTLIBRARIES = \
test.la
+if ENABLE_PLUGINS
+plugin_LTLIBRARIES = $(installable_plugins)
+else
+# we still compile the plugin (just to make sure it compiles!) but we don't
+# install it
+noinst_LTLIBRARIES += $(installable_plugins)
+endif
+
+AM_LDFLAGS = -module -avoid-version -shared
+
test_la_SOURCES = \
test.c \
test.h
-test_la_LDFLAGS = -module -avoid-version -rpath $(plugindir) -lm
+# 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)
gateways_la_SOURCES = \
gateways.c \
gateways.h
-gateways_la_LDFLAGS = -module -avoid-version
-
AM_CFLAGS = $(ERROR_CFLAGS) @DBUS_CFLAGS@ @GLIB_CFLAGS@ @WOCKY_CFLAGS@ \
@TP_GLIB_CFLAGS@ \
-I $(top_gabbledir)/gabble -I $(top_builddir)/gabble \