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.
This commit is contained in:
卜部昌平 2020-08-21 23:53:05 +09:00
parent 954afd1bc5
commit 914b2208ab
Notes: git 2020-08-22 00:46:03 +09:00

View File

@ -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 <cstdio>], [], [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