summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@gmail.com>2011-11-06 15:41:49 -0500
committerTim Kientzle <kientzle@gmail.com>2011-11-06 15:41:49 -0500
commitf2488cf6d55df8862bda15071dadfa16f81a2ec7 (patch)
tree18d0d3b668c44deff3621dd7aea1a36478eeb625
parent13bdf85b81ac53e273bcf84af4435abe47f24fc5 (diff)
downloadlibarchive-f2488cf6d55df8862bda15071dadfa16f81a2ec7.tar.gz
Update shared library version computation for upcoming 3.0.0a release.
SVN-Revision: 3754
-rw-r--r--CMakeLists.txt13
-rw-r--r--configure.ac17
2 files changed, 22 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e16ff47b..03dbefd5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,8 +34,17 @@ SET(BSDCPIO_VERSION_STRING "${VERSION}")
SET(BSDTAR_VERSION_STRING "${VERSION}")
SET(LIBARCHIVE_VERSION_NUMBER "${_version_number}")
SET(LIBARCHIVE_VERSION_STRING "${VERSION}")
-# Shared library number
-SET(SOVERSION 8)
+
+# INTERFACE_VERSION increments with every release
+# libarchive 2.7 == interface version 9 = 2 + 7
+# libarchive 2.8 == interface version 10 = 2 + 8
+# libarchive 3.0 == interface version 11
+# libarchive 3.x == interface version 11 + x
+math(EXPR INTERFACE_VERSION "11 + ${_minor}")
+
+# Set SOVERSION == Interface version
+# ?? Should there be more here ??
+SET(SOVERSION "${INTERFACE_VERSION}")
# Especially for early development, we want to be a little
# aggressive about diagnosing build problems; this can get
diff --git a/configure.ac b/configure.ac
index 7a67a830..14b62905 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,14 +27,19 @@ AC_CONFIG_MACRO_DIR([build/autoconf])
# Must follow AC_CONFIG macros above...
AM_INIT_AUTOMAKE()
-# Libtool versioning uses different conventions on different
-# platforms. At least on FreeBSD, libtool uses an overly complex
-# convention that attempts to solve problems that most people just
-# don't have and which just causes confusion for most end users.
-ARCHIVE_MAJOR=$(( LIBARCHIVE_VERSION_N() / 1000000 ))
+# Libtool's "interface version" can be computed from the libarchive version.
+
+# Libtool interface version bumps on any API change, so increments
+# whenever libarchive minor version does.
ARCHIVE_MINOR=$(( (LIBARCHIVE_VERSION_N() / 1000) % 1000 ))
+# Libarchive 2.7 == libtool interface 9 = 2 + 7
+# Libarchive 2.8 == libtool interface 10 = 2 + 8
+# Libarchive 3.0 == libtool interface 11 (assumes there's no libarchive 2.9)
+# Libarchive 3.x == libtool interface 11 + x
+ARCHIVE_LIBTOOL_MAJOR=`echo $((11 + ${ARCHIVE_MINOR}))`
+# Libarchive revision is bumped on any source change === libtool revision
ARCHIVE_REVISION=$(( LIBARCHIVE_VERSION_N() % 1000 ))
-ARCHIVE_LIBTOOL_MAJOR=`echo $((${ARCHIVE_MAJOR} + ${ARCHIVE_MINOR}))`
+# Libarchive minor is bumped on any interface addition === libtool age
ARCHIVE_LIBTOOL_VERSION=$ARCHIVE_LIBTOOL_MAJOR:$ARCHIVE_REVISION:$ARCHIVE_MINOR
# Stick the version numbers into config.h