>From aeffd904b8d7ae9190dfe19c88ac944f2bf99324 Mon Sep 17 00:00:00 2001
From: Jannick <thirdedition@gmx.net>
Date: Sat, 14 Mar 2020 13:50:09 +0100
Subject: [PATCH] _AC_LANG_COMPILER_GNU: bug fix for cases when result variable
 is cached

All macros calling _AC_LANG_COMPILER_GNU rely on `ac_compiler_gnu', but
not on the expansion of `ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu'.  So
`ac_compiler_gnu' should be set, too, in cases when
`ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu' is cached.

Alternative to this patch:  Replace `ac_compiler_gnu' in all code snips
which follow the call of _AC_LANG_COMPILER_GNU such as

if test $ac_compiler_gnu = yes; then
  GCC=yes
else
  GCC=
fi

by the expansion of `ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu'.


* lib/autoconf/lang.m4: propagate `ac_compiler_gnu' to calling macro,
   regardless if `ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu' is cached or
   not.
---
 lib/autoconf/lang.m4 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4
index 48cf5950..f6ca621f 100644
--- a/lib/autoconf/lang.m4
+++ b/lib/autoconf/lang.m4
@@ -353,7 +353,11 @@ m4_define([_AC_LANG_COMPILER_GNU],
 		   [ac_compiler_gnu=yes],
 		   [ac_compiler_gnu=no])
 ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu=$ac_compiler_gnu
-])])# _AC_LANG_COMPILER_GNU
+])
+dnl Make ac_compiler_gnu available to calling macro, regardless
+dnl if ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu is cached or not.
+ac_compiler_gnu=$ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu
+])# _AC_LANG_COMPILER_GNU
 
 
 # AC_LANG_PREPROC
-- 
2.25.1.windows.1

