From: James Cowgill <james410@cowgill.org.uk>
Date: Sat, 25 Apr 2020 15:13:05 +0200
Subject: fixes FTBFS on non-x86 archs

Bug-Debian: https://bugs.debian.org/768966
Reviewed-By: Tomasz Buchert <tomasz@debian.org>

Automake scripts are a bit outdated and fail to run correctly
on non-x86 archs. This patch fixes this problem.

The problem is solved in a more general way upstream.
---
 acinclude/ax_ext_sse.m4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/acinclude/ax_ext_sse.m4 b/acinclude/ax_ext_sse.m4
index 296c876..bd0c991 100644
--- a/acinclude/ax_ext_sse.m4
+++ b/acinclude/ax_ext_sse.m4
@@ -45,7 +45,7 @@ AC_DEFUN([AX_EXT_SSE],
  AC_CACHE_CHECK([whether mmx is supported], [ax_cv_have_mmx_ext],
   [
     ax_cv_have_mmx_ext=no
-    if test "$((0x$edx>>23&0x01))" = 1; then
+    if test "$edx" != "unknown" && test "$((0x$edx>>23&0x01))" = 1; then
       ax_cv_have_mmx_ext=yes
     fi
   ])
@@ -53,7 +53,7 @@ AC_DEFUN([AX_EXT_SSE],
  AC_CACHE_CHECK([whether sse is supported], [ax_cv_have_sse_ext],
   [
     ax_cv_have_sse_ext=no
-    if test "$((0x$edx>>25&0x01))" = 1; then
+    if test "$edx" != "unknown" && test "$((0x$edx>>25&0x01))" = 1; then
       ax_cv_have_sse_ext=yes
     fi
   ])
