From b103f3937c9c78965bbcc5d28d193ccfc1513829 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 13 Mar 2012 23:15:19 +0000 Subject: [PATCH] build-sys: It seems some versions of OSS soundcard.h do not support SOUND_PCM_* defines. This causes the OSS wrapper compile to fail. So add some checks to make sure the releavant defines are included and disable the OSS wrapper accordingly. Patches welcome to solve the actual underlying problem. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46630 --- configure.ac | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8370546..0d47e06 100644 --- a/configure.ac +++ b/configure.ac @@ -693,11 +693,22 @@ AS_IF([test "x$enable_oss_output" != "xno" -o "x$enable_oss_wrapper" != "xno"], AS_IF([test "x$enable_oss_output" = "xyes" -o "x$enable_oss_wrapper" = "xyes" && test "x$HAVE_OSS" = "x0"], [AC_MSG_ERROR([*** OSS support not found])]) +AC_CACHE_CHECK([whether sys/soundcard.h has appropariate defines], + pulseaudio_sys_soundcard_defines, [ + AC_LINK_IFELSE( + AC_LANG_PROGRAM([[#include ]], [[unsigned long a = SOUND_PCM_READ_RATE; a = SOUND_PCM_READ_CHANNELS; a = SOUND_PCM_READ_BITS; return 0;]]), + [pulseaudio_sys_soundcard_defines=yes], + [pulseaudio_sys_soundcard_defines=no]) + ]) + +AS_IF([test "x$enable_oss_wrapper" = "xyes" && test "x$pulseaudio_sys_soundcard_defines" = "xno"], + [AC_MSG_ERROR([*** OSS support does not support SOUND_PCM_* defines])]) + AS_IF([test "x$enable_oss_output" != "xno"], [AS_IF([test "x$HAVE_OSS" = "x1"], HAVE_OSS_OUTPUT=1, HAVE_OSS_OUTPUT=0)], HAVE_OSS_OUTPUT=0) -AS_IF([test "x$enable_oss_wrapper" != "xno"], +AS_IF([test "x$enable_oss_wrapper" != "xno" && test "x$pulseaudio_sys_soundcard_defines" = "xyes"], [AS_IF([test "x$HAVE_OSS" = "x1"], HAVE_OSS_WRAPPER=1, HAVE_OSS_WRAPPER=0)], HAVE_OSS_WRAPPER=0) -- 1.7.9.3