From 39efeabec36380fda305bef9a3b91431b137d150 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 13 Feb 2009 06:54:26 +0000 Subject: [PATCH] slim build to just lib and fix some build errors and autotools errors git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11981 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/speex/Makefile.am | 2 +- libs/speex/configure.ac | 41 ++++++++++--------------------- libs/speex/libspeex/Makefile.am | 26 ++++++++++---------- libs/speex/libspeex/math_approx.c | 6 +++-- 4 files changed, 31 insertions(+), 44 deletions(-) diff --git a/libs/speex/Makefile.am b/libs/speex/Makefile.am index 4b99faf55e..f95585c7c4 100644 --- a/libs/speex/Makefile.am +++ b/libs/speex/Makefile.am @@ -13,7 +13,7 @@ pkgconfig_DATA = speex.pc speexdsp.pc EXTRA_DIST = Speex.spec Speex.spec.in Speex.kdevelop speex.m4 speex.pc.in README.blackfin README.symbian README.TI-DSP #Fools KDevelop into including all files -SUBDIRS = libspeex include @src@ doc win32 symbian ti +SUBDIRS = libspeex include DIST_SUBDIRS = libspeex include src doc win32 symbian ti diff --git a/libs/speex/configure.ac b/libs/speex/configure.ac index df7f01dc6b..5eae4953ac 100644 --- a/libs/speex/configure.ac +++ b/libs/speex/configure.ac @@ -208,33 +208,18 @@ kiss (default fixed point), smallft (default floating point), gpl-fftw3 and prop ) FFT_PKGCONFIG= -AS_CASE([$FFT], - [kiss], [ - AC_DEFINE([USE_KISS_FFT], [], [Use KISS Fast Fourier Transform]) - ], - [smallft], [ - AC_DEFINE([USE_SMALLFT], [], [Use FFT from OggVorbis]) - ], - [gpl-fftw3], [ - AC_DEFINE([USE_GPL_FFTW3], [], [Use FFTW3 for FFT]) - PKG_CHECK_MODULES(FFT, fftw3f) - ], - [proprietary-intel-mkl], [ - AC_DEFINE([USE_INTEL_MKL], [], [Use Intel Math Kernel Library for FFT]) - AC_MSG_CHECKING(for valid MKL) - AC_LINK_IFELSE([ - AC_LANG_PROGRAM([[ -#include -void func() { - DFTI_DESCRIPTOR_HANDLE h; - MKL_LONG result=DftiCreateDescriptor(&h, DFTI_SINGLE, DFTI_REAL, 0); -}]])], - [AC_MSG_RESULT(yes)], - [AC_MSG_FAILURE([Failed to compile MKL test program. Make sure you set CFLAGS to include the include directory and set LDFLAGS to include the library directory and all necesarry libraries.])] - ) - ], - [AC_MSG_FAILURE([Unknown FFT $FFT specified for --with-fft])] -) + +case $FFT in + kiss) + AC_DEFINE([USE_KISS_FFT], [], [Use KISS Fast Fourier Transform]) ;; + smallft) + AC_DEFINE([USE_SMALLFT], [], [Use FFT from OggVorbis]) ;; + *) + AC_MSG_FAILURE([Unknown FFT $FFT specified for --with-fft]) ;; +esac + +AC_SUBST(FFT_LIBS) +AC_SUBST(FFT_CFLAGS) AM_CONDITIONAL(BUILD_KISS_FFT, [test "$FFT" = "kiss"]) AM_CONDITIONAL(BUILD_SMALLFT, [test "$FFT" = "smallft"]) AC_SUBST(FFT_PKGCONFIG) @@ -273,7 +258,7 @@ fi AC_SUBST(SIZE16) AC_SUBST(SIZE32) -AC_OUTPUT([Makefile libspeex/Makefile src/Makefile doc/Makefile Speex.spec +AC_OUTPUT([Makefile libspeex/Makefile src/Makefile Speex.spec include/Makefile include/speex/Makefile speex.pc speexdsp.pc win32/Makefile win32/libspeex/Makefile win32/speexenc/Makefile win32/speexdec/Makefile symbian/Makefile diff --git a/libs/speex/libspeex/Makefile.am b/libs/speex/libspeex/Makefile.am index 3d4e03f9a6..667ac0be9c 100644 --- a/libs/speex/libspeex/Makefile.am +++ b/libs/speex/libspeex/Makefile.am @@ -40,16 +40,16 @@ noinst_HEADERS = arch.h cb_search_arm4.h cb_search_bfin.h cb_search_sse.h \ libspeex_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_LT_REVISION@:@SPEEX_LT_AGE@ libspeexdsp_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_LT_REVISION@:@SPEEX_LT_AGE@ -noinst_PROGRAMS = testenc testenc_wb testenc_uwb testdenoise testecho testjitter -testenc_SOURCES = testenc.c -testenc_LDADD = libspeex.la -testenc_wb_SOURCES = testenc_wb.c -testenc_wb_LDADD = libspeex.la -testenc_uwb_SOURCES = testenc_uwb.c -testenc_uwb_LDADD = libspeex.la -testdenoise_SOURCES = testdenoise.c -testdenoise_LDADD = libspeexdsp.la @FFT_LIBS@ -testecho_SOURCES = testecho.c -testecho_LDADD = libspeexdsp.la @FFT_LIBS@ -testjitter_SOURCES = testjitter.c -testjitter_LDADD = libspeexdsp.la @FFT_LIBS@ +#noinst_PROGRAMS = testenc testenc_uwb testdenoise testecho testjitter testenc_wb +#testenc_SOURCES = testenc.c +#testenc_LDADD = libspeex.la +#testenc_wb_SOURCES = testenc_wb.c +#testenc_wb_LDADD = libspeex.la +#testenc_uwb_SOURCES = testenc_uwb.c +#testenc_uwb_LDADD = libspeex.la +#testdenoise_SOURCES = testdenoise.c +#testdenoise_LDADD = libspeexdsp.la @FFT_LIBS@ +#testecho_SOURCES = testecho.c +#testecho_LDADD = libspeexdsp.la @FFT_LIBS@ +#testjitter_SOURCES = testjitter.c +#testjitter_LDADD = libspeexdsp.la @FFT_LIBS@ diff --git a/libs/speex/libspeex/math_approx.c b/libs/speex/libspeex/math_approx.c index d98e05b6cc..1ceda76161 100644 --- a/libs/speex/libspeex/math_approx.c +++ b/libs/speex/libspeex/math_approx.c @@ -136,6 +136,7 @@ spx_word16_t spx_acos(spx_word16_t x) #define K3 340 #define K4 -10 +#if 0 spx_word16_t spx_cos(spx_word16_t x) { spx_word16_t x2; @@ -150,7 +151,7 @@ spx_word16_t spx_cos(spx_word16_t x) return SUB32(-K1, MULT16_16_P13(x2, ADD32(K2, MULT16_16_P13(x2, ADD32(K3, MULT16_16_P13(K4, x2)))))); } } - +#endif #else #ifndef M_PI @@ -164,6 +165,7 @@ spx_word16_t spx_cos(spx_word16_t x) #define SPX_PI_2 1.5707963268 +#if 0 spx_word16_t spx_cos(spx_word16_t x) { if (x