_AC_INCLUDES_DEFAULT_REQUIREMENTS including <stdio.h> when checking for
stdint.h has prevented proper detection of whether stdint.h is present,
since it'd poison the cache variables with test results failing due to
<stdio.h> failing to include. As a solution, for autoconf versions under
2.70, we filter out that bit of code from ac_includes_default.

This issue was fixed in autoconf-2.70.
This also applies to various other headers, but was noticed when looking
into why HAVE_STDINT_H was misdefined.

libstdc++-v3/ChangeLog:

        * configure.ac: Remove any lines that unconditionally include
        <stdio.h> from ac_includes_default, when running Autoconf <2.70.
        * configure: Regenerate.

Signed-off-by: Arsen Arsenović <ar...@aarsen.me>
---
 libstdc++-v3/configure.ac | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index b351622bf46..c05fcdda7e9 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -58,6 +58,15 @@ else
   GLIBCXX_IS_NATIVE=true
 fi
 
+# In the case that we're building without headers, we won't have <stdio.h>
+# available. In these cases, we have to instruct autotools to never include
+# <stdio.h> as a part of default headers.
+m4_version_prereq([2.70], [], [
+if test "x$with_headers" = "xno"; then
+  ac_includes_default=`echo "$ac_includes_default" | sed '/^#include 
<stdio.h>$/d'`
+fi
+])
+
 # Sets up automake.  Must come after AC_CANONICAL_SYSTEM.  Each of the
 # following is magically included in AUTOMAKE_OPTIONS in each Makefile.am.
 #  1.x:  minimum required version
-- 
2.37.3

Reply via email to