summaryrefslogtreecommitdiff
path: root/Build/source/m4/kpse-lib-version.m4
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-07-20 07:00:05 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-07-20 07:00:05 +0000
commit89755f7344de571c4b1b7c68e90de39363a4d1ff (patch)
treed735587f7030f0536272048df7a4b53cefc133a4 /Build/source/m4/kpse-lib-version.m4
parent713aef9b071ca2b5dd68d014e99897f0e5e2036c (diff)
libs/t1lib + texk/ps2pkm: bug fix and update
git-svn-id: svn://tug.org/texlive/trunk@23187 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4/kpse-lib-version.m4')
-rw-r--r--Build/source/m4/kpse-lib-version.m425
1 files changed, 25 insertions, 0 deletions
diff --git a/Build/source/m4/kpse-lib-version.m4 b/Build/source/m4/kpse-lib-version.m4
new file mode 100644
index 00000000000..b6fa4ce9908
--- /dev/null
+++ b/Build/source/m4/kpse-lib-version.m4
@@ -0,0 +1,25 @@
+# Private macros for the TeX Live (TL) tree.
+# Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org>
+#
+# This file is free software; the copyright holder
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# KPSE_LIB_VERSION(NAME)
+# ----------------------
+# Split NAME_version into NAME_major, NAME_minor, and NAME_micro
+# (ignoring lowercase letters forming an optional suffix).
+AC_DEFUN([KPSE_LIB_VERSION],
+[m4_bpatsubst($1_version, [^\([0-9]+\).\([0-9]+\).\([0-9]+\)[a-z]*$],
+ [m4_define([$1_major], [\1])m4_define([$1_minor], [\2])m4_define([$1_micro], [\3])])[]dnl
+]) # KPSE_LIB_VERSION
+
+# KPSE_LT_VERSION(NAME)
+# ---------------------
+# Split NAME_version as above and define _LT_VERSINFO.
+AC_DEFUN([KPSE_LT_VERSION],
+[KPSE_LIB_VERSION([$1])
+AC_SUBST(AS_TR_CPP($1)[_LT_VERSINFO],
+ [m4_eval($1_major+$1_minor):$1_micro:$1_minor])[]dnl
+]) # KPSE_LT_VERSION
+