diff --git a/configure.ac b/configure.ac index 656bec2a..782a4b4e 100644 --- a/configure.ac +++ b/configure.ac @@ -379,7 +379,17 @@ AS_IF([test "x$EMSCRIPTEN" = "x"],[ ]], [[ __m256i x = _mm256_abs_epi8(_mm256_setzero_si256()); ]])], [AC_MSG_RESULT(yes) AC_DEFINE([HAVE_AVX2INTRIN_H], [1], [AVX2 is available]) - AX_CHECK_COMPILE_FLAG([-mavx2], [CFLAGS_AVX="-mavx2"])], + AX_CHECK_COMPILE_FLAG([-mavx2], [CFLAGS_AVX="-mavx2"]) + AC_MSG_CHECKING(if _mm256_broadcastsi128_si256 is correctly defined) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#pragma GCC target("avx2") +#include + ]], [[ __m256i y = _mm256_broadcastsi128_si256(_mm_setzero_si128()); ]])], + [AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) + AC_DEFINE([_mm256_broadcastsi128_si256], [_mm_broadcastsi128_si256], + [Define to the local name of _mm256_broadcastsi128_si256])]) + ], [AC_MSG_RESULT(no)]) CFLAGS="$oldcflags"