summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
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)