summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 =