summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-03-26 09:36:52 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-03-26 09:36:52 +0000
commit1fc42ba93fd722307796c9aed50c5be3bd95be98 (patch)
tree9468ec14fd3453cdc39bbfe7bc7b96387a8fc431 /configure.in
parent25d7ab0b841fe1a711d3cd3898eeefddaba696fd (diff)
downloadmpfr-1fc42ba93fd722307796c9aed50c5be3bd95be98.tar.gz
added check for valid 1/0, denormalized, and extended precision
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1777 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in47
1 files changed, 47 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 18b1af3d0..b74b2844b 100644
--- a/configure.in
+++ b/configure.in
@@ -93,6 +93,53 @@ main() { fesetround(FE_DOWNWARD); }],
AC_MSG_RESULT(no)
)
+dnl Check whether 0/0, 1/0, -1/0 are valid expressions
+AC_MSG_CHECKING(for 0/0 as a valid expression)
+AC_TRY_RUN([#include <math.h>
+main() { double x = 0.0/0.0; exit (0); }],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_INFS)],
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(no)
+)
+
+dnl Check if denormalized numbers are supported
+AC_MSG_CHECKING(for denormalized numbers)
+AC_TRY_RUN([
+#include <math.h>
+#include <stdio.h>
+main() { double x = 2.22507385850720138309e-308;
+ fprintf (stderr, "%e\n", x / 2.0);
+ exit (2.0 * (x / 2.0) != x);}],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_DENORMS)],
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(no)
+)
+
+dnl Check for extended precision
+AC_MSG_CHECKING(for extended precision)
+AC_TRY_RUN([
+main()
+{
+ double c, d, dj;
+ int j;
+
+ c = 1.46484375e-3;
+
+ dj = 1.0;
+ for (j=0; j<54; j++) dj *= 0.5;
+ d = 0.75 + dj;
+ d /= 1 << 9;
+ exit (c == d);
+}],
+ [AC_MSG_RESULT(yes)
+ CFLAGS="$CFLAGS -ffloat-store"
+ AC_DEFINE(USE_EXTENDED)],
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(no)
+)
+
AC_MY_LIBS($with_gmp_lib, gmp)
AC_SUBST(INCLUDES)
AC_SUBST(LDADD)