]> granicus.if.org Git - libjpeg-turbo/commitdiff
Due to the way in which the configure script silently falls back to a non-SIMD build...
authorDRC <dcommander@users.sourceforge.net>
Wed, 25 Sep 2013 05:24:46 +0000 (05:24 +0000)
committerDRC <dcommander@users.sourceforge.net>
Wed, 25 Sep 2013 05:24:46 +0000 (05:24 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1039 632fc199-4ca6-4c93-a231-07263d6284db

configure.ac

index e7435aa41ee3ab94bd88ad88d55d54d29abb8456..9cdbd4282713c0a457cd97533819427decce5cc2 100644 (file)
@@ -400,6 +400,10 @@ fi
 AC_ARG_WITH([simd],
   AC_HELP_STRING([--without-simd], [Do not include SIMD extensions]))
 if test "x${with_simd}" != "xno"; then
+  require_simd=no
+  if test "x${with_simd}" = "xyes"; then
+    require_simd=yes
+  fi
   # Check if we're on a supported CPU
   AC_MSG_CHECKING([if we have SIMD optimisations for cpu type])
   case "$host_cpu" in
@@ -420,13 +424,21 @@ if test "x${with_simd}" != "xno"; then
         [AC_MSG_RESULT([yes])
          simd_arch=arm],
         [AC_MSG_RESULT([no])
-         with_simd=no
-         AC_MSG_WARN([SIMD support can't be enabled.  Performance will suffer.])])
+         with_simd=no])
+      if test "x${require_simd}" = "xyes" -a "x${with_simd}" = "xno"; then
+        AC_MSG_ERROR([SIMD support can't be enabled.])
+      else
+        AC_MSG_WARN([SIMD support can't be enabled.  Performance will suffer.])
+      fi
       ;;
     *)
       AC_MSG_RESULT([no ("$host_cpu")])
-      AC_MSG_WARN([SIMD support not available for this CPU.  Performance will suffer.])
       with_simd=no;
+      if test "x${require_simd}" = "xyes" -a "x${with_simd}" = "xno"; then
+        AC_MSG_ERROR([SIMD support not available for this CPU.])
+      else
+        AC_MSG_WARN([SIMD support not available for this CPU.  Performance will suffer.])
+      fi
       ;;
   esac