X-Git-Url: https://git.distorted.org.uk/~mdw/cfd/blobdiff_plain/ae4e0977c7e5762116907a1913f15f2414f07ac1..fb2149fc2dc1d5f4936b2af31be7c7bd02f83324:/m4/mdw-libtool-version-info.m4 diff --git a/m4/mdw-libtool-version-info.m4 b/m4/mdw-libtool-version-info.m4 new file mode 100644 index 0000000..2f19157 --- /dev/null +++ b/m4/mdw-libtool-version-info.m4 @@ -0,0 +1,21 @@ +dnl -*-autoconf-*- + +dnl --- *@-mdw_LIBTOOL_VERSION_INFO-@* --- +dnl +dnl Author: Mark Wooding +dnl +dnl Synopsis: mdw_LIBTOOL_VERSION +dnl +dnl Arguments: --- +dnl +dnl Use: Decodes the PACKAGE_VERSION variable as a libtool +dnl version-info string. Strictly speaking, this is very +dnl naughty. + +AC_DEFUN([mdw_LIBTOOL_VERSION_INFO], [ + set -- $(echo $PACKAGE_VERSION | + sed 's:[^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$]:\1 \2 \3:' + ) + LIBTOOL_VERSION_INFO="$(expr $[]1 + $[]2):$[]3:$[]2" + AC_SUBST([LIBTOOL_VERSION_INFO]) +])