From ebd023a3c07aad609d8ee1c0195b0016b300c4e8 Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Fri, 13 Jul 2018 20:24:27 -0400 Subject: Improve OSS4 detection on Linux. --- configure.ac | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 90cf02f..4585cd4 100644 --- a/configure.ac +++ b/configure.ac @@ -216,12 +216,17 @@ AS_CASE(["$systems"], [*" oss "*], [ AS_CASE(["$required"], [*" oss "*], AS_IF([test "x$need_ossaudio" = xyes], AC_MSG_WARN([RtAudio may require the ossaudio library])))) - AC_CHECK_HEADER(sys/soundcard.h, + + # linux systems may have soundcard.h but *not* have OSS4 installed, + # we have to actually check if it exports OSS4 symbols + AC_CHECK_DECL(SNDCTL_SYSINFO, [api="$api -D__LINUX_OSS__" need_pthread=yes found="$found OSS"], - AS_CASE(["$required"], [*" oss "*], - AC_MSG_ERROR([sys/soundcard.h not found]))) + AS_CASE(["$required"], [*" oss "*], + AC_MSG_ERROR([sys/soundcard.h not found])) + [], + [#include ]) ]) AS_CASE(["$systems"], [*" jack "*], [ -- cgit v1.2.3