From a766b62880108f278478888f5167a5fbf2819a97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Sun, 22 Jun 2008 13:42:21 -0400 Subject: [PATCH] Add configure time options to disable mmx/sse2/vmx --- configure.ac | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 52ecb0d..1bfa2a5 100644 --- a/configure.ac +++ b/configure.ac @@ -149,7 +149,15 @@ int main () { return _mm_cvtsi64_si32 (v); }], have_mmx_intrinsics=yes) CFLAGS=$xserver_save_CFLAGS -AC_MSG_RESULT($have_mmx_intrinsics) + +AC_ARG_ENABLE(mmx, + [AC_HELP_STRING([--disable-mmx], + [disable MMX fast paths])], + [disable_mmx=yes], [disable_mmx=no]) + +if test $disable_mmx = yes ; then + have_mmx_intrinsics=disabled +fi if test $have_mmx_intrinsics = yes ; then AC_DEFINE(USE_MMX, 1, [use MMX compiler intrinsics]) @@ -157,6 +165,8 @@ else MMX_CFLAGS= fi +AC_MSG_RESULT($have_mmx_intrinsics) + AM_CONDITIONAL(USE_MMX, test $have_mmx_intrinsics = yes) dnl ======================================================= @@ -225,12 +235,22 @@ int main () { return 0; }], have_sse2_intrinsics=yes) CFLAGS=$xserver_save_CFLAGS -AC_MSG_RESULT($have_sse2_intrinsics) + +AC_ARG_ENABLE(sse2, + [AC_HELP_STRING([--disable-sse2], + [disable SSE2 fast paths])], + [disable_sse2=yes], [disable_sse2=no]) + +if test $disable_sse2 = yes ; then + have_sse2_intrinsics=disabled +fi if test $have_sse2_intrinsics = yes ; then - AC_DEFINE(USE_SSE2, 1, [use SSE compiler intrinsics]) + AC_DEFINE(USE_SSE2, 1, [use SSE2 compiler intrinsics]) fi +AC_MSG_RESULT($have_sse2_intrinsics) + AM_CONDITIONAL(USE_SSE2, test $have_sse2_intrinsics = yes) dnl ======================================================== @@ -259,13 +279,24 @@ int main () { return 0; }], have_vmx_intrinsics=yes) CFLAGS=$xserver_save_CFLAGS -AC_MSG_RESULT($have_vmx_intrinsics) + +AC_ARG_ENABLE(vmx, + [AC_HELP_STRING([--disable-vmx], + [disable VMX fast paths])], + [disable_vmx=yes], [disable_vmx=no]) + +if test $disable_vmx = yes ; then + have_vmx_intrinsics=disabled +fi if test $have_vmx_intrinsics = yes ; then AC_DEFINE(USE_VMX, 1, [use VMX compiler intrinsics]) else VMX_CFLAGS= fi + +AC_MSG_RESULT($have_vmx_intrinsics) + AC_SUBST(VMX_CFLAGS) AM_CONDITIONAL(USE_VMX, test $have_vmx_intrinsics = yes) -- 2.7.4