From 9f311bbcd0a89109e6b5ff7a6f451a85a1f40edb Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Fri, 15 Jul 2016 15:48:20 +0100 Subject: [PATCH] Check for SIMD intruction sets only if vectorization is enabled. --- configure.ac | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 5eccef2fde..d6cf46ad95 100644 --- a/configure.ac +++ b/configure.ac @@ -178,16 +178,6 @@ if test "$enable_opt" = "yes" ; then AX_CC_MAXOPT ac_test_CFLAGS="yes" CFLAGS="$old_CFLAGS $CFLAGS" - - # Check SSE & AVX support (some overlap with AX_CC_MAXOPT). - # Don't use the SIMD_FLAGS result with Intel compilers. The -x<code> - # value from AX_CC_MAXOPT should be sufficient. - AX_EXT - if test "$SIMD_FLAGS" != ""; then - if test "$ax_cv_c_compiler_vendor" != "intel"; then - CFLAGS="$CFLAGS $SIMD_FLAGS" - fi - fi fi # Add address sanitizer options to flags, if requested. Only useful for GCC @@ -242,6 +232,17 @@ if test "$enable_vec" = "no"; then fi HAVEVECTORIZATION=0 else + + # Check SSE & AVX support (some overlap with AX_CC_MAXOPT). + # Don't use the SIMD_FLAGS result with Intel compilers. The -x<code> + # value from AX_CC_MAXOPT should be sufficient. + AX_EXT + if test "$SIMD_FLAGS" != ""; then + if test "$ax_cv_c_compiler_vendor" != "intel"; then + CFLAGS="$CFLAGS $SIMD_FLAGS" + fi + fi + AC_DEFINE([WITH_VECTORIZATION],1,[Enable vectorization]) HAVEVECTORIZATION=1 fi -- GitLab