From 520016c06c3c7440c925bde233842deafce76208 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 23 Feb 2012 11:52:59 +0000 Subject: [PATCH] If configured with --enable-shared-suffix=*, install a shared library 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"). --- configure.ac | 10 ++++++++++ wocky/Makefile.am | 9 +++++++++ 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 = -- 1.7.9.1