diff options
author | Tristan Matthews <tristan.matthews@savoirfairelinux.com> | 2014-08-17 21:24:50 +0400 |
---|---|---|
committer | Tristan Matthews <tristan.matthews@savoirfairelinux.com> | 2014-08-17 21:24:50 +0400 |
commit | f0ec849d702c9d5fbdce26e6f1cfd72706bc9459 (patch) | |
tree | 0cf586dc3526a7f7e2eab0e33a06c6c8d09f1093 | |
parent | 86779a06f6500d041573d6252d4971d3bfcb4b18 (diff) |
speexdsp: fix SSE2 support
_USE_SSE2 was only being defined for win32 builds on x86-64
-rw-r--r-- | configure.ac | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index f269553..a51e0c6 100644 --- a/configure.ac +++ b/configure.ac @@ -79,7 +79,24 @@ has_sse=yes has_sse=no ] ) -AC_MSG_RESULT($has_sse) +AC_MSG_RESULT($has_sse) + +AC_MSG_CHECKING(for SSE2 in current arch/CFLAGS) +AC_LINK_IFELSE([ +AC_LANG_PROGRAM([[ +#include <emmintrin.h> +__m128d testfunc(double *a, double *b) { + return _mm_add_pd(_mm_loadu_pd(a), _mm_loadu_pd(b)); +} +]])], +[ +has_sse2=yes +], +[ +has_sse2=no +] +) +AC_MSG_RESULT($has_sse2) AC_MSG_CHECKING(for NEON in current arch/CFLAGS) AC_LINK_IFELSE([ @@ -134,9 +151,11 @@ fi]) AC_ARG_ENABLE(sse, [ --enable-sse Enable SSE support], [ if test "x$enableval" != xno; then has_sse=yes -CFLAGS="$CFLAGS -O3 -msse" +has_sse2=yes +CFLAGS="$CFLAGS -O3 -msse -msse2" else has_sse=no +has_sse2=no fi ]) @@ -170,6 +189,10 @@ if test "$has_neon" = yes; then AC_DEFINE([_USE_NEON], , [Enable NEON support]) fi +if test "$has_sse2" = yes; then + AC_DEFINE([_USE_SSE2], , [Enable SSE2 support]) +fi + AC_ARG_ENABLE(float-api, [ --disable-float-api Disable the floating-point API], [if test "$enableval" = no; then AC_DEFINE([DISABLE_FLOAT_API], , [Disable all parts of the API that are using floats]) |