From 50b18e81295ad2d45975e4d8ea1e0c7e85140b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Thu, 3 Sep 2020 15:06:56 +0900 Subject: configure: detect that there is no g++ AC_PROG_CXX checks for several C++ compilers INCLUDING g++. When none of them were found it sets the CXX variable to be g++. This doesn't make any sense. Absense of g++ has already been made sure. Because we don't want insanity (that's the whole reason we test the environment using autoconf), we need to swipe such insane variable out. --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index e4a7542663..cbfce070e9 100644 --- a/configure.ac +++ b/configure.ac @@ -197,6 +197,14 @@ AC_CHECK_TOOLS([STRIP], [gstrip strip], [:]) AS_IF([test ! $rb_test_CFLAGS], [AS_UNSET(CFLAGS)]); AS_UNSET(rb_test_CFLAGS) AS_IF([test ! $rb_test_CXXFLAGS], [AS_UNSET(CXXFLAGS)]); AS_UNSET(rb_save_CXXFLAGS) +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) +]) + test x"$target_alias" = x && target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'` ac_install_sh='' # unusable for extension libraries. -- cgit v1.2.3