From 57bdedbaa70aaf7a7dd8e19ce4d221e2dd5adef0 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Tue, 13 Jan 2009 09:43:24 +0000 Subject: [PATCH] Fix pulseaudio/portaudio detection. Originally committed to SVN as r2691. --- configure.in | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/configure.in b/configure.in index fa2384001..7851fc3eb 100644 --- a/configure.in +++ b/configure.in @@ -444,27 +444,30 @@ AM_CONDITIONAL([HAVE_PORTAUDIO], [test "$with_portaudio" != "no"]) AC_ARG_WITH(pulseaudio,[ --without-pulseaudio build without PulseAudio audio provider. (default: auto)], pulseaudio_disabled="(disabled)") -if test "x$with_pulseaudio" != xno; then - PKG_CHECK_MODULES(LIBPULSE, libpulse >= 0.5, [found_audio=yes; with_pulseaudio=yes], [with_pulseaudio=no]) +if test "$with_pulseaudio" != "no"; then + PKG_CHECK_MODULES(LIBPULSE, libpulse >= 0.5, [with_pulseaudio="yes"], [with_pulseaudio="no"]) fi -AC_AGI_COMPILE([PuleseAudio], [pulseaudio], [$LIBPULSE_CFLAGS], [$LIBPULSE_LIBS],[ +if test "$with_pulseaudio" != "no"; then + AC_AGI_COMPILE([PuleseAudio], [pulseaudio], [$LIBPULSE_CFLAGS], [$LIBPULSE_LIBS],[ #include int main(void) { - pa_threaded_mainloop *mainloop = pa_threaded_mainloop_new(); - if (!mainloop) return 1; - return 0; -}]) +pa_threaded_mainloop *mainloop = pa_threaded_mainloop_new(); +if (!mainloop) return 1; +return 0; +} ]) +fi if test "$agi_cv_with_pulseaudio" = "no" && test "$with_pulseaudio" = "yes"; then AC_MSG_WARN([PulseAudio detected, but it doesn't work...]) with_pulseaudio="no" +else + AC_DEFINE(WITH_PULSEAUDIO, 1, [Enable PulseAudio support]) + found_audio="yes" fi AM_CONDITIONAL([HAVE_PULSEAUDIO], [test "$with_pulseaudio" != "no"]) -if test "$with_pulseaudio" = "yes"; then - AC_DEFINE(WITH_PULSEAUDIO, 1, [Enable PulseAudio support]) -fi + ######### ## OpenAL