1AC_DEFUN([SAVE_LIBRARY_VERSION], [ 2AC_MSG_CHECKING(for library version) 3SND_LIB_VERSION=$VERSION 4echo $VERSION > $srcdir/version 5AC_DEFINE_UNQUOTED(VERSION, "$SND_LIB_VERSION", [sound library version string]) 6AC_SUBST(SND_LIB_VERSION) 7SND_LIB_MAJOR=`echo $VERSION | cut -d . -f 1` 8AC_SUBST(SND_LIB_MAJOR) 9SND_LIB_MINOR=`echo $VERSION | cut -d . -f 2` 10AC_SUBST(SND_LIB_MINOR) 11SND_LIB_SUBMINOR=`echo $VERSION | cut -d . -f 3 | sed -e 's/^\([[^[:alpha:]]]*\)\(.*\)$/\1/g'` 12AC_SUBST(SND_LIB_SUBMINOR) 13SND_LIB_EXTRASTR=`echo $VERSION | cut -d . -f 3 | sed -e 's/^\([[^[:alpha:]]]*\)\([[[:alpha:]]]*\)\([[[:digit:]]]*\)\(.*\)$/\2/g'` 14SND_LIB_EXTRAVER=`echo $VERSION | cut -d . -f 3 | sed -e 's/^\([[^[:alpha:]]]*\)\([[[:alpha:]]]*\)\([[[:digit:]]]*\)\(.*\)$/\3/g'` 15case "$SND_LIB_EXTRASTR" in 16 pre) SND_LIB_EXTRAVER=`expr $SND_LIB_EXTRAVER + 00000` ;; 17 alpha) SND_LIB_EXTRAVER=`expr $SND_LIB_EXTRAVER + 10000` ;; 18 beta) SND_LIB_EXTRAVER=`expr $SND_LIB_EXTRAVER + 20000` ;; 19 rc) SND_LIB_EXTRAVER=`expr $SND_LIB_EXTRAVER + 100000` ;; 20 *) SND_LIB_EXTRAVER=1000000 ;; 21esac 22AC_MSG_RESULT(major $SND_LIB_MAJOR minor $SND_LIB_MINOR subminor $SND_LIB_SUBMINOR extrastr $SND_LIB_EXTRASTR extraver $SND_LIB_EXTRAVER) 23AC_SUBST(SND_LIB_EXTRAVER) 24]) 25