From ccc828f49956424b2548e32cb3bc3a78e16e207b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Tue, 15 Dec 2020 16:57:28 +0900 Subject: [PATCH] configure.ac: avoid squashing CXX=g++ We are discussing this issue at [Bug #17337] but in the meantime, leave this questionable autoconf glitch as-is to save sassc and eventmachine. --- configure.ac | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index dbcf7c0cee..dbd08321bd 100644 --- a/configure.ac +++ b/configure.ac @@ -194,8 +194,7 @@ AS_IF([test "${CXX}" = "g++" -a -z "${GXX}"], [ # AC_PROG_CXX sets $CXX to "g++" when it purposefully finds that there is # _no_ g++. This brain-damaged design must be worked around. Thankfully, # similar thing doesn't happen for AC_PROG_CC. - AC_MSG_NOTICE([C++ features disabled due to lack of a C++ compiler.]) - AS_UNSET(CXX) + rb_there_is_in_fact_no_gplusplus_but_autoconf_is_cheating_us=true ]) test x"$target_alias" = x && @@ -1134,7 +1133,10 @@ main() [ LIBS="-lm $LIBS"]) : ${ORIG_LIBS=$LIBS} -AS_IF([test -n "${CXX}"], [ +AS_IF([test -n "${rb_there_is_in_fact_no_gplusplus_but_autoconf_is_cheating_us}"], [ + AC_MSG_NOTICE([Test skipped due to lack of a C++ compiler.]) +], +[test -n "${CXX}"], [ RUBY_WERROR_FLAG([ AC_MSG_CHECKING([whether CXXFLAGS is valid]) AC_LANG_PUSH(C++)