summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2013-07-11 11:33:12 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2013-07-11 11:33:12 +0000
commit7d3b04a77409e26d76dcdf95560423fc8446e1db (patch)
treed0d1a8100fe7625f9efaecb6c568f2b627e24408 /acinclude.m4
parentd7fb0ab622b6f3b916ec1dfca9be2df3c4f8d03e (diff)
downloadmpfr-7d3b04a77409e26d76dcdf95560423fc8446e1db.tar.gz
[acinclude.m4] Improved MPFR_CHECK_DBL2INT_BUG in case of failure
and added comments about that. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8614 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m425
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