aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-05-20 01:24:04 +0300
committerTom Tsou <tom@tsou.cc>2017-06-08 18:32:29 +0000
commit038fd7fd70cc4523ed9872bbdfd848cbf4103f42 (patch)
treedb39d21b90a2920000e26f604c097cc15978807e
parent0cd246c27ad8cdfc39671ed217b31635d57ef937 (diff)
buildenv: fix build on systems without SIMD support
HAVE_SSE3 and HAVE_SSE4_1 were never defined if CPU architecture doesn't match the (86*|x86_64*|amd64*) condition. Change-Id: I3350b14dbc91e9b388d0b04a0ed22ba27d436313
-rw-r--r--config/ax_sse.m45
1 files changed, 3 insertions, 2 deletions
diff --git a/config/ax_sse.m4 b/config/ax_sse.m4
index 5c4e321..7d9d7fb 100644
--- a/config/ax_sse.m4
+++ b/config/ax_sse.m4
@@ -40,6 +40,9 @@ AC_DEFUN([AX_SSE],
[
AC_REQUIRE([AC_CANONICAL_HOST])
+ AM_CONDITIONAL(HAVE_SSE3, false)
+ AM_CONDITIONAL(HAVE_SSE4_1, false)
+
case $host_cpu in
i[[3456]]86*|x86_64*|amd64*)
AX_CHECK_COMPILE_FLAG(-msse3, ax_cv_support_sse3_ext=yes, [])
@@ -49,7 +52,6 @@ AC_DEFUN([AX_SSE],
AM_CONDITIONAL(HAVE_SSE3, true)
else
AC_MSG_WARN([Your compiler does not support sse3 instructions, can you try another compiler?])
- AM_CONDITIONAL(HAVE_SSE3, false)
fi
AX_CHECK_COMPILE_FLAG(-msse4.1, ax_cv_support_sse41_ext=yes, [])
@@ -59,7 +61,6 @@ AC_DEFUN([AX_SSE],
AM_CONDITIONAL(HAVE_SSE4_1, true)
else
AC_MSG_WARN([Your compiler does not support sse4.1 instructions, can you try another compiler?])
- AM_CONDITIONAL(HAVE_SSE4_1, false)
fi
;;
esac