From 1e58dba142c673c59fbb9d10aeecf62217d4fc9c Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sun, 2 Jan 2011 11:24:55 +0100 Subject: configure: use AC_LANG_PROGRAM consistently Avoid warnings from Autoconf 2.68 about missing use of AC_LANG_PROGRAM and friends. Quoting autoconf-2.68/NEWS: ** The macros AC_PREPROC_IFELSE, AC_COMPILE_IFELSE, AC_LINK_IFELSE, and AC_RUN_IFELSE now warn if the first argument failed to use AC_LANG_SOURCE or AC_LANG_PROGRAM to generate the conftest file contents. A new macro AC_LANG_DEFINES_PROVIDED exists if you have a compelling reason why you cannot use AC_LANG_SOURCE but must avoid the warning. The underlying reason for that change is that AC_LANG_{SOURCE,PROGRAM} take care to supply the previously computed set of #defines (and include standard headers if so desired) for preprocessed languages like C and C++. In some cases, AC_LANG_PROGRAM is already used but not sufficiently m4-quoted, so we just need to add another set of [quotes] to prevent the autoconf warning from being triggered bogusly. Quoting all arguments (except when calling special macros that need to be expanded before recursion) is better style, anyway. These and more rules are described in detail in 'info Autoconf "Programming in M4"'. No change in the resulting config.mak.autogen after running ./configure intended. Signed-off-by: Ralf Wildenhues Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- aclocal.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'aclocal.m4') diff --git a/aclocal.m4 b/aclocal.m4 index d399de2671..f11bc7ed7d 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -13,7 +13,7 @@ AC_DEFUN([TYPE_SOCKLEN_T], git_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void; do for t in int size_t unsigned long "unsigned long"; do - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include #include @@ -21,7 +21,7 @@ AC_DEFUN([TYPE_SOCKLEN_T], ],[ $t len; getpeername(0,0,&len); - ],[ + ])],[ git_cv_socklen_t_equiv="$t" break 2 ]) -- cgit v1.2.3