From aebdd9e980cc4e8497c06c8b65174c56e2047582 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 24 May 2007 15:28:22 +0200 Subject: Enable link with external libspeex - Add --with-speex configure option to specify the build of speex rate plugin. As default, it's linked to external library. If not available, defaults to builtin code. - Show build conditions at the end of configure script - Use AS_HELP_TEXT() --- pph/Makefile.am | 8 +++++++- pph/rate_speexrate.c | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'pph') diff --git a/pph/Makefile.am b/pph/Makefile.am index 8fd5098..ee630cd 100644 --- a/pph/Makefile.am +++ b/pph/Makefile.am @@ -5,8 +5,14 @@ asound_module_rate_speexratedir = @ALSA_PLUGIN_DIR@ AM_CFLAGS = -DVAR_ARRAYS -DRANDOM_PREFIX=alsa_lib -DOUTSIDE_SPEEX -Wall -g @ALSA_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic -libasound_module_rate_speexrate_la_SOURCES = rate_speexrate.c resample.c +libasound_module_rate_speexrate_la_SOURCES = rate_speexrate.c libasound_module_rate_speexrate_la_LIBADD = @ALSA_LIBS@ +if USE_LIBSPEEX +AM_CFLAGS += @speex_CFLAGS@ +libasound_module_rate_speexrate_la_LIBADD += @speex_LIBS@ +else +libasound_module_rate_speexrate_la_SOURCES += resample.c +endif install-exec-hook: rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_*.so diff --git a/pph/rate_speexrate.c b/pph/rate_speexrate.c index 195b16d..9eb33b9 100644 --- a/pph/rate_speexrate.c +++ b/pph/rate_speexrate.c @@ -32,7 +32,11 @@ #include #include +#ifdef USE_LIBSPEEX +#include +#else #include "speex_resampler.h" +#endif struct rate_src { int quality; -- cgit