diff --git a/configure b/configure index 411e2f9e0d4..3d6e2ab2cc7 100755 --- a/configure +++ b/configure @@ -9188,7 +9188,8 @@ fi ALSALIBS="" -for ac_header in sys/asoundlib.h + +for ac_header in alsa/asoundlib.h sys/asoundlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -9296,12 +9297,12 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - + break fi done -if test "$ac_cv_header_sys_asoundlib_h" = "yes" +if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes" then echo "$as_me:$LINENO: checking for snd_pcm_open in -lasound" >&5 echo $ECHO_N "checking for snd_pcm_open in -lasound... $ECHO_C" >&6 diff --git a/configure.ac b/configure.ac index ee26e44fb6d..139403eee37 100644 --- a/configure.ac +++ b/configure.ac @@ -588,8 +588,8 @@ fi dnl **** Check for ALSA **** AC_SUBST(ALSALIBS,"") -AC_CHECK_HEADERS(sys/asoundlib.h) -if test "$ac_cv_header_sys_asoundlib_h" = "yes" +AC_CHECK_HEADERS(alsa/asoundlib.h sys/asoundlib.h, break) +if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes" then AC_CHECK_LIB(asound,snd_pcm_open, AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA including devel headers]) diff --git a/dlls/winmm/winealsa/alsa.h b/dlls/winmm/winealsa/alsa.h index bcf68f2176e..844783a5a1d 100644 --- a/dlls/winmm/winealsa/alsa.h +++ b/dlls/winmm/winealsa/alsa.h @@ -19,7 +19,9 @@ # error You must include config.h to use this header #endif -#ifdef HAVE_SYS_ASOUNDLIB_H +#ifdef HAVE_ALSA_ASOUNDLIB_H +#include +#elif defined(HAVE_SYS_ASOUNDLIB_H) #include #endif #ifdef HAVE_SYS_ERRNO_H diff --git a/include/config.h.in b/include/config.h.in index a0e545c0b99..751cf86eb99 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -23,6 +23,9 @@ /* Define if you have ALSA including devel headers */ #undef HAVE_ALSA +/* Define to 1 if you have the header file. */ +#undef HAVE_ALSA_ASOUNDLIB_H + /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H