diff options
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index e86e6cb41..f0a1091a4 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -527,6 +527,27 @@ dnl MPFR_CHECK_DBL2INT_BUG dnl ---------------------- dnl Check for double-to-integer conversion bug dnl https://gforge.inria.fr/tracker/index.php?func=detail&aid=14435 +dnl For the exit status, the lowest values (including some values after 128) +dnl are reserved for various system errors. So, let's use the largest values +dnl below 255 for errors in the test itself. +dnl The following problem has been seen under Solaris in config.log, +dnl i.e. the failure to link with libgmp wasn't detected in the first +dnl test: +dnl configure: checking if gmp.h version and libgmp version are the same +dnl configure: gcc -o conftest -Wall -Wmissing-prototypes [...] +dnl configure: $? = 0 +dnl configure: ./conftest +dnl ld.so.1: conftest: fatal: libgmp.so.10: open failed: No such file [...] +dnl configure: $? = 0 +dnl configure: result: yes +dnl configure: checking for double-to-integer conversion bug +dnl configure: gcc -o conftest -Wall -Wmissing-prototypes [...] +dnl configure: $? = 0 +dnl configure: ./conftest +dnl ld.so.1: conftest: fatal: libgmp.so.10: open failed: No such file [...] +dnl ./configure[1680]: eval: line 1: 1971: Killed +dnl configure: $? = 9 +dnl configure: program exited with status 9 AC_DEFUN([MPFR_CHECK_DBL2INT_BUG], [ AC_REQUIRE([MPFR_CONFIGS])dnl AC_CACHE_CHECK([for double-to-integer conversion bug], mpfr_cv_dbl_int_bug, [ @@ -547,9 +568,9 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ break; u = u >> 1; } - return (i == 0 && u == 1UL) ? 0 : 1 + i; + return (i == 0 && u == 1UL) ? 0 : 254 - i; ]])], [mpfr_cv_dbl_int_bug="no"], - [mpfr_cv_dbl_int_bug="yes (exit status is $?)"], + [mpfr_cv_dbl_int_bug="yes or failed to exec (exit status is $?)"], [mpfr_cv_dbl_int_bug="cannot test, assume not present"]) ]) case $mpfr_cv_dbl_int_bug in |