From 7a423e02b3ce28b933dd17e40f1ec190ccb235c6 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sun, 23 Mar 2008 22:23:59 +0000 Subject: [PATCH] Add a run test for PortAudio Originally committed to SVN as r2124. --- configure.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configure.in b/configure.in index 50bc25fab..1235f242b 100644 --- a/configure.in +++ b/configure.in @@ -234,6 +234,19 @@ if test "x$with_portaudio" != xno; then CPPFLAGS="$aegisub_save_CPPFLAGS" fi +AC_AGI_COMPILE([PortAudio], [portaudio], [$CFLAGS $PTHREAD_CFLAGS], [$LDFLAGS $PORTAUDIO_LDFLAGS],[ +#include +int main(void) { + PaError err = Pa_Initialize(); + if (err != paNoError) return 1; + return 0; +}]) + +if test "$agi_with_portaudio" = "no" && test "$with_portaudio" = "yes"; then + AC_MSG_WARN([PortAudio detected, but it doesn't work..]) + with_portaudio="no" +fi + if test "$with_portaudio" = "yes"; then AC_DEFINE(WITH_PORTAUDIO, 1, [Enable PortAudio Audio Provider]) fi @@ -241,6 +254,7 @@ fi AC_SUBST(PORTAUDIO_LDFLAGS) AM_CONDITIONAL([HAVE_PORTAUDIO], [test "$with_portaudio" != "no"]) + ############# ## PulseAudio #############