third_party_alsa-lib/acinclude.m4

25 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2004-01-26 15:52:17 +00:00
AC_DEFUN([SAVE_LIBRARY_VERSION], [
2001-11-24 10:13:33 +00:00
AC_MSG_CHECKING(for library version)
SND_LIB_VERSION=$VERSION
echo $VERSION > $srcdir/version
2003-03-07 16:55:24 +00:00
AC_DEFINE_UNQUOTED(VERSION, "$SND_LIB_VERSION", [sound library version string])
AC_SUBST(SND_LIB_VERSION)
SND_LIB_MAJOR=`echo $VERSION | cut -d . -f 1`
AC_SUBST(SND_LIB_MAJOR)
SND_LIB_MINOR=`echo $VERSION | cut -d . -f 2`
AC_SUBST(SND_LIB_MINOR)
2001-10-04 07:55:24 +00:00
SND_LIB_SUBMINOR=`echo $VERSION | cut -d . -f 3 | sed -e 's/^\([[^[:alpha:]]]*\)\(.*\)$/\1/g'`
AC_SUBST(SND_LIB_SUBMINOR)
2003-03-05 14:30:12 +00:00
SND_LIB_EXTRASTR=`echo $VERSION | cut -d . -f 3 | sed -e 's/^\([[^[:alpha:]]]*\)\([[[:alpha:]]]*\)\([[[:digit:]]]*\)\(.*\)$/\2/g'`
SND_LIB_EXTRAVER=`echo $VERSION | cut -d . -f 3 | sed -e 's/^\([[^[:alpha:]]]*\)\([[[:alpha:]]]*\)\([[[:digit:]]]*\)\(.*\)$/\3/g'`
2001-11-24 10:13:33 +00:00
case "$SND_LIB_EXTRASTR" in
2001-11-24 10:19:59 +00:00
pre) SND_LIB_EXTRAVER=`expr $SND_LIB_EXTRAVER + 00000` ;;
2001-11-24 10:13:33 +00:00
alpha) SND_LIB_EXTRAVER=`expr $SND_LIB_EXTRAVER + 10000` ;;
beta) SND_LIB_EXTRAVER=`expr $SND_LIB_EXTRAVER + 20000` ;;
rc) SND_LIB_EXTRAVER=`expr $SND_LIB_EXTRAVER + 100000` ;;
*) SND_LIB_EXTRAVER=1000000 ;;
2001-11-24 10:13:33 +00:00
esac
AC_MSG_RESULT(major $SND_LIB_MAJOR minor $SND_LIB_MINOR subminor $SND_LIB_SUBMINOR extrastr $SND_LIB_EXTRASTR extraver $SND_LIB_EXTRAVER)
AC_SUBST(SND_LIB_EXTRAVER)
])