Skip to content

Commit

Permalink
configure.ac: avoid squashing CXX=g++
Browse files Browse the repository at this point in the history
We are discussing this issue at [Bug #17337] but in the meantime, leave
this questionable autoconf glitch as-is to save sassc and eventmachine.
  • Loading branch information
shyouhei committed Dec 15, 2020
1 parent 8558d5e commit ccc828f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down Expand Up @@ -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++)
Expand Down

0 comments on commit ccc828f

Please sign in to comment.