Simplify alsa checking: we can use the standard AM_PATH_ALSA macro to check that we don't have alsa 0.9.x: we just ne...

Original commit message from CVS:
Simplify alsa checking: we can use the standard AM_PATH_ALSA macro to
check that we don't have alsa 0.9.x: we just need to specify something
for ACTION_NOT_FOUND to override the default AC_MSG_ERROR behaviour, so
I've put a colon for ACTION_NOT_FOUND. ;-)
Also, update the alsa macro in acinclude with the latest from the alsa
project CVS.
This commit is contained in:
Richard Boulton 2001-05-29 12:31:21 +00:00
parent eb20f704f3
commit b2af90dcb6
3 changed files with 14 additions and 56 deletions

View file

@ -53,6 +53,9 @@ fi
dnl add the alsa library
ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl"
LIBS=`echo $LIBS | sed 's/-lm//'`
LIBS=`echo $LIBS | sed 's/-ldl//'`
LIBS=`echo $LIBS | sed 's/ //'`
LIBS="$ALSA_LIBS $LIBS"
AC_MSG_RESULT($ALSA_LIBS)
@ -122,6 +125,9 @@ AC_CHECK_LIB([asound], [snd_defaults_card],,
if test "x$alsa_found" = "xyes" ; then
ifelse([$2], , :, [$2])
LIBS=`echo $LIBS | sed 's/-lasound//g'`
LIBS=`echo $LIBS | sed 's/ //'`
LIBS="-lasound $LIBS"
fi
if test "x$alsa_found" = "xno" ; then
ifelse([$3], , :, [$3])

View file

@ -254,37 +254,13 @@ dnl AM_PATH_XMMS(0.1.0, HAVE_LIBXMMS=yes, HAVE_LIBXMMS=no)
dnl Check for libasound
alsa_save_LIBS=$LIBS
alsa_save_CFLAGS=$CFLAGS
AM_PATH_ALSA(0.5.0, HAVE_LIBASOUND=yes,
AM_PATH_ALSA(0.5.0, HAVE_LIBASOUND=yes, HAVE_LIBASOUND=no)
AM_PATH_ALSA(0.9.0,
HAVE_LIBASOUND=no
AC_MSG_WARN(
***** NOTE: These plugins won't be built: gstalsa
))
if test x$HAVE_LIBASOUND = xyes;then
AC_MSG_CHECKING(alsa libs == 0.5.x, not 0.9.x)
AC_TRY_COMPILE([
#include <sys/asoundlib.h>
], [
#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
#endif
void main(void) {
// succeed only if it's 0.5.x
#if (SND_LIB_MINOR == 5)
exit(0);
#else
#error not 0.5.x
#endif
exit(1);
}
],AC_MSG_RESULT(0.5.x),
AC_MSG_RESULT(no)
AC_MSG_WARN(
AC_MSG_WARN(Alsa 0.9.x not yet supported.
***** NOTE: These plugins won't be built: gstalsa
)
HAVE_LIBASOUND=no)
fi
,:)
LIBS=$alsa_save_LIBS
CFLAGS=$alsa_save_CFLAGS

View file

@ -251,37 +251,13 @@ dnl AM_PATH_XMMS(0.1.0, HAVE_LIBXMMS=yes, HAVE_LIBXMMS=no)
dnl Check for libasound
alsa_save_LIBS=$LIBS
alsa_save_CFLAGS=$CFLAGS
AM_PATH_ALSA(0.5.0, HAVE_LIBASOUND=yes,
AM_PATH_ALSA(0.5.0, HAVE_LIBASOUND=yes, HAVE_LIBASOUND=no)
AM_PATH_ALSA(0.9.0,
HAVE_LIBASOUND=no
AC_MSG_WARN(
***** NOTE: These plugins won't be built: gstalsa
))
if test x$HAVE_LIBASOUND = xyes;then
AC_MSG_CHECKING(alsa libs == 0.5.x, not 0.9.x)
AC_TRY_COMPILE([
#include <sys/asoundlib.h>
], [
#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
#endif
void main(void) {
// succeed only if it's 0.5.x
#if (SND_LIB_MINOR == 5)
exit(0);
#else
#error not 0.5.x
#endif
exit(1);
}
],AC_MSG_RESULT(0.5.x),
AC_MSG_RESULT(no)
AC_MSG_WARN(
AC_MSG_WARN(Alsa 0.9.x not yet supported.
***** NOTE: These plugins won't be built: gstalsa
)
HAVE_LIBASOUND=no)
fi
,:)
LIBS=$alsa_save_LIBS
CFLAGS=$alsa_save_CFLAGS