]> arthur.barton.de Git - netdata.git/commitdiff
added configure option to disable x86 SSE detection
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 28 Sep 2016 19:29:06 +0000 (22:29 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 28 Sep 2016 19:29:06 +0000 (22:29 +0300)
configure.ac

index 240df9ddf7f436485ce19a51be40170f041a6a2f..b86131d008b39a573ba8bfa3252e7454fbe4ccc0 100644 (file)
@@ -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