m4/: Reformat to match current m4/shell style.
[runlisp] / m4 / mdw-libtool-version-info.m4
CommitLineData
fb2149fc
MW
1dnl -*-autoconf-*-
2
0bef29cb
MW
3### SYNOPSIS
4###
5### mdw_LIBTOOL_VERSION_INFO
6###
7### DESCRIPTION
8###
9### Decodes the `PACKAGE_VERSION' variable as a `libtool' version-info
10### string, available as the `@LIBTOOL_VERSION_INFO@' substitution.
11### Strictly speaking, this is very naughty.
12###
13### LICENSE
14###
15### Copyright (c) 2008 Mark Wooding <mdw@distorted.org.uk>
16###
17### This program is free software: you can redistribute it and/or modify it
18### under the terms of the GNU General Public License as published by the
19### Free Software Foundation, either version 2 of the License, or (at your
20### option) any later version.
21###
22### This program is distributed in the hope that it will be useful, but
23### WITHOUT ANY WARRANTY; without even the implied warranty of
24### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25### General Public License for more details.
26###
27### You should have received a copy of the GNU General Public License along
28### with this program. If not, see <http://www.gnu.org/licenses/>.
29###
30### As a special exception, the respective Autoconf Macro's copyright owner
31### gives unlimited permission to copy, distribute and modify the configure
32### scripts that are the output of Autoconf when processing the Macro. You
33### need not follow the terms of the GNU General Public License when using
34### or distributing such scripts, even though portions of the text of the
35### Macro appear in them. The GNU General Public License (GPL) does govern
36### all other use of the material that constitutes the Autoconf Macro.
37###
38### This special exception to the GPL applies to versions of the Autoconf
39### Macro released by the Autoconf Archive. When you make and distribute a
40### modified version of the Autoconf Macro, you may extend this special
41### exception to the GPL to apply to your modified version as well.
fb2149fc 42
0bef29cb 43# serial 1
d663db3a
MW
44AC_DEFUN([mdw_LIBTOOL_VERSION_INFO],
45[set -- $(echo $PACKAGE_VERSION |
46 sed 's:[^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$]:\1 \2 \3:')
47LIBTOOL_VERSION_INFO="$(expr $[]1 + $[]2):$[]3:$[]2"
48AC_SUBST([LIBTOOL_VERSION_INFO])])