From b89ec65c43ce43eaeab4520ee1579f7bbbfee2db Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sat, 11 Apr 2009 23:40:15 +0000 Subject: [PATCH] Move the PortAudio v19 check above the v18 check. Originally committed to SVN as r2786. --- aegisub/configure.in | 67 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/aegisub/configure.in b/aegisub/configure.in index d05317d74..ca4da50a8 100644 --- a/aegisub/configure.in +++ b/aegisub/configure.in @@ -408,6 +408,39 @@ AM_CONDITIONAL([HAVE_ALSA], [test "$with_alsa" != "no"]) AC_SUBST(ALSA_LDFLAGS) +################### +## PortAudio2 (v19) +################### + +AC_ARG_WITH(portaudio2,[ --without-portaudio2 build without PortAudio v19 audio provider. + (default: auto)], pulseaudio_disabled="(disabled)") +if test "$with_portaudio2" != "no"; then + PKG_CHECK_MODULES(PORTAUDIO2, portaudio-2.0 >= portaudio2_required_version, [with_portaudio2="yes"], [with_portaudio2="no"]) +fi + +if test "$with_portaudio2" != "no"; then + AC_AGI_COMPILE([PortAudio2], [portaudio], [$LIBPORTAUDIO2_CFLAGS], [$LIBPORTAUDIO2_LIBS],[ +#include +int main(void) { + PaError err = Pa_Initialize(); + if (err != paNoError) return 1; + return 0; +} ]) +fi + +if test "$agi_cv_with_portaudio2" = "no" && test "$with_portaudio2" = "yes"; then + AC_MSG_WARN([PortAudio2 detected, but it doesn't work...]) + with_portaudio2="no" +fi + +if test "$agi_cv_with_portaudio2" = "yes" && test "$with_portaudio2" = "yes"; then + AC_DEFINE(WITH_PORTAUDIO2, 1, [Enable PortAudio v19 support]) + found_audio="yes" +fi + +AM_CONDITIONAL([HAVE_PORTAUDIO2], [test "$with_portaudio2" != "no"]) + + ############ ## PortAudio ############ @@ -461,40 +494,6 @@ AC_SUBST(PORTAUDIO_LDFLAGS) AC_SUBST(PORTAUDIO_CFLAGS) - -################### -## PortAudio2 (v19) -################### - -AC_ARG_WITH(portaudio2,[ --without-portaudio2 build without PortAudio v19 audio provider. - (default: auto)], pulseaudio_disabled="(disabled)") -if test "$with_portaudio2" != "no"; then - PKG_CHECK_MODULES(PORTAUDIO2, portaudio-2.0 >= portaudio2_required_version, [with_portaudio2="yes"], [with_portaudio2="no"]) -fi - -if test "$with_portaudio2" != "no"; then - AC_AGI_COMPILE([PortAudio2], [portaudio], [$LIBPORTAUDIO2_CFLAGS], [$LIBPORTAUDIO2_LIBS],[ -#include -int main(void) { - PaError err = Pa_Initialize(); - if (err != paNoError) return 1; - return 0; -} ]) -fi - -if test "$agi_cv_with_portaudio2" = "no" && test "$with_portaudio2" = "yes"; then - AC_MSG_WARN([PortAudio2 detected, but it doesn't work...]) - with_portaudio2="no" -fi - -if test "$agi_cv_with_portaudio2" = "yes" && test "$with_portaudio2" = "yes"; then - AC_DEFINE(WITH_PORTAUDIO2, 1, [Enable PortAudio v19 support]) - found_audio="yes" -fi - -AM_CONDITIONAL([HAVE_PORTAUDIO2], [test "$with_portaudio2" != "no"]) - - ############# ## PulseAudio #############