diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-04-08 13:28:13 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-08 13:28:13 +0900 |
commit | 9e6e39c3512f7a962c44dc3729c98a0f8be90341 (patch) | |
tree | 901a22676d54d78240e450b64a8cd06eb1703910 /tool | |
parent | 5ac4bf2cd87e1eb5779ca5ae7f96a1a22e8436d9 (diff) | |
download | ruby-9e6e39c3512f7a962c44dc3729c98a0f8be90341.tar.gz |
Merge pull request #2991 from shyouhei/ruby.h
Split ruby.h
Diffstat (limited to 'tool')
-rw-r--r-- | tool/m4/ruby_try_cxxflags.m4 | 17 |
1 files changed, 17 insertions, 0 deletions
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 |