summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-09-28 22:29:06 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-09-28 22:29:06 +0300
commit9f7d5e3afdd29f66215d6817b63835054516ff05 (patch)
tree06d16c9bc2f37ba0498684424e92276c5b907a54 /configure.ac
parentafb8d580452f8f5ca0614c5cc2d2526528b6c083 (diff)
added configure option to disable x86 SSE detection
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 240df9ddf7..b86131d008 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,6 +72,11 @@ AC_ARG_WITH(
,
[with_user="nobody"]
)
+AC_ARG_ENABLE([x86-sse],
+ AS_HELP_STRING([--enable-x86-sse=yes|no], [enable SSE/SS2 optimizations on x86 [default=yes]]),
+ ,
+ [enable_x86_sse="yes"]
+)
ACX_PTHREAD(, [AC_MSG_ERROR([Cannot initialize pthread environment])])
LIBS="${PTHREAD_LIBS} ${LIBS}"
@@ -93,7 +98,7 @@ AS_CASE([$host_cpu],
[i?86], [SSE_CANDIDATE="yes"]
)
AC_SUBST([SSE_CANDIDATE])
-if test "${SSE_CANDIDATE}" = "yes"; then
+if test "${SSE_CANDIDATE}" = "yes" -a "${enable_x86_sse}" = "yes"; then
opt="-msse2 -mfpmath=sse"
AX_CHECK_COMPILE_FLAG($opt, [CFLAGS="$CFLAGS $opt"], [])
fi