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/libc
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/libc')
-rwxr-xr-xnewlib/libc/configure58
-rw-r--r--newlib/libc/configure.ac21
2 files changed, 39 insertions, 40 deletions
diff --git a/newlib/libc/configure b/newlib/libc/configure
index 38eaf7a65..1afafab77 100755
--- a/newlib/libc/configure
+++ b/newlib/libc/configure
@@ -12229,33 +12229,49 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking long double support" >&5
-$as_echo_n "checking Checking long double support... " >&6; }
-if ${acnewlib_cv_type_long_double+:} false; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
+$as_echo_n "checking for long double... " >&6; }
+if ${ac_cv_type_long_double+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat > conftest.c <<EOF
-int main() {
-long double x = 0.0L;
-return 0;
+ if test "$GCC" = yes; then
+ ac_cv_type_long_double=yes
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* The Stardent Vistra knows sizeof (long double), but does
+ not support it. */
+ long double foo = 0.0L;
+int
+main ()
+{
+static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
+ sizeof (double) <= sizeof (long double))];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
}
-EOF
-if { ac_try='${CC} $CFLAGS $CPPFLAGS -c conftest.c 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }
-then
- acnewlib_cv_type_long_double=yes
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_type_long_double=yes
else
- acnewlib_cv_type_long_double=no
+ ac_cv_type_long_double=no
fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acnewlib_cv_type_long_double" >&5
-$as_echo "$acnewlib_cv_type_long_double" >&6; }
- if test x"$acnewlib_cv_type_long_double" = x"yes"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
+$as_echo "$ac_cv_type_long_double" >&6; }
+ if test $ac_cv_type_long_double = yes; then
+
+$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
+
+ fi
+
+ if test x"$ac_cv_type_long_double" = x"yes"; then
HAVE_LONG_DOUBLE_TRUE=
HAVE_LONG_DOUBLE_FALSE='#'
else
diff --git a/newlib/libc/configure.ac b/newlib/libc/configure.ac
index 29a839623..c23282d08 100644
--- a/newlib/libc/configure.ac
+++ b/newlib/libc/configure.ac
@@ -184,25 +184,8 @@ fi
AC_SUBST(LIBC_SYS_LIB)
AC_SUBST(sys_dir)
-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.
-AC_CACHE_CHECK([Checking long double support], [acnewlib_cv_type_long_double],[dnl
-cat > conftest.c <<EOF
-int main() {
-long double x = 0.0L;
-return 0;
-}
-EOF
-if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c 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*])
-AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$acnewlib_cv_type_long_double" = x"yes")
+AC_TYPE_LONG_DOUBLE
+AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$ac_cv_type_long_double" = x"yes")
dnl iconv library will be compiled if --enable-newlib-iconv option is enabled
AM_CONDITIONAL(ENABLE_NEWLIB_ICONV, test x${newlib_iconv} != x)