From 355bc371962e57f5e4b5365a2db752cbb8d673ee Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 23 Jan 2022 00:37:55 +0900 Subject: Reuse the default `AC_LANG_PROGRAM(C)` definition --- tool/m4/ruby_try_cflags.m4 | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'tool/m4') 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], [ -- cgit v1.2.3