Commit 3077d2fffc55aff310eb4f5e2bb82ba176bce5c1

Guillem Jover 2013-07-12T22:15:58

build: Move version ABI from Makefile to configure.ac It's easier to find there, and the value can be reused in case we have to provide another shared library.

diff --git a/configure.ac b/configure.ac
index e63ebfe..a390d0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,13 @@ AM_INIT_AUTOMAKE([1.8 foreign nostdinc no-dist-gzip dist-xz])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
                             [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
 
+LIBBSD_ABI_MAJOR=0
+LIBBSD_ABI_MINOR=5
+LIBBSD_ABI_PATCH=2
+
+LIBBSD_ABI="$LIBBSD_ABI_MAJOR:$LIBBSD_ABI_MINOR:$LIBBSD_ABI_PATCH"
+AC_SUBST([LIBBSD_ABI])
+
 # Check and store if we got user supplied variables
 user_CFLAGS=${CFLAGS-unset}
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 08c0d54..96fee3e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,7 +34,7 @@ libbsd_la_DEPENDENCIES = \
 	libbsd.map
 libbsd_la_LDFLAGS = \
 	-Wl,--version-script=$(srcdir)/libbsd.map \
-	-version-number 0:5:2
+	-version-number $(LIBBSD_ABI)
 libbsd_la_SOURCES = \
 	arc4random.c \
 	bsd_getopt.c \