diff mbox

[PATCHv6,2/4] configure.ac: make SO (shared object) version unique

Message ID 1422027750-25541-3-git-send-email-anders.roxell@linaro.org
State New
Headers show

Commit Message

Anders Roxell Jan. 23, 2015, 3:42 p.m. UTC
This converts the ODP versioning number into a SO versioning nubmer.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewd-by: Steve McIntyre <steve.mcintyre@linaro.org>
---
 configure.ac          | 9 +++++++++
 platform/Makefile.inc | 2 ++
 2 files changed, 11 insertions(+)
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 407b213..6d30f87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,6 +42,13 @@  AC_TYPE_UINT32_T
 AC_TYPE_UINT64_T
 
 ##########################################################################
+# Set correct platform library version
+##########################################################################
+AGE=0
+ODP_LIBSO_VERSION=$(echo $VERSION.$AGE | awk -F . '{printf("%d:%d:%d\n", (($1 * 100) + $2), $3, $4)}')
+AC_SUBST(ODP_LIBSO_VERSION)
+
+##########################################################################
 # Determine which platform to build for
 ##########################################################################
 AC_ARG_WITH([platform],
@@ -231,6 +238,8 @@  AC_MSG_RESULT([
 	$PACKAGE $VERSION
 	========
 
+	Library version:	${ODP_LIBSO_VERSION}
+
 	with_platform:		${with_platform}
 	prefix:			${prefix}
 	sysconfdir:		${sysconfdir}
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 6ffa2ad..9e73fc4 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -9,3 +9,5 @@  pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp.pc
 
 VPATH = $(srcdir) $(builddir)
 lib_LTLIBRARIES = $(LIB)/libodp.la
+
+AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'