From 391bdc4d345ccc58ee98b692c789e4b36ca4e247 Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Sat, 27 Apr 2002 14:04:53 +0000 Subject: Try do use the right asoundlib header file (avoid warning message). CVS patchset: 1780 CVS date: 2002/04/27 14:04:53 --- m4/alsa.m4 | 10 ++++++++-- src/audio_out/audio_alsa_out.c | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/m4/alsa.m4 b/m4/alsa.m4 index 67e5d1049..7918cfc62 100644 --- a/m4/alsa.m4 +++ b/m4/alsa.m4 @@ -65,6 +65,11 @@ if test x"$enable_alsa" != "xno"; then fi ALSA_CFLAGS="$ALSA_CFLAGS" + AC_CHECK_HEADERS(alsa/asoundlib.h, + asoundlib_h="alsa/asoundlib.h", + AC_CHECK_HEADERS(sys/asoundlib.h, + asoundlib_h="sys/asoundlib.h")) + min_alsa_version=ifelse([$1], ,0.1.1,$1) AC_MSG_CHECKING([for ALSA version >= $min_alsa_version]) if test "x$enable_alsatest" = "xyes" ; then @@ -76,6 +81,7 @@ if test x"$enable_alsa" != "xno"; then dnl dnl Now check if the installed ALSA is sufficiently new. dnl + AC_LANG_SAVE() AC_LANG_C() rm -f conf.alsatest @@ -84,7 +90,7 @@ dnl #include #include -#include +#include <$asoundlib_h> int main() { int major, minor, micro; @@ -146,7 +152,7 @@ dnl #include #include -#include +#include <$asoundlib_h> int main() { diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 1da6c2235..3aa136877 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -26,7 +26,7 @@ * (c) 2001 James Courtier-Dutton * * - * $Id: audio_alsa_out.c,v 1.50 2002/04/15 00:50:44 jcdutton Exp $ + * $Id: audio_alsa_out.c,v 1.51 2002/04/27 14:04:53 f1rmb Exp $ */ #ifdef HAVE_CONFIG_H @@ -41,7 +41,13 @@ #include #include #include + +#ifdef HAVE_ALSA_ASOUNDLIB_H +#include +#elif HAVE_SYS_ASOUNDLIB_H #include +#endif + #include #include #include -- cgit v1.2.3