5 ### mdw_LIBTOOL_VERSION_INFO
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.
15 ### Copyright (c) 2008 Mark Wooding <mdw@distorted.org.uk>
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.
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.
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/>.
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.
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.
44 AC_DEFUN([mdw_LIBTOOL_VERSION_INFO],
45 [case $PACKAGE_VERSION in
50 num="\(@<:@0-9@:>@@<:@0-9@:>@*\)"
51 set -- $(echo $PACKAGE_VERSION | sed "s:^$num\.$num\.$num.*\$:\1 \2 \3:")
54 LIBTOOL_VERSION_INFO="$(expr $[]1 + $[]2):$[]3:$[]2"
55 AC_SUBST([LIBTOOL_VERSION_INFO])])