Restore --without-simd option for testing purposes


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@80 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/configure.ac b/configure.ac
index a969262..cd32445 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,27 +82,35 @@
 esac
 AM_CONDITIONAL([IS_WIN32], [test "x$is_win32" = "x1"])
 
-# Check if we're on a supported CPU
-AC_MSG_CHECKING([if we have SIMD optimisations for cpu type])
-case "$host_cpu" in
-  x86_64)
-    AC_MSG_RESULT([yes (x86_64)])
-    AC_PROG_NASM
-    simd_arch=x86_64
-  ;;
-  i*86 | x86 | ia32)
-    AC_MSG_RESULT([yes (i386)])
-    AC_PROG_NASM
-    simd_arch=i386
-  ;;
-  *)
-    AC_MSG_RESULT([no ("$host_cpu")])
-    AC_MSG_ERROR([CPU is not supported])
-  ;;
-esac
+# SIMD is optional
+AC_ARG_WITH([simd],
+    AC_HELP_STRING([--without-simd],[Omit accelerated SIMD routines.]))
+if test "x${with_simd}" != "xno"; then
+  # Check if we're on a supported CPU
+  AC_MSG_CHECKING([if we have SIMD optimisations for cpu type])
+  case "$host_cpu" in
+    x86_64)
+      AC_MSG_RESULT([yes (x86_64)])
+      AC_PROG_NASM
+      simd_arch=x86_64
+    ;;
+    i*86 | x86 | ia32)
+      AC_MSG_RESULT([yes (i386)])
+      AC_PROG_NASM
+      simd_arch=i386
+    ;;
+    *)
+      AC_MSG_RESULT([no ("$host_cpu")])
+      AC_MSG_ERROR([CPU is not supported])
+    ;;
+  esac
 
-AC_DEFINE([WITH_SIMD], [1], [Use accelerated SIMD routines.])
+  if test "x${with_simd}" != "xno"; then
+    AC_DEFINE([WITH_SIMD], [1], [Use accelerated SIMD routines.])
+  fi
+fi
 
+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"])