From 2525908843135e070ce58e4e8797cce4ae385489 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Tue, 12 Aug 2025 17:54:16 +0100 Subject: [PATCH] * configure.ac: Pass complete library version information to libtool via $SVN_LT_SOVERSION, so library filenames are unique to each release rather than constant, while keeping the sonames intact. Examples for SVN 1.14.5: Filename before: libsvn_subr-1.so.0.0.0 Filename after: libsvn_subr-1.so.0.14.5 SONAME before and after: libsvn_subr-1.so.0 --- configure.ac | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1a7249c4241eb..58e6b8fbd24ca 100644 --- a/configure.ac +++ b/configure.ac @@ -218,7 +218,28 @@ else SVN_APR_MAJOR_VERSION=1 fi AC_SUBST(SVN_APR_MAJOR_VERSION) -SVN_LT_SOVERSION="-version-info $svn_lib_ver" + +# For libtool library versioning, follow the interface rules at: +# https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html +# for SVN ..: +# +# 1. the oldest version supported is always 0 (or 2 for the above APR2 +# variant), corresponding to the ABI at .0.0; changes to +# are reflected in the library names like "libsvn_subr-1.la" +# +# 2. the current version and age of the ABI both equal , since +# SVN minor versions always maintain backwards-compatibility to +# .0; in the APR2 variant, the current version is 2+. +# +# 3. the revision is equal to the number. + +m4_define([svn_ver_major], m4_bpatsubst(AC_PACKAGE_VERSION, [\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)], [\1])) +m4_define([svn_ver_minor], m4_bpatsubst(AC_PACKAGE_VERSION, [\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)], [\2])) +m4_define([svn_ver_patch], m4_bpatsubst(AC_PACKAGE_VERSION, [\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)], [\3])) +svn_ver_current="`expr $svn_lib_ver + svn_ver_minor`" + +SVN_LT_SOVERSION="-version-info $svn_ver_current:svn_ver_patch:svn_ver_minor" + AC_SUBST(SVN_LT_SOVERSION) AC_DEFINE_UNQUOTED(SVN_SOVERSION, $svn_lib_ver, [Subversion library major version])