From 55e09d5e8c1e9cd7d54952af706341ae45a67e3a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 20 Jan 2022 22:47:47 -0500 Subject: 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. --- newlib/configure.ac | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) (limited to 'newlib/configure.ac') 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 < -#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 -- cgit v1.2.3