Debian Codegraph @

m4/kpse-lib-version.m4

raw
1 # Private macros for the TeX Live (TL) tree.
2 # Copyright (C) 2011-2015 Peter Breitenlohner <[email protected]>
3 #
4 # This file is free software; the copyright holder
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # KPSE_LIB_VERSION(NAME)
9 # ----------------------
10 # Split NAME_version into NAME_major, NAME_minor, and NAME_micro
11 # (ignoring an optional suffix starting with a non-digit).
12 AC_DEFUN([KPSE_LIB_VERSION],
13 [m4_bpatsubst($1_version, [^\([0-9]+\).\([0-9]+\).\([0-9]+\).*$],
14 [m4_define([$1_major], [\1])m4_define([$1_minor], [\2])m4_define([$1_micro], [\3])])[]dnl
15 ]) # KPSE_LIB_VERSION
16
17 # KPSE_LT_VERSION(NAME)
18 # ---------------------
19 # Split NAME_version as above and define NAME_LT_VERSINFO.
20 AC_DEFUN([KPSE_LT_VERSION],
21 [KPSE_LIB_VERSION([$1])
22 AC_SUBST(AS_TR_CPP($1)[_LT_VERSINFO],
23 [m4_eval($1_major+$1_minor):$1_micro:$1_minor])[]dnl
24 ]) # KPSE_LT_VERSION
25