Added openmp configuration for gnu buid

This commit is contained in:
oparviai 2015-02-22 08:19:09 +00:00
parent d7d0a5c0f9
commit 6935032a52
3 changed files with 16 additions and 3 deletions

View File

@ -78,10 +78,15 @@ AC_C_INLINE
AC_ARG_ENABLE(integer-samples,
[AC_HELP_STRING([--enable-integer-samples],
[use integer samples instead of floats
[default=yes]])],,
[default=no]])],,
[enable_integer_samples=no])
AC_ARG_ENABLE(openmp,
[AC_HELP_STRING([--enable-openmp],
[use parallel multicore calculation through OpenMP [default=yes]])],,
[enable_openmp=yes])
# Let the user enable/disable the x86 optimizations.
# Useful when compiling on non-x86 architectures.
AC_ARG_ENABLE([x86-optimizations],
@ -105,6 +110,14 @@ else
fi
if test "x$enable_openmp" = "xyes"; then
echo "****** openmp optimizations enabled ******"
CXXFLAGS="-fopenmp $CXXFLAGS"
else
echo "****** openmp optimizations disabled ******"
fi
# Check if optimizations are supported in the system at build time.
if test "x$enable_x86_optimizations" = "xyes" -a "x$ac_cv_header_cpuid_h" = "xyes"; then
echo "****** x86 optimizations enabled ******"

View File

@ -48,7 +48,7 @@ soundstretch_LDADD=../SoundTouch/libSoundTouch.la -lm
#soundstretch_LDFLAGS=-s
## additional compiler flags
soundstretch_CXXFLAGS=-O3 -fopenmp
soundstretch_CXXFLAGS=-O3
#clean-local:
# -rm -f additional-files-to-remove-on-make-clean

View File

@ -34,7 +34,7 @@ libSoundTouch_la_SOURCES=AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp \
InterpolateShannon.cpp
# Compiler flags
AM_CXXFLAGS=-O3 -fopenmp -I../../include
AM_CXXFLAGS=-O3 -I../../include
# Compile the files that need MMX and SSE individually.
libSoundTouch_la_LIBADD=libSoundTouchMMX.la libSoundTouchSSE.la