summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephen Sinclair <radarsat1@gmail.com>2018-05-02 18:57:43 -0300
committerStephen Sinclair <radarsat1@gmail.com>2018-05-02 19:13:52 -0300
commit7fbc900e63713858590340eb54ffe208f2ceb075 (patch)
treea77304293dfdcb04c5c6ccbda63cb166ceee669b /configure.ac
parent7883fef28bc5e6c8976f93586bed2d5d10071444 (diff)
Make libossaudio a soft OSS requirement, but do check for sys/soundcard.h
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 5a663a5..a2e2299 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,13 +198,20 @@ AS_CASE(["$systems"], [*" pulse "*], [
])
AS_CASE(["$systems"], [*" oss "*], [
- AC_CHECK_LIB(ossaudio, main,
+ # libossaudio not required on some platforms (e.g. linux) so we
+ # don't break things if it's not found, but issue a warning when we
+ # are not sure (i.e. not on linux)
+ AS_CASE([$host], [*-*-linux*], [], [*], [need_ossaudio=yes])
+ AC_CHECK_LIB(ossaudio, main, [have_ossaudio=true],
+ 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,
[api="$api -D__LINUX_OSS__"
need_pthread=yes
- found="$found OSS"
- LIBS="-lossaudio $LIBS"],
+ found="$found OSS"],
AS_CASE(["$required"], [*" oss "*],
- AC_MSG_ERROR([RtAudio requires the ossaudio library])))
+ AC_MSG_ERROR([sys/soundcard.h not found])))
])
AS_CASE(["$systems"], [*" jack "*], [