summaryrefslogtreecommitdiff
path: root/libc/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'libc/configure.in')
-rw-r--r--libc/configure.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/libc/configure.in b/libc/configure.in
index e6cf65a87..1a1921c77 100644
--- a/libc/configure.in
+++ b/libc/configure.in
@@ -254,6 +254,35 @@ AC_ARG_ENABLE([all-warnings],
[])
AC_SUBST(all_warnings)
+AC_ARG_WITH([decimal-float],
+ AC_HELP_STRING([--decimal-float],
+ [enable support for decimal floating point.]),
+ [usedfp=$withval],
+ [usedfp=yes])
+if test "$usedfp" != no; then
+# Check to make sure the compiler supports decimal floating point.
+AC_CACHE_CHECK(for decimal-float-support in compiler,
+ libc_cv_cc_with_decimal_float, [
+ cat > conftest.c <<EOF
+int main (void) { _Decimal32 d32; d32 = 1.0D; return 0; }
+EOF
+ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
+ conftest.c -v 2>&1 >/dev/null | grep -q " --enable-decimal-float ";
+then
+ libc_cv_cc_with_decimal_float=yes
+ else
+ libc_cv_cc_with_decimal_float=no
+ fi
+ rm -f conftest*])
+AC_SUBST(libc_cv_cc_with_decimal_float)
+if test $libc_cv_cc_with_decimal_float = yes; then
+ cat >> confdefs.h <<\EOF
+#define __STDC_DEC_FP__ 200704L
+EOF
+fi
+fi
+
+
AC_CANONICAL_HOST
# The way shlib-versions is used to generate soversions.mk uses a