summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/alsa.m410
-rw-r--r--src/audio_out/audio_alsa_out.c8
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 <stdlib.h>
#include <string.h>
-#include <sys/asoundlib.h>
+#include <$asoundlib_h>
int main() {
int major, minor, micro;
@@ -146,7 +152,7 @@ dnl
#include <stdlib.h>
#include <string.h>
-#include <sys/asoundlib.h>
+#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 <James@superbug.demon.co.uk>
*
*
- * $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 <fcntl.h>
#include <math.h>
#include <alloca.h>
+
+#ifdef HAVE_ALSA_ASOUNDLIB_H
+#include <alsa/asoundlib.h>
+#elif HAVE_SYS_ASOUNDLIB_H
#include <sys/asoundlib.h>
+#endif
+
#include <sys/ioctl.h>
#include <inttypes.h>
#include <pthread.h>