From 4a9f899b5cbd497861e59634e3a94731677bba03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 26 Apr 2022 15:27:10 +0200 Subject: [PATCH] Fix the cached value of ac_cv_c_compiler_gnu There was an error in AX_PROG_CC_FOR_BUILD macro that cached literal name of the cache variable `saved_ac_cv_c_compiler_gnu` instead of the value of said variable breaking the consecutive runs of ./configure script with caching enabled. --- m4/ax_prog_cc_for_build.m4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/m4/ax_prog_cc_for_build.m4 b/m4/ax_prog_cc_for_build.m4 index efb80d40c4..5168ae4847 100644 --- a/m4/ax_prog_cc_for_build.m4 +++ b/m4/ax_prog_cc_for_build.m4 @@ -91,16 +91,16 @@ AC_LANG_PUSH([C]) dnl The pushdef([ac_cv_c_compiler_gnu], ...) currently does not cover dnl the use of this variable in _AC_LANG_COMPILER_GNU called by dnl AC_PROG_CC. Unset this cache variable temporarily as a workaround. -was_set_ac_cv_c_compiler_gnu=${[ac_cv_c_compiler_gnu]+y} -AS_IF([test ${was_set_ac_cv_c_compiler_gnu}], - [saved_ac_cv_c_compiler_gnu=$[ac_cv_c_compiler_gnu] +was_set_c_compiler_gnu=${[ac_cv_c_compiler_gnu]+y} +AS_IF([test ${was_set_c_compiler_gnu}], + [saved_c_compiler_gnu=$[ac_cv_c_compiler_gnu] AS_UNSET([[ac_cv_c_compiler_gnu]])]) AC_PROG_CC dnl Restore ac_cv_c_compiler_gnu -AS_IF([test ${was_set_ac_cv_c_compiler_gnu}], - [[ac_cv_c_compiler_gnu]=saved_ac_cv_c_compiler_gnu]) +AS_IF([test ${was_set_c_compiler_gnu}], + [[ac_cv_c_compiler_gnu]=$[saved_c_compiler_gnu]]) _AC_COMPILER_EXEEXT _AC_COMPILER_OBJEXT