AS_IF([test "x$with_pulse" == xno && test "x$with_alsa" == xno], [
AC_MSG_FAILURE([You can only disable either ALSA or PulseAudio, not both]);
])
AS_IF([test "x$with_pulse" != xno], [
AC_CHECK_LIB([pulse], [pa_context_new], [
AS_ECHO_N( ) # what is the proper way to check for a library without linking it?
], [
AC_MSG_FAILURE([libpulse-dev is required during build, but you don't have it installed. Use --without-pulse to disable PulseAudio support.])
])
], [
AC_DEFINE([WITHOUT_PULSE], [1], [Define to disable PulseAudio support])
])
AS_IF([test "x$with_alsa" != xno], [
AC_CHECK_LIB([asound], [snd_pcm_open], [
AS_ECHO_N( ) # what is the proper way to check for a library without linking it?
], [
AC_MSG_FAILURE([libasound-dev is required during build, but you don't have it installed. Use --without-alsa to disable ALSA support.])
])
], [
AC_DEFINE([WITHOUT_ALSA], [1], [Define to disable ALSA support])
])
]);
AM_CONDITIONAL(WITH_PULSE, test "x$with_pulse" == xyes)
AM_CONDITIONAL(WITH_ALSA, test "x$with_alsa" == xyes)
AC_ARG_ENABLE([dsp], [AS_HELP_STRING([--disable-dsp], [disable signal processing (echo cancellation, noise suppression, and automatic gain control)])], [], [enable_dsp=yes])
AM_CONDITIONAL(ENABLE_DSP, test "x$enable_dsp" == xyes)