From 1c2ce89326f7d18f9c4b5e9eca69bad4aa4e563b Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 28 Feb 2017 18:20:24 +0100 Subject: [PATCH] _xgetbv() can be defined as a macro, so try an actual compilation --- configure.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 020bc9a8..6122496a 100644 --- a/configure.ac +++ b/configure.ac @@ -455,6 +455,13 @@ AC_SUBST(CFLAGS_PCLMUL) AC_CHECK_HEADERS([sys/mman.h intrin.h]) +AC_MSG_CHECKING([if _xgetbv() is available]) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ #include ]], [[ (void) _xgetbv(0) ]])], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE__XGETBV], [1], [_xgetbv() is available])], + [AC_MSG_RESULT(no)]) + dnl Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE @@ -675,7 +682,7 @@ AS_IF([test "x$EMSCRIPTEN" = "x"],[ AC_CHECK_FUNCS([arc4random arc4random_buf]) AC_CHECK_FUNCS([mmap mlock madvise mprotect explicit_bzero nanosleep]) ]) -AC_CHECK_FUNCS([posix_memalign getpid _xgetbv]) +AC_CHECK_FUNCS([posix_memalign getpid]) AC_SUBST([LIBTOOL_EXTRA_FLAGS])