diff --git a/configure.ac b/configure.ac
index de0e1b35d4da78d103ddf27304ad527361a342c7..a1c1c03cb732dbe20bfd0f84d774d76969cdda0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -273,6 +273,9 @@ AM_CONDITIONAL(HAVESETAFFINITY,
 # Check for libnuma.
 AC_CHECK_LIB([numa], [numa_available])
 
+# Check for Intel intrinsics header optionally used by vector.h.
+AC_CHECK_HEADERS([immintrin.h])
+
 # Check for timing functions needed by cycle.h.
 AC_HEADER_TIME
 AC_CHECK_HEADERS([sys/time.h c_asm.h intrinsics.h mach/mach_time.h])
diff --git a/src/vector.h b/src/vector.h
index 8629b39725ebb7d800047116f45fb7ec6c6e7a1d..ef2b7c4b9e42ceb61dc38c3196c1819be652926f 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -23,11 +23,12 @@
 /* Have I already read this file? */
 #ifndef VEC_MACRO
 
+#include "../config.h"
+
 /* Need to check whether compiler supports this (IBM does not)
    This will prevent the macros to be defined and switch off
    explicit vectorization if the compiled does not support it */
-#if defined(__GNUC__) && defined(__i386__)
-
+#ifdef HAVE_IMMINTRIN_H
 /* Include the header file with the intrinsics for Intel architecture. */
 #include <immintrin.h>
 #endif