diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 821ba1f..5c3235c 100644 --- a/configure.ac +++ b/configure.ac @@ -164,21 +164,24 @@ AC_LANG_POP([C++]) # Check for SSE AC_MSG_CHECKING(for SSE in current arch/CFLAGS) -AC_LINK_IFELSE([ -AC_LANG_PROGRAM([[ + +save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS -msse" +AC_MSG_CHECKING([whether we need to add -msse]) +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)); } ]])], -[ -has_sse=yes -], -[ -has_sse=no -] +[has_sse=yes], +[has_sse=no] ) AC_MSG_RESULT($has_sse) +if test x"$has_sse" = xno; then + CXXFLAGS="$save_CXXFLAGS" +fi + AM_CONDITIONAL([HAVE_SSE], [test "x$has_sse" = "xyes"]) |