1998-11-18 21:27:36 +00:00
|
|
|
dnl Check for ALSA driver package.
|
|
|
|
AC_DEFUN(ALSA_CHECK_DRIVER, [
|
|
|
|
AC_MSG_CHECKING(for alsa-driver package)
|
1998-11-18 20:42:09 +00:00
|
|
|
|
|
|
|
AC_TRY_COMPILE([
|
2001-05-09 11:57:51 +00:00
|
|
|
#include <sound/asound.h>
|
1998-11-18 21:27:36 +00:00
|
|
|
],[
|
1998-11-18 20:42:09 +00:00
|
|
|
void main(void)
|
|
|
|
{
|
2001-01-30 07:24:08 +00:00
|
|
|
#if !defined(SNDRV_PROTOCOL_VERSION) || !defined(SNDRV_PROTOCOL_INCOMPATIBLE)
|
1998-11-18 21:27:36 +00:00
|
|
|
#error not found
|
|
|
|
#else
|
2001-01-30 07:24:08 +00:00
|
|
|
#if !defined(SNDRV_PCM_IOCTL_REWIND)
|
1998-11-29 16:30:21 +00:00
|
|
|
#error wrong version
|
|
|
|
#endif
|
1998-11-18 20:42:09 +00:00
|
|
|
exit(0);
|
1998-11-18 21:27:36 +00:00
|
|
|
#endif
|
1998-11-18 20:42:09 +00:00
|
|
|
}
|
|
|
|
],
|
1998-11-18 21:27:36 +00:00
|
|
|
AC_MSG_RESULT(present),
|
1998-11-29 16:30:21 +00:00
|
|
|
[AC_MSG_RESULT(not found or wrong version);
|
2001-02-25 22:37:17 +00:00
|
|
|
AC_MSG_ERROR([Install alsa-driver v0.9.0 package first...])]
|
1998-11-18 20:42:09 +00:00
|
|
|
)
|
|
|
|
])
|
1998-11-21 18:47:42 +00:00
|
|
|
|
|
|
|
AC_DEFUN(SAVE_LIBRARY_VERSION, [
|
|
|
|
SND_LIB_VERSION=$VERSION
|
|
|
|
echo $VERSION > $srcdir/version
|
|
|
|
AC_DEFINE_UNQUOTED(VERSION, "$SND_LIB_VERSION")
|
|
|
|
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)
|
1999-11-07 09:38:36 +00:00
|
|
|
SND_LIB_SUBMINOR=`echo $VERSION | cut -d . -f 3 | sed -e 's/pre[[0-9]]*//g' -e 's/[[[:alpha:]]]*//g'`
|
1998-11-21 18:47:42 +00:00
|
|
|
AC_SUBST(SND_LIB_SUBMINOR)
|
|
|
|
])
|