added configure option to disable x86 SSE detection
Costa Tsaousis (ktsaou) committed
Sep 28, 2016 at 22:29 UTC
9f7d5e3afdd29f66215d6817b63835054516ff05
1 file changed
+6
-1
configure.ac
+6
-1
@@ -72,6 +72,11 @@ AC_ARG_WITH(
72
,
73
[with_user="nobody"]
74
)
75
+AC_ARG_ENABLE([x86-sse],
76
+ AS_HELP_STRING([--enable-x86-sse=yes|no], [enable SSE/SS2 optimizations on x86 [default=yes]]),
77
+ ,
78
+ [enable_x86_sse="yes"]
79
+)
80
81
ACX_PTHREAD(, [AC_MSG_ERROR([Cannot initialize pthread environment])])
82
LIBS="${PTHREAD_LIBS} ${LIBS}"
@@ -93,7 +98,7 @@ AS_CASE([$host_cpu],
98
[i?86], [SSE_CANDIDATE="yes"]
99
)
100
AC_SUBST([SSE_CANDIDATE])
96
-if test "${SSE_CANDIDATE}" = "yes"; then
101
+if test "${SSE_CANDIDATE}" = "yes" -a "${enable_x86_sse}" = "yes"; then
102
opt="-msse2 -mfpmath=sse"
103
AX_CHECK_COMPILE_FLAG($opt, [CFLAGS="$CFLAGS $opt"], [])
104
fi