From f8600b921d2babc6d58a0a025068689454f41138 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sun, 23 Mar 2008 23:07:47 +0000 Subject: [PATCH] Add a run test for PulseAudio. Originally committed to SVN as r2126. --- configure.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/configure.in b/configure.in index 514fa6fd9..d0b94723f 100644 --- a/configure.in +++ b/configure.in @@ -263,6 +263,22 @@ AC_ARG_WITH(pulseaudio,[ --without-pulseaudio build without PulseAudio audio if test "x$with_pulseaudio" != xno; then PKG_CHECK_MODULES(LIBPULSE, libpulse >= 0.5, [found_audio=yes; with_pulseaudio=yes], [with_pulseaudio=no]) fi + +AC_AGI_COMPILE([PuleseAudio], [pulseaudio], [$CFLAGS $LIBPULSE_CFLAGS], [$LIBPULSE_LIBS],[ +#include +int main(void) { + pa_threaded_mainloop *mainloop = pa_threaded_mainloop_new(); + if (!mainloop) return 1; + return 0; +}]) + +if test "$agi_with_pulseaudio" = "no" && test "$with_pulseaudio" = "yes"; then + AC_MSG_WARN([PulseAudio detected, but it doesn't work..]) + with_pulseaudio="no" +fi + + + AM_CONDITIONAL([HAVE_PULSEAUDIO], [test "$with_pulseaudio" != "no"]) if test "$with_pulseaudio" = "yes"; then AC_DEFINE(WITH_PULSEAUDIO, 1, [Enable PulseAudio support])