summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-02-23 11:52:59 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-02-23 11:52:59 +0000
commit520016c06c3c7440c925bde233842deafce76208 (patch)
tree05d611d4a4524d930ced34baf49a1319032a2417
parent8db06f5deefc6dd61504e769ee4d534f182c3a77 (diff)
If configured with --enable-shared-suffix=*, install a shared libraryHEADmaster
The suffix should be something like gabble-0.15.4, to yield libwocky-gabble-0.15.4.so ("the Wocky from Gabble 0.15.4").
-rw-r--r--configure.ac10
-rw-r--r--wocky/Makefile.am9
2 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3f23fdc..bacab3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,6 +99,16 @@ AM_CONDITIONAL(INSTALL_HEADERS, test x$with_installed_headers != x)
HEADER_DIR=$with_installed_headers
AC_SUBST(HEADER_DIR)
+dnl Build a shared library even though Wocky isn't stable yet?
+AC_ARG_ENABLE([shared-suffix],
+ AC_HELP_STRING([--enable-shared-suffix=],
+ [install a shared library with a version-specific suffix]),
+ [],
+ [enable_shared_suffix=])
+AM_CONDITIONAL([ENABLE_SHARED_SUFFIX], [test x$enable_shared_suffix != x])
+SHARED_SUFFIX="$enable_shared_suffix"
+AC_SUBST([SHARED_SUFFIX])
+
dnl Check for code generation tools
AC_HEADER_STDC([])
AC_CHECK_HEADERS_ONCE([unistd.h])
diff --git a/wocky/Makefile.am b/wocky/Makefile.am
index c402f70..8d3440e 100644
--- a/wocky/Makefile.am
+++ b/wocky/Makefile.am
@@ -1,6 +1,15 @@
include $(top_srcdir)/tools/flymake.mk
+if ENABLE_SHARED_SUFFIX
+lib_LTLIBRARIES = libwocky.la
+
+libwocky_la_LDFLAGS = \
+ -no-undefined \
+ -release $(SHARED_SUFFIX) \
+ $(NULL)
+else
noinst_LTLIBRARIES = libwocky.la
+endif
EXTRA_DIST =