1dnl as-mix-version.m4 2 3dnl AS_MIX_VERSION(PACKAGE, PREFIX, MAJOR, MINOR, RELEASE) 4 5dnl example 6dnl AS_MIX_VERSION(mixaudio,MIXAUDIO, 0, 3, 2,) 7dnl for a 0.3.2 release version 8 9dnl this macro 10dnl - defines [$PREFIX]_MAJOR, MINOR and REVISION, CURRENT, AGE 11dnl - defines [$PREFIX], VERSION 12dnl - AC_SUBST's all defined vars 13 14AC_DEFUN([AS_MIX_VERSION], 15[ 16 PACKAGE=[$1] 17 [$2]_MAJOR=[$3] 18 [$2]_MINOR=[$4] 19 [$2]_REVISION=[$5] 20 [$2]_CURRENT=m4_eval([$3] + [$4]) 21 [$2]_AGE=[$4] 22 VERSION=[$3].[$4].[$5] 23 24 AC_SUBST([$2]_MAJOR) 25 AC_SUBST([$2]_MINOR) 26 AC_SUBST([$2]_REVISION) 27 AC_SUBST([$2]_CURRENT) 28 AC_SUBST([$2]_AGE) 29 30 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define the package name]) 31 AC_SUBST(PACKAGE) 32 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define the version]) 33 AC_SUBST(VERSION) 34 35]) 36