summaryrefslogtreecommitdiff
path: root/tool/m4/ruby_try_cflags.m4
diff options
context:
space:
mode:
Diffstat (limited to 'tool/m4/ruby_try_cflags.m4')
-rw-r--r--tool/m4/ruby_try_cflags.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/tool/m4/ruby_try_cflags.m4 b/tool/m4/ruby_try_cflags.m4
index f2c6a3094e..228fe65245 100644
--- a/tool/m4/ruby_try_cflags.m4
+++ b/tool/m4/ruby_try_cflags.m4
@@ -1,4 +1,19 @@
dnl -*- Autoconf -*-
+dnl
+dnl Autoconf 2.67 fails to detect `-Werror=old-style-definition` due
+dnl to the old style definition of `main`.
+m4_version_prereq([2.70], [], [
+m4_define([AC_LANG_PROGRAM(C)],
+[$1
+int
+main (void)
+{
+$2
+ ;
+ return 0;
+}])
+])dnl
+dnl
AC_DEFUN([RUBY_TRY_CFLAGS], [
AC_MSG_CHECKING([whether ]$1[ is accepted as CFLAGS])
RUBY_WERROR_FLAG([