From 9e6e39c3512f7a962c44dc3729c98a0f8be90341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Wed, 8 Apr 2020 13:28:13 +0900 Subject: Merge pull request #2991 from shyouhei/ruby.h Split ruby.h --- tool/m4/ruby_try_cxxflags.m4 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tool/m4/ruby_try_cxxflags.m4 (limited to 'tool/m4') diff --git a/tool/m4/ruby_try_cxxflags.m4 b/tool/m4/ruby_try_cxxflags.m4 new file mode 100644 index 0000000000..5f84140670 --- /dev/null +++ b/tool/m4/ruby_try_cxxflags.m4 @@ -0,0 +1,17 @@ +# -*- Autoconf -*- +AC_DEFUN([RUBY_TRY_CXXFLAGS], [ + save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="[$]CXXFLAGS $1" + AC_MSG_CHECKING([whether ]$1[ is accepted as CXXFLAGS]) + RUBY_WERROR_FLAG([ + AC_LANG_PUSH([C++]) + AC_TRY_LINK([$4], [$5], + [$2 + AC_MSG_RESULT(yes)], + [$3 + AC_MSG_RESULT(no)]) + ]) + AC_LANG_POP([C++]) + CXXFLAGS="$save_CXXFLAGS" + save_CXXFLAGS= +])dnl -- cgit v1.2.1