1 From b3b8cb419e496629873fa7dda82a01863f58617a Mon Sep 17 00:00:00 2001
2 From: Benjamin Peterson <benjamin@python.org>
3 Date: Tue, 18 Sep 2018 23:49:05 -0700
4 Subject: [PATCH] run autoconf (GH-9411)
6 Follow up to 2a9c3805ddedf282881ef7811a561c70b74f80b1 (bpo-34585).
9 configure | 146 ++++++++++++++++----------------------------------
11 3 files changed, 51 insertions(+), 100 deletions(-)
15 @@ -288,4 +288,5 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
16 AS_VAR_IF([$1], [""], [$5], [$4])dnl
19 +m4_include([m4/ax_c_float_words_bigendian.m4])
20 m4_include([m4/ax_check_openssl.m4])
23 @@ -14235,131 +14235,77 @@ fi
24 # * Check for various properties of floating point *
25 # **************************************************
27 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
28 -$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
29 -if ${ac_cv_little_endian_double+:} false; then :
30 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
31 +$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
32 +if ${ax_cv_c_float_words_bigendian+:} false; then :
33 $as_echo_n "(cached) " >&6
36 -if test "$cross_compiling" = yes; then :
37 - ac_cv_little_endian_double=no
39 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41 +ax_cv_c_float_words_bigendian=unknown
42 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47 - double x = 9006104071832581.0;
48 - if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
55 -if ac_fn_c_try_run "$LINENO"; then :
56 - ac_cv_little_endian_double=yes
58 - ac_cv_little_endian_double=no
60 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
61 - conftest.$ac_objext conftest.beam conftest.$ac_ext
63 +double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
67 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
68 -$as_echo "$ac_cv_little_endian_double" >&6; }
69 -if test "$ac_cv_little_endian_double" = yes
72 +if ac_fn_c_try_compile "$LINENO"; then :
74 -$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
76 +if grep noonsees conftest.$ac_objext >/dev/null ; then
77 + ax_cv_c_float_words_bigendian=yes
79 +if grep seesnoon conftest.$ac_objext >/dev/null ; then
80 + if test "$ax_cv_c_float_words_bigendian" = unknown; then
81 + ax_cv_c_float_words_bigendian=no
83 + ax_cv_c_float_words_bigendian=unknown
87 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
88 -$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
89 -if ${ac_cv_big_endian_double+:} false; then :
90 - $as_echo_n "(cached) " >&6
93 -if test "$cross_compiling" = yes; then :
94 - ac_cv_big_endian_double=no
96 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
97 -/* end confdefs.h. */
101 - double x = 9006104071832581.0;
102 - if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
109 -if ac_fn_c_try_run "$LINENO"; then :
110 - ac_cv_big_endian_double=yes
112 - ac_cv_big_endian_double=no
114 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
115 - conftest.$ac_objext conftest.beam conftest.$ac_ext
116 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
118 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
119 +$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
122 +case $ax_cv_c_float_words_bigendian in
125 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
126 -$as_echo "$ac_cv_big_endian_double" >&6; }
127 -if test "$ac_cv_big_endian_double" = yes
129 +$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
136 -$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
137 +Unknown float word ordering. You need to manually preset
138 +ax_cv_c_float_words_bigendian=no (or yes) according to your system.
144 -# Some ARM platforms use a mixed-endian representation for doubles.
145 -# While Python doesn't currently have full support for these platforms
146 -# (see e.g., issue 1762561), we can at least make sure that float <-> string
148 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
149 -$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
150 -if ${ac_cv_mixed_endian_double+:} false; then :
151 - $as_echo_n "(cached) " >&6
154 -if test "$cross_compiling" = yes; then :
155 - ac_cv_mixed_endian_double=no
157 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
158 -/* end confdefs.h. */
159 +if test "$ax_cv_c_float_words_bigendian" = "yes"
164 - double x = 9006104071832581.0;
165 - if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
170 +$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
173 -if ac_fn_c_try_run "$LINENO"; then :
174 - ac_cv_mixed_endian_double=yes
176 - ac_cv_mixed_endian_double=no
178 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
179 - conftest.$ac_objext conftest.beam conftest.$ac_ext
181 +elif test "$ax_cv_c_float_words_bigendian" = "no"
185 +$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
187 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
188 -$as_echo "$ac_cv_mixed_endian_double" >&6; }
189 -if test "$ac_cv_mixed_endian_double" = yes
192 + # Some ARM platforms use a mixed-endian representation for doubles.
193 + # While Python doesn't currently have full support for these platforms
194 + # (see e.g., issue 1762561), we can at least make sure that float <-> string
195 + # conversions work.
196 + # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
197 + # or little, then it must be this?
199 $as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
204 /* Define if --enable-ipv6 is specified */
207 +/* Define to 1 if your system stores words within floats with the most
208 + significant word first */
209 +#undef FLOAT_WORDS_BIGENDIAN
211 /* Define if flock needs to be linked with bsd library. */
212 #undef FLOCK_NEEDS_LIBBSD