From 502e4cd873c3b37b307b9f450ef827d40916c3d6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 21 May 2016 15:00:53 -0400 Subject: libtool: rework revision to fix OS X breakage It seems the OS X linker restricts the revision field to 8 bits. Rework how we calculate that value and pack it in closer to fit. It might produce some collisions if we get to like 2.2.8, but oh well ... this field doesn't need to be super exact. Fixes #214. --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a702d79..af4fb9f 100644 --- a/configure.ac +++ b/configure.ac @@ -38,10 +38,15 @@ AC_SUBST(GDLIB_VERSION) # See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info GDLIB_LT_CURRENT=3 +dnl This is the version where the soname (current above) changes. We use it +dnl to reset the revision base back to zero. It's a bit of a pain, but some +dnl systems restrict the revision range below to [0..255] (like OS X). +GDLIB_PREV_MAJOR=2 +GDLIB_PREV_MINOR=2 dnl This isn't 100% correct, but it tends to be a close enough approximation dnl for how we manage the codebase. It's rare to do a release that doesn't dnl modify the library since this project is centered around the library. -GDLIB_LT_REVISION=$(printf '%i%02i%02i' $GDLIB_MAJOR $GDLIB_MINOR $GDLIB_REVISION) +GDLIB_LT_REVISION=$(( ((GDLIB_MAJOR - GDLIB_PREV_MAJOR) << 6) | ((GDLIB_MINOR - GDLIB_PREV_MINOR) << 3) | GDLIB_REVISION )) GDLIB_LT_AGE=0 AC_SUBST(GDLIB_LT_CURRENT) AC_SUBST(GDLIB_LT_REVISION) -- cgit v1.2.1