diff options
author | Vladimir Marangozov <vladimir.marangozov@t-online.de> | 2000-07-12 05:05:06 (GMT) |
---|---|---|
committer | Vladimir Marangozov <vladimir.marangozov@t-online.de> | 2000-07-12 05:05:06 (GMT) |
commit | a618028e45c7a4eb9445501e3f104bf18e9a1be3 (patch) | |
tree | 2233c55a5753e6b9857cb6973400c57f5e182ed5 /configure.in | |
parent | 0582df98d3fe7dff7d5fcb06adc391b2fa2bb44d (diff) | |
download | cpython-a618028e45c7a4eb9445501e3f104bf18e9a1be3.zip cpython-a618028e45c7a4eb9445501e3f104bf18e9a1be3.tar.gz cpython-a618028e45c7a4eb9445501e3f104bf18e9a1be3.tar.bz2 |
Second try: checks whether right shift extends the sign bit.
Adds caching and reverts back the 'return' to 'exit()' in
AC_TRY_RUN as recommended by the Autoconf documentation.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/configure.in b/configure.in index 763bfbd..f008555 100644 --- a/configure.in +++ b/configure.in @@ -1139,15 +1139,19 @@ AC_C_BIGENDIAN # Check whether right shifting a negative integer extends the sign bit # or fills with zeros (like the Cray J90, according to Tim Peters). AC_MSG_CHECKING(whether right shift extends the sign bit) +AC_CACHE_VAL(ac_cv_rshift_extends_sign, [ AC_TRY_RUN([ int main() { - return ((-1)>>3 == -1) ? 1 : 0; + exit(((-1)>>3 == -1) ? 0 : 1); } -], -[AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS) - AC_MSG_RESULT(yes)], -[AC_MSG_RESULT(no)]) +], ac_cv_rshift_extends_sign=yes, ac_cv_rshift_extends_sign=no)]) +AC_MSG_RESULT($ac_cv_rshift_extends_sign) +if test "$ac_cv_rshift_extends_sign" = no +then + AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS) +fi + # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! # Add sys/socket.h to confdefs.h |