From 1525028246bcac98dae6fc47860fc9f7ec39240e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 25 Oct 2012 10:02:29 +0200 Subject: [PATCH 2/2] Use STLPORT on Android --- configure.ac | 18 ++++++++++++++---- source/SoundTouch/Makefile.am | 16 ++++++++-------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index d3df5eb..ce4488d 100644 --- a/configure.ac +++ b/configure.ac @@ -231,10 +231,20 @@ dnl add whatever functions you might want to check for here #AC_CHECK_FUNCS([floor ftruncate memmove memset mkdir modf pow realpath sqrt strchr strdup strerror strrchr strstr strtol]) - - - - +AC_ARG_WITH( + stlport, + AC_HELP_STRING( + [--with-stlport], + [use stlport @<:@default=no@:>@]), + [AS_CASE( + [$withval], [no], [], [yes], [], + [AC_MSG_ERROR([bad value "$withval" for --with-stlport])])], + [with_stlport=no]) +if test "x$with_stlport" != "xno"; then + PKG_CHECK_MODULES(STLPORT, stlport) +fi +AC_SUBST(STLPORT_LIBS) +AC_SUBST(STLPORT_CFLAGS) dnl ############################################################################ dnl # Internationaliation and Localiation # diff --git a/source/SoundTouch/Makefile.am b/source/SoundTouch/Makefile.am index 4756880..7549259 100644 --- a/source/SoundTouch/Makefile.am +++ b/source/SoundTouch/Makefile.am @@ -34,10 +34,10 @@ libSoundTouch_la_SOURCES=AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp \ InterpolateShannon.cpp # Compiler flags -AM_CXXFLAGS+=-O3 +AM_CXXFLAGS+=-O3 $(STLPORT_CFLAGS) # Compile the files that need MMX and SSE individually. -libSoundTouch_la_LIBADD=libSoundTouchMMX.la libSoundTouchSSE.la +libSoundTouch_la_LIBADD=libSoundTouchMMX.la libSoundTouchSSE.la $(STLPORT_LIBS) noinst_LTLIBRARIES=libSoundTouchMMX.la libSoundTouchSSE.la libSoundTouchMMX_la_SOURCES=mmx_optimized.cpp libSoundTouchSSE_la_SOURCES=sse_optimized.cpp @@ -46,23 +46,23 @@ libSoundTouchSSE_la_SOURCES=sse_optimized.cpp # If MMX is supported compile with -mmmx. # Do not assume -msse is also supported. if HAVE_MMX -libSoundTouchMMX_la_CXXFLAGS = -mmmx $(AM_CXXFLAGS) +libSoundTouchMMX_la_CXXFLAGS = -mmmx $(AM_CXXFLAGS) $(STLPORT_CFLAGS) else -libSoundTouchMMX_la_CXXFLAGS = $(AM_CXXFLAGS) +libSoundTouchMMX_la_CXXFLAGS = $(AM_CXXFLAGS) $(STLPORT_CFLAGS) endif # We enable optimizations by default. # If SSE is supported compile with -msse. if HAVE_SSE -libSoundTouchSSE_la_CXXFLAGS = -msse $(AM_CXXFLAGS) +libSoundTouchSSE_la_CXXFLAGS = -msse $(AM_CXXFLAGS) $(STLPORT_CFLAGS) else -libSoundTouchSSE_la_CXXFLAGS = $(AM_CXXFLAGS) +libSoundTouchSSE_la_CXXFLAGS = $(AM_CXXFLAGS) $(STLPORT_CFLAGS) endif # Let the user disable optimizations if he wishes to. if !X86_OPTIMIZATIONS -libSoundTouchMMX_la_CXXFLAGS = $(AM_CXXFLAGS) -libSoundTouchSSE_la_CXXFLAGS = $(AM_CXXFLAGS) +libSoundTouchMMX_la_CXXFLAGS = $(AM_CXXFLAGS) $(STLPORT_CFLAGS) +libSoundTouchSSE_la_CXXFLAGS = $(AM_CXXFLAGS) $(STLPORT_CFLAGS) endif # Modify the default 0.0.0 to LIB_SONAME.0.0 -- 2.11.0