From 914b2208ab3eddec478cdc3e079e6c30d0f0892c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Fri, 21 Aug 2020 23:53:05 +0900 Subject: configure.ac: rule out old Sun C++ CI failures observed for old Sun C++. We don't want to hustle, as newer versions are okay. Just check the sanity and rule out insane compilers. --- configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index df14655627..ee4b214486 100644 --- a/configure.ac +++ b/configure.ac @@ -1115,6 +1115,20 @@ main() [ LIBS="-lm $LIBS"]) : ${ORIG_LIBS=$LIBS} +AS_IF([test -n "${CXX}"], [ + RUBY_WERROR_FLAG([ + AC_MSG_CHECKING([whether CXXFLAGS is valid]) + AC_LANG_PUSH(C++) + AC_TRY_COMPILE([@%:@include ], [], [AC_MSG_RESULT(yes)], [ + AC_MSG_RESULT(no) + # The message mentions CXXFLAGS, but CPPFLAGS might also affects. + AC_MSG_WARN([something wrong with CXXFLAGS="$CXXFLAGS"]) + CXX=false + ]) + AC_LANG_POP(C++) + ]) +]) + AC_CHECK_LIB(crypt, crypt) # glibc (GNU/Linux, GNU/Hurd, GNU/kFreeBSD) AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX -- cgit v1.2.3