@@ -13853,131 +13853,77 @@ fi
13853
13853
# * Check for various properties of floating point *
13854
13854
# **************************************************
13855
13855
13856
- { $as_echo " $as_me :${as_lineno-$LINENO } : checking whether C doubles are little-endian IEEE 754 binary64 " >&5
13857
- $as_echo_n " checking whether C doubles are little-endian IEEE 754 binary64 ... " >&6 ; }
13858
- if ${ac_cv_little_endian_double +: } false ; then :
13856
+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking whether float word ordering is bigendian " >&5
13857
+ $as_echo_n " checking whether float word ordering is bigendian ... " >&6 ; }
13858
+ if ${ax_cv_c_float_words_bigendian +: } false ; then :
13859
13859
$as_echo_n " (cached) " >&6
13860
13860
else
13861
13861
13862
- if test " $cross_compiling " = yes; then :
13863
- ac_cv_little_endian_double=no
13864
- else
13865
- cat confdefs.h - << _ACEOF >conftest.$ac_ext
13862
+
13863
+ ax_cv_c_float_words_bigendian=unknown
13864
+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
13866
13865
/* end confdefs.h. */
13867
13866
13868
- #include <string.h>
13869
- int main() {
13870
- double x = 9006104071832581.0;
13871
- if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13872
- return 0;
13873
- else
13874
- return 1;
13875
- }
13876
13867
13877
- _ACEOF
13878
- if ac_fn_c_try_run " $LINENO " ; then :
13879
- ac_cv_little_endian_double=yes
13880
- else
13881
- ac_cv_little_endian_double=no
13882
- fi
13883
- rm -f core * .core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13884
- conftest.$ac_objext conftest.beam conftest.$ac_ext
13885
- fi
13868
+ double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
13886
13869
13887
- fi
13888
13870
13889
- { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_cv_little_endian_double " >&5
13890
- $as_echo " $ac_cv_little_endian_double " >&6 ; }
13891
- if test " $ac_cv_little_endian_double " = yes
13892
- then
13871
+ _ACEOF
13872
+ if ac_fn_c_try_compile " $LINENO " ; then :
13893
13873
13894
- $as_echo " #define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >> confdefs.h
13895
13874
13875
+ if grep noonsees conftest.$ac_objext > /dev/null ; then
13876
+ ax_cv_c_float_words_bigendian=yes
13877
+ fi
13878
+ if grep seesnoon conftest.$ac_objext > /dev/null ; then
13879
+ if test " $ax_cv_c_float_words_bigendian " = unknown; then
13880
+ ax_cv_c_float_words_bigendian=no
13881
+ else
13882
+ ax_cv_c_float_words_bigendian=unknown
13883
+ fi
13896
13884
fi
13897
13885
13898
- { $as_echo " $as_me :${as_lineno-$LINENO } : checking whether C doubles are big-endian IEEE 754 binary64" >&5
13899
- $as_echo_n " checking whether C doubles are big-endian IEEE 754 binary64... " >&6 ; }
13900
- if ${ac_cv_big_endian_double+: } false ; then :
13901
- $as_echo_n " (cached) " >&6
13902
- else
13903
-
13904
- if test " $cross_compiling " = yes; then :
13905
- ac_cv_big_endian_double=no
13906
- else
13907
- cat confdefs.h - << _ACEOF >conftest.$ac_ext
13908
- /* end confdefs.h. */
13909
-
13910
- #include <string.h>
13911
- int main() {
13912
- double x = 9006104071832581.0;
13913
- if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13914
- return 0;
13915
- else
13916
- return 1;
13917
- }
13918
13886
13919
- _ACEOF
13920
- if ac_fn_c_try_run " $LINENO " ; then :
13921
- ac_cv_big_endian_double=yes
13922
- else
13923
- ac_cv_big_endian_double=no
13924
13887
fi
13925
- rm -f core * .core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13926
- conftest.$ac_objext conftest.beam conftest.$ac_ext
13888
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13927
13889
fi
13890
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ax_cv_c_float_words_bigendian " >&5
13891
+ $as_echo " $ax_cv_c_float_words_bigendian " >&6 ; }
13928
13892
13929
- fi
13893
+ case $ax_cv_c_float_words_bigendian in
13894
+ yes)
13930
13895
13931
- { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_cv_big_endian_double " >&5
13932
- $as_echo " $ac_cv_big_endian_double " >&6 ; }
13933
- if test " $ac_cv_big_endian_double " = yes
13934
- then
13896
+ $as_echo " #define FLOAT_WORDS_BIGENDIAN 1" >> confdefs.h
13897
+ ;;
13898
+ no)
13899
+ ;;
13900
+ * )
13901
+ as_fn_error $? "
13935
13902
13936
- $as_echo " #define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >> confdefs.h
13903
+ Unknown float word ordering. You need to manually preset
13904
+ ax_cv_c_float_words_bigendian=no (or yes) according to your system.
13937
13905
13938
- fi
13906
+ " " $LINENO " 5 ;;
13907
+ esac
13939
13908
13940
- # Some ARM platforms use a mixed-endian representation for doubles.
13941
- # While Python doesn't currently have full support for these platforms
13942
- # (see e.g., issue 1762561), we can at least make sure that float <-> string
13943
- # conversions work.
13944
- { $as_echo " $as_me :${as_lineno-$LINENO } : checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13945
- $as_echo_n " checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6 ; }
13946
- if ${ac_cv_mixed_endian_double+: } false ; then :
13947
- $as_echo_n " (cached) " >&6
13948
- else
13949
13909
13950
- if test " $cross_compiling " = yes; then :
13951
- ac_cv_mixed_endian_double=no
13952
- else
13953
- cat confdefs.h - << _ACEOF >conftest.$ac_ext
13954
- /* end confdefs.h. */
13910
+ if test " $ax_cv_c_float_words_bigendian " = " yes"
13911
+ then
13955
13912
13956
- #include <string.h>
13957
- int main() {
13958
- double x = 9006104071832581.0;
13959
- if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13960
- return 0;
13961
- else
13962
- return 1;
13963
- }
13913
+ $as_echo " #define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >> confdefs.h
13964
13914
13965
- _ACEOF
13966
- if ac_fn_c_try_run " $LINENO " ; then :
13967
- ac_cv_mixed_endian_double=yes
13968
- else
13969
- ac_cv_mixed_endian_double=no
13970
- fi
13971
- rm -f core * .core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13972
- conftest.$ac_objext conftest.beam conftest.$ac_ext
13973
- fi
13915
+ elif test " $ax_cv_c_float_words_bigendian " = " no"
13916
+ then
13974
13917
13975
- fi
13918
+ $as_echo " #define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1 " >> confdefs.h
13976
13919
13977
- { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_cv_mixed_endian_double " >&5
13978
- $as_echo " $ac_cv_mixed_endian_double " >&6 ; }
13979
- if test " $ac_cv_mixed_endian_double " = yes
13980
- then
13920
+ else
13921
+ # Some ARM platforms use a mixed-endian representation for doubles.
13922
+ # While Python doesn't currently have full support for these platforms
13923
+ # (see e.g., issue 1762561), we can at least make sure that float <-> string
13924
+ # conversions work.
13925
+ # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
13926
+ # or little, then it must be this?
13981
13927
13982
13928
$as_echo " #define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >> confdefs.h
13983
13929
0 commit comments