summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Marangozov <vladimir.marangozov@t-online.de>2000-07-12 05:05:06 (GMT)
committerVladimir Marangozov <vladimir.marangozov@t-online.de>2000-07-12 05:05:06 (GMT)
commita618028e45c7a4eb9445501e3f104bf18e9a1be3 (patch)
tree2233c55a5753e6b9857cb6973400c57f5e182ed5
parent0582df98d3fe7dff7d5fcb06adc391b2fa2bb44d (diff)
downloadcpython-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.
-rwxr-xr-xconfigure35
-rw-r--r--configure.in14
2 files changed, 32 insertions, 17 deletions
diff --git a/configure b/configure
index 188763a..8cd4ec8 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
-# From configure.in Revision: 1.135
+# From configure.in Revision: 1.136
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
@@ -5604,35 +5604,46 @@ fi
# or fills with zeros (like the Cray J90, according to Tim Peters).
echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
echo "configure:5607: checking whether right shift extends the sign bit" >&5
+if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 5612 "configure"
+#line 5616 "configure"
#include "confdefs.h"
int main()
{
- return ((-1)>>3 == -1) ? 1 : 0;
+ exit(((-1)>>3 == -1) ? 0 : 1);
}
EOF
-if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
- cat >> confdefs.h <<\EOF
-#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
-EOF
-
- echo "$ac_t""yes" 1>&6
+ ac_cv_rshift_extends_sign=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
- echo "$ac_t""no" 1>&6
+ ac_cv_rshift_extends_sign=no
fi
rm -fr conftest*
fi
+fi
+
+echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
+if test "$ac_cv_rshift_extends_sign" = no
+then
+ cat >> confdefs.h <<\EOF
+#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
+EOF
+
+fi
+
# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
# Add sys/socket.h to confdefs.h
@@ -5642,12 +5653,12 @@ cat >> confdefs.h <<\EOF
#endif
EOF
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:5646: checking for socklen_t" >&5
+echo "configure:5657: checking for socklen_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5651 "configure"
+#line 5662 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
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