Clean up SIMD glue code
The SIMD glue code has gotten a bit #ifdef heavy so clean it up by having
one file for each possible SIMD arch. This also allows a simplification of
the x86_64 code as SSE/SSE2 is always known to exist on that arch.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3862 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/jpeg/configure.ac b/common/jpeg/configure.ac
index a97a4e9..0b37132 100644
--- a/common/jpeg/configure.ac
+++ b/common/jpeg/configure.ac
@@ -92,22 +92,27 @@
x86_64)
AC_MSG_RESULT([yes (x86_64)])
AC_PROG_NASM
- AC_DEFINE([WITH_SIMD], [1], [Use accelerated SIMD routines.])
- AC_DEFINE([WITH_SIMD64], [1], [Use x86-64 accelerated SIMD routines.])
+ simd_arch=x86_64
;;
i*86 | x86 | ia32)
AC_MSG_RESULT([yes (i386)])
AC_PROG_NASM
- AC_DEFINE([WITH_SIMD], [1], [Use accelerated SIMD routines.])
+ simd_arch=i386
;;
*)
AC_MSG_RESULT([no ("$host_cpu")])
with_simd=no
;;
esac
+
+ if test "x${with_simd}" != "xno"; then
+ AC_DEFINE([WITH_SIMD], [1], [Use accelerated SIMD routines.])
+ fi
fi
-AM_CONDITIONAL([WITH_SIMD64], [test "x$with_simd64" != "xno"])
+
AM_CONDITIONAL([WITH_SIMD], [test "x$with_simd" != "xno"])
+AM_CONDITIONAL([SIMD_I386], [test "x$simd_arch" = "xi386"])
+AM_CONDITIONAL([SIMD_X86_64], [test "x$simd_arch" = "xx86_64"])
# jconfig.h is the file we use, but we have another before that to
# fool autoheader. the reason is that we include this header in our