summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-08-21 23:53:05 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-08-22 00:45:39 +0900
commit914b2208ab3eddec478cdc3e079e6c30d0f0892c (patch)
treefa27ca5b36bde65a9745bea5150cb5c54d76ca35 /configure.ac
parent954afd1bc55b9b98e4e5099e3c49c3710514fdb8 (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3440
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
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 <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