--- configure.orig	2012-06-08 19:49:51.000000000 +0800
+++ configure	2022-10-30 05:20:50.000000000 +0800
@@ -12093,11 +12093,17 @@
     else
         :
     fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -mfpmath=387 flags" >&5
-$as_echo_n "checking if $CC supports -mfpmath=387 flags... " >&6; }
-    SAVE_CFLAGS="$CFLAGS"
-    CFLAGS="-mfpmath=387"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+case $ac_cv_c_bigendian in
+    no)
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -mfpmath=387 flags" >&5
+        $as_echo_n "checking if $CC supports -mfpmath=387 flags... " >&6; }
+        SAVE_CFLAGS="$CFLAGS"
+        CFLAGS="-mfpmath=387"
+        ;; #(
+    yes)
+        ;; #(
+esac
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -12117,11 +12123,17 @@
     CFLAGS="$SAVE_CFLAGS"
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lqt_try_cflags_ok" >&5
 $as_echo "$lqt_try_cflags_ok" >&6; }
-    if test x"$lqt_try_cflags_ok" = x"yes"; then
-        CFLAGS="$CFLAGS -mfpmath=387"
-    else
-        :
-    fi
+case $ac_cv_c_bigendian in
+    no)
+        if test x"$lqt_try_cflags_ok" = x"yes"; then
+            CFLAGS="$CFLAGS -mfpmath=387"
+        else
+            :
+        fi
+        ;; #(
+    yes)
+        ;; #(
+esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fvisibility=hidden flags" >&5
 $as_echo_n "checking if $CC supports -fvisibility=hidden flags... " >&6; }
     SAVE_CFLAGS="$CFLAGS"
