diff options
author | Marc Schink <jaylink-dev@marcschink.de> | 2016-10-11 18:54:11 +0200 |
---|---|---|
committer | Marc Schink <jaylink-dev@marcschink.de> | 2016-10-25 21:55:11 +0200 |
commit | fbf16f81dd74b2bcd53741f7e9b265158725ce43 (patch) | |
tree | 873e813cf4eb77a523837aba9a4b881e4d6bce1f /m4 | |
parent | cec02b8a258f91c8c6a4a088af02d165b90e95dc (diff) | |
download | libjaylink-fbf16f81dd74b2bcd53741f7e9b265158725ce43.zip libjaylink-fbf16f81dd74b2bcd53741f7e9b265158725ce43.tar.gz libjaylink-fbf16f81dd74b2bcd53741f7e9b265158725ce43.tar.bz2 |
Rework code for libtool versioning
Signed-off-by: Marc Schink <jaylink-dev@marcschink.de>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/jaylink.m4 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/m4/jaylink.m4 b/m4/jaylink.m4 index 409fc9f..7395421 100644 --- a/m4/jaylink.m4 +++ b/m4/jaylink.m4 @@ -61,3 +61,29 @@ AC_DEFUN([JAYLINK_SET_PACKAGE_VERSION], [ _JAYLINK_SET_PACKAGE_VERSION([$1], [$2], m4_unquote(m4_split(m4_expand([$2]), [\.]))) ]) + +## _JAYLINK_SET_LIBRARY_VERSION(prefix, version, current, revision, age) +## +m4_define([_JAYLINK_SET_LIBRARY_VERSION], [ + m4_assert([$# == 5]) + + AC_SUBST([$1_CURRENT], [$3]) + AC_SUBST([$1_REVISION], [$4]) + AC_SUBST([$1_AGE], [$5]) + AC_SUBST([$1], [$2]) +]) + +## JAYLINK_SET_LIBRARY_VERSION(prefix, version) +## +## Parse the library version string of the format <current>:<revision>:<age> +## and set the variables <prefix>_{CURRENT,REVISION,AGE} to their corresponding +## values. +## +## Set the variable <prefix> to the library version string. +## +AC_DEFUN([JAYLINK_SET_LIBRARY_VERSION], [ + m4_assert([$# == 2]) + + _JAYLINK_SET_LIBRARY_VERSION([$1], [$2], + m4_unquote(m4_split([$2], [:]))) +]) |