summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-04-20 23:47:30 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-04-20 23:47:30 +0200
commit156ee71cbb3c94d5d77a5afcc376cd512ce8fe9d (patch)
tree09cc48ea9bf3e05f9a46139601a606c38ec35ae5 /configure.ac
parent8a5b4f23dec7d22e4f2e38cb7ef7223438461df8 (diff)
downloaddabmod-156ee71cbb3c94d5d77a5afcc376cd512ce8fe9d.tar.gz
dabmod-156ee71cbb3c94d5d77a5afcc376cd512ce8fe9d.tar.bz2
dabmod-156ee71cbb3c94d5d77a5afcc376cd512ce8fe9d.zip
Replace SSE check by march=native check
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 9 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index cd6f0ed..acefa90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,31 +161,22 @@ AC_COMPILE_IFELSE(
AC_LANG_POP([C++])
-# Check for SSE
-AC_MSG_CHECKING(for SSE in current arch/CFLAGS)
+# Check for march
+AC_MSG_CHECKING(if we can add -march=native to CFLAGS)
save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS -msse"
-AC_MSG_CHECKING([whether we need to add -msse])
+CXXFLAGS="$CXXFLAGS -march=native"
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[
-#include <xmmintrin.h>
-__m128 testfunc(float *a, float *b) {
- return _mm_add_ps(_mm_loadu_ps(a), _mm_loadu_ps(b));
-}
+void testfunc(void) {}
]])],
-[has_sse=yes],
-[has_sse=no]
+[supports_march_native=yes],
+[supports_march_native=no]
)
-AC_MSG_RESULT($has_sse)
-if test x"$has_sse" = xno; then
+AC_MSG_RESULT($supports_march_native)
+if test x"$supports_march_native" = xno; then
CXXFLAGS="$save_CXXFLAGS"
fi
-
-AM_CONDITIONAL([HAVE_SSE], [test "x$has_sse" = "xyes"])
-
-# TODO: Check for NEON
-
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([bzero floor ftime gettimeofday memset sqrt strchr strerror strtol])
@@ -211,7 +202,7 @@ echo
echo
enabled=""
disabled=""
-for feat in with_debug_malloc has_sse enable_fast_math
+for feat in with_debug_malloc supports_march_native enable_fast_math
do
eval var=\$$feat
AS_IF([test "x$var" != "xno"],