aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac20
-rw-r--r--src/sound.c6
2 files changed, 1 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac
index 6c83d61921e..e39a4380523 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1731,26 +1731,6 @@ if test "${with_sound}" != "no"; then
1731 ALSA_MODULES="alsa >= $ALSA_REQUIRED" 1731 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
1732 EMACS_CHECK_MODULES([ALSA], [$ALSA_MODULES]) 1732 EMACS_CHECK_MODULES([ALSA], [$ALSA_MODULES])
1733 if test $HAVE_ALSA = yes; then 1733 if test $HAVE_ALSA = yes; then
1734 SAVE_CFLAGS="$CFLAGS"
1735 SAVE_LIBS="$LIBS"
1736 CFLAGS="$ALSA_CFLAGS $CFLAGS"
1737 LIBS="$ALSA_LIBS $LIBS"
1738 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <asoundlib.h>]], [[snd_lib_error_set_handler (0);]])],
1739 emacs_alsa_normal=yes,
1740 emacs_alsa_normal=no)
1741 if test "$emacs_alsa_normal" != yes; then
1742 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <alsa/asoundlib.h>]],
1743 [[snd_lib_error_set_handler (0);]])],
1744 emacs_alsa_subdir=yes,
1745 emacs_alsa_subdir=no)
1746 if test "$emacs_alsa_subdir" != yes; then
1747 AC_MSG_ERROR([pkg-config found alsa, but it does not compile. See config.log for error messages.])
1748 fi
1749 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
1750 fi
1751
1752 CFLAGS="$SAVE_CFLAGS"
1753 LIBS="$SAVE_LIBS"
1754 LIBSOUND="$LIBSOUND $ALSA_LIBS" 1734 LIBSOUND="$LIBSOUND $ALSA_LIBS"
1755 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" 1735 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
1756 AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) 1736 AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.])
diff --git a/src/sound.c b/src/sound.c
index 4ba826e82c4..44d4cbc6d56 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -72,12 +72,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
72#include <soundcard.h> 72#include <soundcard.h>
73#endif 73#endif
74#ifdef HAVE_ALSA 74#ifdef HAVE_ALSA
75#ifdef ALSA_SUBDIR_INCLUDE
76#include <alsa/asoundlib.h> 75#include <alsa/asoundlib.h>
77#else 76#endif
78#include <asoundlib.h>
79#endif /* ALSA_SUBDIR_INCLUDE */
80#endif /* HAVE_ALSA */
81 77
82/* END: Non Windows Includes */ 78/* END: Non Windows Includes */
83 79