summaryrefslogtreecommitdiffstats
path: root/newlib/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/configure.in')
-rw-r--r--newlib/configure.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/newlib/configure.in b/newlib/configure.in
index 01ca6a3a3..9ff520100 100644
--- a/newlib/configure.in
+++ b/newlib/configure.in
@@ -395,6 +395,29 @@ if test $libc_cv_initfinit_array = yes; then
AC_DEFINE_UNQUOTED(HAVE_INITFINI_ARRAY)
fi
+AC_CACHE_CHECK(long double equals double,
+ newlib_ldbl_eq_dbl, [dnl
+cat > conftest.c <<EOF
+#include <float.h>
+#if DBL_MANT_DIG == LDBL_MANT_DIG && LDBL_MIN_EXP == DBL_MIN_EXP && \
+ LDBL_MAX_EXP == DBL_MAX_EXP
+ #define _LDBL_EQ_DBL
+ #else
+ #error "LDBL != DBL"
+#endif
+EOF
+if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
+ -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
+then
+ newlib_ldbl_eq_dbl=yes;
+else
+ newlib_ldbl_eq_dbl=no;
+fi
+rm -f conftest*])
+if test $newlib_ldbl_eq_dbl = yes; then
+ AC_DEFINE_UNQUOTED(_LDBL_EQ_DBL)
+fi
+
AC_CONFIG_FILES([Makefile],
[if test -n "$CONFIG_FILES"; then
unset ac_file