summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2012-09-04 12:36:52 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2012-09-04 12:36:52 +0000
commitbd807d80bd4fc75bc0c7ee03a534d3f26aa58405 (patch)
treeb5ce2ea26ba6f3e09730a4b88a3907e40da415f0 /configure.ac
parentd6b8aa9cd753daf124cc8c831d06f76c36821ab5 (diff)
downloadmpfr-bd807d80bd4fc75bc0c7ee03a534d3f26aa58405.tar.gz
added support for --enable-decimal-float with g++ (does not work with icpc,
the Intel C++ compiler) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8412 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 08684290e..3c91c81b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -243,13 +243,21 @@ AC_ARG_ENABLE(decimal-float,
yes) AC_DEFINE([MPFR_WANT_DECIMAL_FLOATS],1,
[Build decimal float functions])
AC_MSG_CHECKING(if compiler knows _Decimal64)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[_Decimal64 x;]])],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef _Decimal64
+typedef float _Decimal64 __attribute__((mode(DD)));
+#endif
+_Decimal64 x;
+]])],
[AC_MSG_RESULT(yes)],
[AC_MSG_ERROR([Compiler doesn't know _Decimal64; try GCC >= 4.2, configured with --enable-decimal-float]
)])
AC_MSG_CHECKING(decimal float format)
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>
+#ifndef _Decimal64
+typedef float _Decimal64 __attribute__((mode(DD)));
+#endif
]], [[
union { double d; _Decimal64 d64; } y;
y.d64 = 1234567890123456.0dd;