(merge from 3.5) Issue #27453: CPP invocation in configure must use CPPFLAGS.
Patch by Chi Hsuan Yen.
diff --git a/Misc/NEWS b/Misc/NEWS
index 98814c3..9b41b74 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -88,6 +88,9 @@
Build
-----
+- Issue #27453: CPP invocation in configure must use CPPFLAGS. Patch by
+ Chi Hsuan Yen.
+
- Issue #27490: Do not build pgen when cross-compiling. Patch by Thomas
Perl.
diff --git a/configure b/configure
index da98f69..9970a0d 100755
--- a/configure
+++ b/configure
@@ -5370,7 +5370,7 @@
EOF
-if $CPP conftest.c >conftest.out 2>/dev/null; then
+if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
$as_echo "$PLATFORM_TRIPLET" >&6; }
diff --git a/configure.ac b/configure.ac
index 34ce82c..1f3aba0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -870,7 +870,7 @@
EOF
-if $CPP conftest.c >conftest.out 2>/dev/null; then
+if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
AC_MSG_RESULT([$PLATFORM_TRIPLET])
else