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

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

Commit Message

Anders Roxell Jan. 20, 2015, 1:51 p.m.
This converts the ODP versioning number into a SO versioning nubmer.

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

Comments

Steve McIntyre Jan. 20, 2015, 2:19 p.m. | #1
On Tue, Jan 20, 2015 at 02:51:34PM +0100, Anders Roxell wrote:
>This converts the ODP versioning number into a SO versioning nubmer.
>
>Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

Reviewed-by: Steve McIntyre <steve.mcintyre@linaro.org>

>---
> configure.ac          | 9 +++++++++
> platform/Makefile.inc | 2 ++
> 2 files changed, 11 insertions(+)
>
>diff --git a/configure.ac b/configure.ac
>index c85ffc2..7fb8fa7 100644
>--- a/configure.ac
>+++ b/configure.ac
>@@ -37,6 +37,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)'
>-- 
>2.1.4
>
>
>_______________________________________________
>lng-odp mailing list
>lng-odp@lists.linaro.org
>http://lists.linaro.org/mailman/listinfo/lng-odp
>
Cheers,

Patch

diff --git a/configure.ac b/configure.ac
index c85ffc2..7fb8fa7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,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)'