From b523858c0ce6b534b64d34f35c0dd9f5856caa8a Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Mon, 25 Jul 2022 17:01:28 +0100 Subject: [PATCH] Allow building with sndio on Linux --- configure.ac | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index eae574d..36de381 100644 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,8 @@ AC_ARG_ENABLE(alsa, [ --disable-alsa don't compile ALSA support]) AC_ARG_ENABLE(pulseaudio, [ --enable-pulseaudio compile PulseAudio support]) +AC_ARG_ENABLE(sndio, + [ --disable-sndio don't compile sndio support]) AC_SUBST(LD_VERSCRIPT) AC_CANONICAL_HOST @@ -164,6 +166,14 @@ AS_IF([test "$enable_pulseaudio" = "yes"], [ AM_CONDITIONAL([SOUND_PULSEAUDIO], [true]) ]) +if test "${enable_sndio}" != "no"; then + AC_CHECK_HEADER(sndio.h) + if test "${ac_cv_header_sndio_h}" = "yes"; then + AC_DEFINE(SOUND_SNDIO, 1, [ ]) + AM_CONDITIONAL([SOUND_SNDIO], [true]) + fi +fi + case "${host_os}" in amigaos*|aros*|morphos*) AC_DEFINE(SOUND_AHI, 1, [ ]) @@ -178,17 +188,6 @@ darwin*) AC_SUBST([XMP_DARWIN_LDFLAGS]) fi ;; -openbsd*|freebsd*) - AC_CHECK_HEADER(sndio.h) - if test "${ac_cv_header_sndio_h}" = "yes"; then - AC_DEFINE(SOUND_SNDIO, 1, [ ]) - AM_CONDITIONAL([SOUND_SNDIO], [true]) - fi - if test "${ac_cv_header_sys_audioio_h}" = "yes"; then - AC_DEFINE(SOUND_BSD, 1, [ ]) - AM_CONDITIONAL([SOUND_BSD], [true]) - fi - ;; netbsd*) if test "${ac_cv_header_sys_audioio_h}" = "yes"; then AC_DEFINE(SOUND_NETBSD, 1, [ ])