From: Takashi Iwai Date: Thu, 9 Jul 2015 14:08:59 +0000 (+0200) Subject: pph: Fix build with older speex X-Git-Tag: v1.1.0~2 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=9784abe1c0497a62ccb9c0050c75f15cc09df732;p=alsa-plugins.git pph: Fix build with older speex The previous commit fixed the build of the recent speexdsp, but it also broke the build with the old library. Actually the only needed change is the inclusion of speex/speex_types.h instead of speex/speexdsp_types.h, so it can be easily worked around via the check in configure script. Along with this change, make the version check back to 1.2 from 1.2rc2, as 1.2rc1 works fine now again, too. Signed-off-by: Takashi Iwai --- diff --git a/configure.ac b/configure.ac index c554d22..e786d8e 100644 --- a/configure.ac +++ b/configure.ac @@ -108,7 +108,7 @@ AC_SUBST(AVCODEC_CFLAGS) AC_SUBST(AVCODEC_LIBS) AC_SUBST(AVCODEC_HEADER) -PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2rc2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""]) +PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""]) AM_CONDITIONAL(HAVE_SPEEXDSP, test "$HAVE_SPEEXDSP" = "yes") AC_ARG_WITH([speex], @@ -133,6 +133,10 @@ fi AM_CONDITIONAL(HAVE_PPH, test "$PPH" = "builtin" -o "$PPH" = "lib") AM_CONDITIONAL(USE_LIBSPEEX, test "$PPH" = "lib") +if test "$PPH" = "lib"; then + AC_CHECK_HEADERS([speex/speexdsp_types.h]) +fi + test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix diff --git a/pph/speex_resampler.h b/pph/speex_resampler.h index aa85abb..0e5ced4 100644 --- a/pph/speex_resampler.h +++ b/pph/speex_resampler.h @@ -82,7 +82,11 @@ #else /* OUTSIDE_SPEEX */ +#ifdef HAVE_SPEEX_SPEEXDSP_TYPES_H #include "speex/speexdsp_types.h" +#else +#include "speex/speex_types.h" +#endif #endif /* OUTSIDE_SPEEX */