diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-01-22 19:05:02 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-01-22 20:13:46 +0900 |
commit | ad150a14598980095260add74474498a642ab5ba (patch) | |
tree | 8e55da0b74162d9d0875361784b66a9fc2772e99 /tool/m4 | |
parent | 2c25427496322f420d9acc58500f2855c9e04a2a (diff) |
Override `AC_C_PROGRAM` on old autoconf
Autoconf 2.69 fails to detect `-Werror=old-style-definition` due
to the old style definition of `main`.
Diffstat (limited to 'tool/m4')
-rw-r--r-- | tool/m4/ruby_try_cflags.m4 | 15 |
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([ |