summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2022-04-26 22:05:13 +0200
committerGitHub <noreply@github.com>2022-04-26 22:05:13 +0200
commita2d291eee36723e99235e837562b1047edd41977 (patch)
tree90755e8e1c9bf707dac1301eba7c4bae43773f26
parent191867ec96ef94dc8adddaaf475b760c4a363325 (diff)
parent13018ae91007cfa1b1a3877db8ef5cb233af1ae6 (diff)
downloadautoconf-archive-a2d291eee36723e99235e837562b1047edd41977.tar.gz
Merge pull request #252 from oerdnj/fix-ax_prog_cc_for_build-with-cache-file
ax_prog_cc_for_build: Properly restore ac_cv_c_compiler_gnu
-rw-r--r--m4/ax_prog_cc_for_build.m412
1 files changed, 6 insertions, 6 deletions
diff --git a/m4/ax_prog_cc_for_build.m4 b/m4/ax_prog_cc_for_build.m4
index f6518db..1db8d73 100644
--- a/m4/ax_prog_cc_for_build.m4
+++ b/m4/ax_prog_cc_for_build.m4
@@ -32,7 +32,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 20
+#serial 21
AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
@@ -89,16 +89,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