summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 4a41d8f973e..c9086ac196e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2265,15 +2265,20 @@ if test -n "$with_gallium_drivers"; then
fi
;;
xswr)
- AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
swr_llvm_check "swr"
- AC_MSG_CHECKING([whether $CXX supports AVX/AVX2])
+ AC_MSG_CHECKING([whether $CXX supports c++11/AVX/AVX2])
AVX_CXXFLAGS="-march=core-avx-i"
AVX2_CXXFLAGS="-march=core-avx2"
AC_LANG_PUSH([C++])
save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="-std=c++11 $CXXFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],[],
+ [AC_MSG_ERROR([c++11 compiler support not detected])])
+ CXXFLAGS="$save_CXXFLAGS"
+
+ save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$AVX_CXXFLAGS $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],[],
[AC_MSG_ERROR([AVX compiler support not detected])])