From b9825218fc15b20504f7484460a35479a9c6bce1 Mon Sep 17 00:00:00 2001 From: sonOfRa Date: Thu, 20 Feb 2014 14:33:31 +0100 Subject: Add a configure flag for disabling soname versions The loader on Android cannot deal with soname versions properly. To circumvent this problem, libtool has a -avoid-version flag that does not versionate the shared libraries. To disable soname versions, "./configure --disable-soname". Soname versions are enabled by default, as only Android needs to disable them --- configure.ac | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 066c919a..1540360e 100644 --- a/configure.ac +++ b/configure.ac @@ -22,11 +22,6 @@ dnl revision: increment if source code has changed, set to zero if current is dnl incremented dnl age: increment if interfaces have been added, set to zero if dnl interfaces have been removed or changed -TOXCORE_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION" -TOXAV_LT_LDFLAGS="-version-info $LIBTOXAV_LT_VERSION" - -AC_SUBST(TOXCORE_LT_LDFLAGS) -AC_SUBST(TOXAV_LT_LDFLAGS) if test "x${prefix}" = "xNONE"; then prefix="${ac_default_prefix}" @@ -44,6 +39,22 @@ LIBCONFIG_FOUND="no" LIBCHECK_FOUND="no" WANT_NACL="no" +TOXCORE_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION" +TOXAV_LT_LDFLAGS="-version-info $LIBTOXAV_LT_VERSION" + +AC_ARG_ENABLE([soname-versions], + [AC_HELP_STRING([--enable-soname-versions], [enable soname versions (must be disabled for android) (default: enabled)]) ], + [ + if test "x$enableval" = "xno"; then + TOXCORE_LT_LDFLAGS="-avoid-version" + TOXAV_LT_LDFLAGS="-avoid-version" + fi + ] +) + +AC_SUBST(TOXCORE_LT_LDFLAGS) +AC_SUBST(TOXAV_LT_LDFLAGS) + AC_ARG_ENABLE([nacl], [AC_HELP_STRING([--enable-nacl], [use nacl instead of libsodium (default: disabled)]) ], [ -- cgit v1.2.3