Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alexmarsev/soundtouch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroparviai <oparviai@f3a24b6a-cf45-0410-b55a-8c22e2698227>2015-02-22 11:19:09 +0300
committeroparviai <oparviai@f3a24b6a-cf45-0410-b55a-8c22e2698227>2015-02-22 11:19:09 +0300
commitaaf4cf2057b965fde2d26988f6ed699191b20f54 (patch)
tree0dfbed22a3f255e315d476cdd247de8334caca48
parentbcdafc5733b45ecd20b1cff50cf394c4eddcced4 (diff)
Added openmp configuration for gnu buid
-rw-r--r--configure.ac15
-rw-r--r--source/SoundStretch/Makefile.am2
-rw-r--r--source/SoundTouch/Makefile.am2
3 files changed, 16 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index e79d384..b9850f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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 ******"
diff --git a/source/SoundStretch/Makefile.am b/source/SoundStretch/Makefile.am
index 9033722..0b4668f 100644
--- a/source/SoundStretch/Makefile.am
+++ b/source/SoundStretch/Makefile.am
@@ -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
diff --git a/source/SoundTouch/Makefile.am b/source/SoundTouch/Makefile.am
index e458fb5..6dda197 100644
--- a/source/SoundTouch/Makefile.am
+++ b/source/SoundTouch/Makefile.am
@@ -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