case $ax_cv_c_float_words_bigendian in
yes)
-printf "%s\n" "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
+printf "%s\n" "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
;;
no)
- ;;
- *)
- as_fn_error $? "
-
-Unknown float word ordering. You need to manually preset
-ax_cv_c_float_words_bigendian=no (or yes) according to your system.
-
- " "$LINENO" 5 ;;
-esac
+printf "%s\n" "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
+ ;;
+ *)
+ case $host_cpu in #(
+ *arm*) :
+ # Some ARM platforms use a mixed-endian representation for
+ # doubles. While Python doesn't currently have full support
+ # for these platforms (see e.g., issue 1762561), we can at
+ # least make sure that float <-> string conversions work.
+ # FLOAT_WORDS_BIGENDIAN doesn't actually detect this case,
+ # but if it's not big or little, then it must be this?
-if test "$ax_cv_c_float_words_bigendian" = "yes"
-then
-
-printf "%s\n" "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
-
-elif test "$ax_cv_c_float_words_bigendian" = "no"
-then
+printf "%s\n" "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
+ ;; #(
+ wasm*) :
printf "%s\n" "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
+ ;; #(
+ *) :
+ ;;
+esac ;;
+esac
-else
- # Some ARM platforms use a mixed-endian representation for doubles.
- # While Python doesn't currently have full support for these platforms
- # (see e.g., issue 1762561), we can at least make sure that float <-> string
- # conversions work.
- # FLOAT_WORDS_BIGENDIAN doesn't actually detect this case, but if it's not big
- # or little, then it must be this?
-
-printf "%s\n" "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
-fi
# The short float repr introduced in Python 3.1 requires the
# correctly-rounded string <-> double conversion functions from
# * Check for various properties of floating point *
# **************************************************
-AX_C_FLOAT_WORDS_BIGENDIAN
-if test "$ax_cv_c_float_words_bigendian" = "yes"
-then
- AC_DEFINE([DOUBLE_IS_BIG_ENDIAN_IEEE754], [1],
- [Define if C doubles are 64-bit IEEE 754 binary format, stored
- with the most significant byte first])
-elif test "$ax_cv_c_float_words_bigendian" = "no"
-then
- AC_DEFINE([DOUBLE_IS_LITTLE_ENDIAN_IEEE754], [1],
- [Define if C doubles are 64-bit IEEE 754 binary format, stored
- with the least significant byte first])
-else
- # Some ARM platforms use a mixed-endian representation for doubles.
- # While Python doesn't currently have full support for these platforms
- # (see e.g., issue 1762561), we can at least make sure that float <-> string
- # conversions work.
- # FLOAT_WORDS_BIGENDIAN doesn't actually detect this case, but if it's not big
- # or little, then it must be this?
- AC_DEFINE([DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754], [1],
- [Define if C doubles are 64-bit IEEE 754 binary format, stored
- in ARM mixed-endian order (byte order 45670123)])
-fi
+AX_C_FLOAT_WORDS_BIGENDIAN(
+ [AC_DEFINE([DOUBLE_IS_BIG_ENDIAN_IEEE754], [1],
+ [Define if C doubles are 64-bit IEEE 754 binary format,
+ stored with the most significant byte first])],
+ [AC_DEFINE([DOUBLE_IS_LITTLE_ENDIAN_IEEE754], [1],
+ [Define if C doubles are 64-bit IEEE 754 binary format,
+ stored with the least significant byte first])],
+ [AS_CASE([$host_cpu],
+ [*arm*], [# Some ARM platforms use a mixed-endian representation for
+ # doubles. While Python doesn't currently have full support
+ # for these platforms (see e.g., issue 1762561), we can at
+ # least make sure that float <-> string conversions work.
+ # FLOAT_WORDS_BIGENDIAN doesn't actually detect this case,
+ # but if it's not big or little, then it must be this?
+ AC_DEFINE([DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754], [1],
+ [Define if C doubles are 64-bit IEEE 754 binary format,
+ stored in ARM mixed-endian order (byte order 45670123)])],
+ [wasm*], [AC_DEFINE([DOUBLE_IS_LITTLE_ENDIAN_IEEE754], [1],
+ [Define if C doubles are 64-bit IEEE 754 binary format,
+ stored with the least significant byte first])])])
# The short float repr introduced in Python 3.1 requires the
# correctly-rounded string <-> double conversion functions from