summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-09 12:10:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-09 12:10:54 +0000
commitcf7ad7e057f675e9c0d638180b59e7d9d869dd41 (patch)
tree0c13e89bc4a57b7ec186313bb24af23116c66825 /configure.in
parentb9d3995310ecb42f3cfd062e8e507d2c886501ee (diff)
* configure.in (rb_cv_rshift_sign, rb_cv_binary_elf): get rid of
AC_TRY_RUN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in43
1 files changed, 12 insertions, 31 deletions
diff --git a/configure.in b/configure.in
index 47dadcac36..8904ff89a5 100644
--- a/configure.in
+++ b/configure.in
@@ -979,18 +979,9 @@ if test x"$target_cpu" = xia64; then
fi
AC_CACHE_CHECK(whether right shift preserve sign bit, rb_cv_rshift_sign,
- [AC_TRY_RUN([
-int
-main()
-{
- if (-1==(-1>>1))
- return 0;
- return 1;
-}
-],
+ [AC_COMPILE_IFELSE(AC_LANG_BOOL_COMPILE_TRY([], [(-1==(-1>>1))]),
rb_cv_rshift_sign=yes,
- rb_cv_rshift_sign=no,
- rb_cv_rshift_sign=yes)])
+ rb_cv_rshift_sign=no)])
if test "$rb_cv_rshift_sign" = yes; then
AC_DEFINE(RSHIFT(x,y), ((x)>>(int)y))
else
@@ -1232,26 +1223,16 @@ AC_ARG_WITH(dln-a-out,
esac], [with_dln_a_out=no])
AC_CACHE_CHECK(whether ELF binaries are produced, rb_cv_binary_elf,
-[AC_TRY_RUN([
-/* Test for whether ELF binaries are produced */
-#include <fcntl.h>
-#include <stdlib.h>
-main() {
- char buffer[4];
- int i=open("conftest",O_RDONLY);
- if(i==-1)
- exit(1); /* fail */
- if(read(i,&buffer[0],4)<4)
- exit(1); /* fail */
- if(buffer[0] != 127 || buffer[1] != 'E' ||
- buffer[2] != 'L' || buffer[3] != 'F')
- exit(1); /* fail */
- exit(0); /* succeed (yes, it's ELF) */
-}
-],
-rb_cv_binary_elf=yes,
-rb_cv_binary_elf=no,
-rb_cv_binary_elf=yes)])
+[AC_TRY_LINK([],[], [
+case "`head -1 conftest$EXEEXT | cat -e`" in
+dnl (
+'^?ELF'*)
+ rb_cv_binary_elf=yes;;
+dnl (
+*)
+ rb_cv_binary_elf=no;;
+esac],
+rb_cv_binary_elf=no)])
if test "$rb_cv_binary_elf" = yes; then
AC_DEFINE(USE_ELF)