diff options
Diffstat (limited to 'libitm/acinclude.m4')
-rw-r--r-- | libitm/acinclude.m4 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libitm/acinclude.m4 b/libitm/acinclude.m4 index 8fcde4b..58fbf42 100644 --- a/libitm/acinclude.m4 +++ b/libitm/acinclude.m4 @@ -95,6 +95,20 @@ AC_DEFUN([LIBITM_CHECK_SIZE_T_MANGLING], [ [Define to the letter to which size_t is mangled.]) ]) +dnl Check if as supports AVX instructions. +AC_DEFUN([LIBITM_CHECK_AS_AVX], [ +case "${target_cpu}" in +i[3456]86 | x86_64) + AC_CACHE_CHECK([if the assembler supports AVX], libitm_cv_as_avx, [ + AC_TRY_COMPILE([], [asm("vzeroupper");], + [libitm_cv_as_avx=yes], [libitm_cv_as_avx=no]) + ]) + if test x$libitm_cv_as_avx = xyes; then + AC_DEFINE(HAVE_AS_AVX, 1, [Define to 1 if the assembler supports AVX.]) + fi + ;; +esac]) + sinclude(../libtool.m4) dnl The lines below arrange for aclocal not to bring an installed dnl libtool.m4 into aclocal.m4, while still arranging for automake to |