summaryrefslogtreecommitdiffstats
path: root/m4/knot-lib-version.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:24:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:24:08 +0000
commitf449f278dd3c70e479a035f50a9bb817a9b433ba (patch)
tree8ca2bfb785dda9bb4d573acdf9b42aea9cd51383 /m4/knot-lib-version.m4
parentInitial commit. (diff)
downloadknot-aa9c0871046ffc355d61816f3f5b608b661cd589.tar.xz
knot-aa9c0871046ffc355d61816f3f5b608b661cd589.zip
Adding upstream version 3.2.6.upstream/3.2.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/knot-lib-version.m4')
-rw-r--r--m4/knot-lib-version.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/m4/knot-lib-version.m4 b/m4/knot-lib-version.m4
new file mode 100644
index 0000000..1627957
--- /dev/null
+++ b/m4/knot-lib-version.m4
@@ -0,0 +1,16 @@
+# KNOT_LIB_VERSION([library-name], [current], [revision], [age])
+# --------------------------------------------------------------
+# See https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+
+AC_DEFUN([KNOT_LIB_VERSION],
+[
+ m4_define([LIBNAME], patsubst($1, [^lib], []))dnl
+ AC_SUBST([$1_VERSION_INFO], ["-version-info $2:$3:$4"])
+ AC_SUBST([$1_SOVERSION], ["$2"])
+ AS_CASE([$host_os],
+ [darwin*], [AC_SUBST([$1_SONAME], ["$1.$2.dylib"])],
+ [cygwin*], [AC_SUBST([$1_SONAME], [["cyg]LIBNAME[-$2.dll"]])],
+ [msys*], [AC_SUBST([$1_SONAME], [["msys-]LIBNAME[-$2.dll"]])],
+ [*], [AC_SUBST([$1_SONAME], ["$1.so.$2"])]
+ )
+])