diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-02-29 20:29:40 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-02-29 20:29:40 +0000 |
commit | 5abadbf0f4b642f7f9c48d15a5f92276033050c2 (patch) | |
tree | 4ae5d5d47950549a9e02cfe7a2723a39215b5996 /configure.ac | |
parent | 3ad2c80ac2daef65b035ce450e16ce08c39c1e7d (diff) | |
download | mpfr-5abadbf0f4b642f7f9c48d15a5f92276033050c2.tar.gz |
reverted commit 10144 (wrongly applied to branch 3.1 instead of trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10149 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 51 |
1 files changed, 11 insertions, 40 deletions
diff --git a/configure.ac b/configure.ac index 10368870f..7b944d92a 100644 --- a/configure.ac +++ b/configure.ac @@ -252,40 +252,6 @@ AC_LANG(C) dnl Support unusual archivers. AM_PROG_AR -dnl Try to determine the double format -AC_MSG_CHECKING(format of `double') -AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include <stdint.h> -]], [[ -union ieee_double_extract -{ - double d; - uint32_t x[2]; -} t; -t.d = 1.000000476837158203125; /* 1 + 1/2^21, which has manl = 2^31, - manh = 0, exp = 1023 and sig = 0 */ -if (t.x[0] == 2147483648UL && t.x[1] == 1072693248UL) - return 1; /* little endian */ -else if (t.x[0] == 1072693248UL && t.x[1] == 2147483648UL) - return 2; /* little endian swapped */ -else if (t.x[0] == 1024 && t.x[1] == 2147483648UL) - return 3; /* big endian */ -else - return 0; /* unknown */ -]])], - [mpfr_ieee_double=$?], - [mpfr_ieee_double=$?], - [mpfr_ieee_double=0]) -case "$mpfr_ieee_double" in - 1) AC_MSG_RESULT(little endian) - AC_DEFINE(HAVE_DOUBLE_IEEE_LITTLE_ENDIAN) ;; - 2) AC_MSG_RESULT(little endian swapped) - AC_DEFINE(HAVE_DOUBLE_IEEE_LITTLE_SWAPPED) ;; - 3) AC_MSG_RESULT(big endian) - AC_DEFINE(HAVE_DOUBLE_IEEE_BIG_ENDIAN) ;; - *) AC_MSG_ERROR(format of 'double' not recognized) ;; -esac - dnl For GCC, _Decimal64 was introduced in GCC 4.3 for some targets dnl (note that it is not guaranteed to be available because it may dnl be disabled in the GCC build). See: @@ -304,12 +270,17 @@ AC_ARG_ENABLE(decimal-float, AC_MSG_CHECKING(if compiler knows _Decimal64) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[_Decimal64 x;]])], [AC_MSG_RESULT(yes) - AC_MSG_CHECKING(if 'double' format is known) - case $mpfr_ieee_double in - 0) AC_MSG_RESULT(no) - AC_MSG_ERROR([unknown 'double' format]) ;; - *) AC_MSG_RESULT(yes) - esac + if test "$use_gmp_build" != yes ; then + AC_MSG_ERROR([decimal float support requires --with-gmp-build]) + fi + AC_MSG_CHECKING(if _GMP_IEEE_FLOATS is defined) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#include "gmp.h" +#include "gmp-impl.h" +#ifndef _GMP_IEEE_FLOATS +#error "_GMP_IEEE_FLOATS is not defined" +#endif]])],[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) + AC_MSG_ERROR([decimal float support requires _GMP_IEEE_FLOATS])]) ], [AC_MSG_RESULT(no) AC_MSG_ERROR([Compiler doesn't know _Decimal64 (ISO/IEC TR 24732). |