@@ -18,6 +18,18 @@ AC_CONFIG_FILES([Makefile])
18
18
m4_include ( m4/ax_check_compile_flag.m4 )
19
19
m4_version_prereq ( [ 2.70] , [ AC_PROG_CC ] , [ AC_PROG_CC_STDC ] )
20
20
21
+ AC_ARG_ENABLE ( westmere , AS_HELP_STRING ( [ --disable-westmere] ,[ Disable Westmere (SSE4.2) kernel] ) )
22
+ case "$enable_westmere" in
23
+ no) enable_westmere=no ;;
24
+ yes|*) enable_westmere=yes ;;
25
+ esac
26
+
27
+ AC_ARG_ENABLE ( haswell , AS_HELP_STRING ( [ --disable-haswell] ,[ Disable Haswell (AVX2) kernel] ) )
28
+ case "$enable_haswell" in
29
+ no) enable_haswell=no ;;
30
+ yes|*) enable_haswell=yes ;;
31
+ esac
32
+
21
33
# Figure out the canonical target architecture.
22
34
AC_CANONICAL_TARGET
23
35
@@ -36,7 +48,8 @@ if test $x86_64 = "yes"; then
36
48
AX_CHECK_COMPILE_FLAG ( [ -march=westmere] ,,,[ -Werror] )
37
49
AX_CHECK_COMPILE_FLAG ( [ -march=haswell] ,,,[ -Werror] )
38
50
39
- if test $ac_cv_header_immintrin_h = "yes" -a \
51
+ if test $enable_westmere != "no" -a \
52
+ $ac_cv_header_immintrin_h = "yes" -a \
40
53
$ax_cv_check_cflags__Werror__march_westmere = "yes"
41
54
then
42
55
AC_DEFINE ( HAVE_WESTMERE , 1 , [ Wether or not to compile support for SSE4.2] )
@@ -45,7 +58,8 @@ if test $x86_64 = "yes"; then
45
58
HAVE_WESTMERE=NO
46
59
fi
47
60
48
- if test $ac_cv_header_immintrin_h = "yes" -a \
61
+ if test $enable_haswell != "no" -a \
62
+ $ac_cv_header_immintrin_h = "yes" -a \
49
63
$ax_cv_check_cflags__Werror__march_haswell = "yes"
50
64
then
51
65
AC_DEFINE ( HAVE_HASWELL , 1 , [ Wether or not to compile support for AVX2] )
0 commit comments