Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-01-21 06:47:47 +0300
committerMike Frysinger <vapier@gentoo.org>2022-01-21 15:07:15 +0300
commit55e09d5e8c1e9cd7d54952af706341ae45a67e3a (patch)
tree0ad87bd1d35f0bfd3cb2e505c123cd589618dbb6 /newlib/configure.ac
parent0a67325726577e189c65e7c190f3f9e0874143a6 (diff)
newlib: switch to autoconf long double macro
Now that we require a recent version of autoconf, we can rely on this macro working. This change was already made to libm, but these other dirs were missed as I didn't notice it being duplicated in 3 places.
Diffstat (limited to 'newlib/configure.ac')
-rw-r--r--newlib/configure.ac35
1 files changed, 4 insertions, 31 deletions
diff --git a/newlib/configure.ac b/newlib/configure.ac
index b4d11f5e3..c54d2047a 100644
--- a/newlib/configure.ac
+++ b/newlib/configure.ac
@@ -687,39 +687,12 @@ if test $libc_cv_cc_loop_to_function = yes; then
fi
AC_SUBST(libc_cv_cc_loop_to_function)
-dnl Autoconf 2.59 doesn't support the AC_TYPE_LONG_DOUBLE macro. Instead of:
-dnl AC_TYPE_LONG_DOUBLE
-dnl AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$ac_cv_type_long_double" = x"yes")
-dnl we specify our own long double test.
-dnl Additionally, ac_cv_objext is broken so that AC_COMPILE_IFELSE cannot be
-dnl used, so use AC_TRY_COMMAND instead.
-AC_CACHE_CHECK(whether long double type exists,
- acnewlib_cv_type_long_double, [dnl
-cat > conftest.c <<EOF
-/* Check two ways: float.h defines and direct type declaration. */
-#include <float.h>
-#if defined(LDBL_MANT_DIG)
- #define _HAVE_LONG_DOUBLE
- #else
- #error "LDBL != DBL"
-#endif
-long double test() {
-long double ld = 0.0L;
-return ld;
-}
-EOF
-if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
- 1>&AS_MESSAGE_LOG_FD])
-then
- acnewlib_cv_type_long_double=yes;
-else
- acnewlib_cv_type_long_double=no;
-fi
-rm -f conftest*])
-if test $acnewlib_cv_type_long_double = yes; then
+AC_TYPE_LONG_DOUBLE
+dnl Export the setting for our installed headers to check.
+if test $ac_cv_type_long_double = yes; then
AC_DEFINE(_HAVE_LONG_DOUBLE, 1, [Define if the platform supports long double type.])
fi
-AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$acnewlib_cv_type_long_double" = x"yes")
+AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$ac_cv_type_long_double" = x"yes")
AC_CACHE_CHECK(whether long double equals double,
newlib_cv_ldbl_eq_dbl, [dnl