diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-01-23 00:37:55 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-01-23 01:02:11 +0900 |
commit | 355bc371962e57f5e4b5365a2db752cbb8d673ee (patch) | |
tree | 4f0a4d53e959ed83768a30a52c80419064ac4c71 | |
parent | ad150a14598980095260add74474498a642ab5ba (diff) | |
download | ruby-355bc371962e57f5e4b5365a2db752cbb8d673ee.tar.gz |
Reuse the default `AC_LANG_PROGRAM(C)` definition
-rw-r--r-- | tool/m4/ruby_try_cflags.m4 | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tool/m4/ruby_try_cflags.m4 b/tool/m4/ruby_try_cflags.m4 index 228fe65245..672f4f8e51 100644 --- a/tool/m4/ruby_try_cflags.m4 +++ b/tool/m4/ruby_try_cflags.m4 @@ -3,15 +3,7 @@ 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; -}]) +m4_defun([AC_LANG_PROGRAM(C)], m4_bpatsubst(m4_defn([AC_LANG_PROGRAM(C)]), [main ()], [main (void)])) ])dnl dnl AC_DEFUN([RUBY_TRY_CFLAGS], [ |