summaryrefslogtreecommitdiff
path: root/tool/m4/ruby_try_cflags.m4
blob: f2c6a3094e92fee3615ad1e32138779d34536502 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
dnl -*- Autoconf -*-
AC_DEFUN([RUBY_TRY_CFLAGS], [
    AC_MSG_CHECKING([whether ]$1[ is accepted as CFLAGS])
    RUBY_WERROR_FLAG([
    CFLAGS="[$]CFLAGS $1"
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$4]], [[$5]])],
	[$2
	AC_MSG_RESULT(yes)],
	[$3
	AC_MSG_RESULT(no)])
    ])
])dnl