From 3f24f048762736e1a5d785a080fec7e84172e708 Mon Sep 17 00:00:00 2001 From: Sergey 'Jin' Bostandzhyan Date: Wed, 11 Jan 2017 22:41:11 +0100 Subject: Setup autotools to read .so version info from a separate file We want to use the same libtool style .so versions in both build systems, ideally both systems should read the version information from the same configuration file. This commit introduces an so.version configuration file and sets up the autotools to use it. The version numbers in so.version define the ABI compatibility and should be updated prior to each release. implements #323 --- configure.ac | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index bdf64dc2..8efffef0 100644 --- a/configure.ac +++ b/configure.ac @@ -12,16 +12,6 @@ AC_CONFIG_MACRO_DIR([m4]) EXTRA_LT_LDFLAGS= -LIBTOXCORE_LT_VERSION=0:0:0 -dnl -dnl current:revision:age -dnl -dnl current: increment if interfaces have been added, removed or changed -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 - if test "x${prefix}" = "xNONE"; then prefix="${ac_default_prefix}" fi @@ -40,22 +30,19 @@ LIBCONFIG_FOUND="no" LIBCHECK_FOUND="no" WANT_NACL="no" ADD_NACL_OBJECTS_TO_PKGCONFIG="yes" - -TOXCORE_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION" -TOXAV_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION" +SET_SO_VERSION="yes" 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" + SET_SO_VERSION="no" + elif test "x$enableval" = "xyes"; then + SET_SO_VERSION="yes" fi ] ) - -AC_SUBST(TOXCORE_LT_LDFLAGS) -AC_SUBST(TOXAV_LT_LDFLAGS) +AM_CONDITIONAL(SET_SO_VERSION, test "x$SET_SO_VERSION" = "xyes") AC_ARG_ENABLE([nacl], [AC_HELP_STRING([--enable-nacl], [use nacl instead of libsodium (default: disabled)]) ], -- cgit v1.2.3