diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-01-20 22:47:47 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-01-21 07:07:15 -0500 |
commit | 55e09d5e8c1e9cd7d54952af706341ae45a67e3a (patch) | |
tree | 0ad87bd1d35f0bfd3cb2e505c123cd589618dbb6 /newlib/configure.ac | |
parent | 0a67325726577e189c65e7c190f3f9e0874143a6 (diff) | |
download | newlib-55e09d5e8c1e9cd7d54952af706341ae45a67e3a.zip newlib-55e09d5e8c1e9cd7d54952af706341ae45a67e3a.tar.gz newlib-55e09d5e8c1e9cd7d54952af706341ae45a67e3a.tar.bz2 |
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.ac | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/newlib/configure.ac b/newlib/configure.ac index b4d11f5..c54d204 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 |