If AM_PROG_CC_C_O is expanded multiple times, and the compiler does not support -c and -o together, each expansion of the macro will prepend the compile script to CC. This can result in the compile script invoking the compile script, which at best pointless and silly. Fortunately, there does not appear to be any serious problems as the first compile invocation strips out -o options, causing subsequent invocations of the script to merely exec their arguments.
Other than fixing the above, this should not normally cause any changes to the resulting configure script, except in the (hopefully rare) case where AM_PROG_CC_C_O is directly expanded (i.e., *not* using AC_REQUIRE) in the body of a macro defined with AC_DEFUN. In that case, the use of AC_DEFUN_ONCE may cause the expansion of AM_PROG_CC_C_O to appear earlier in the configure script. * m4/minuso.m4: Change the definition of AM_PROG_CC_C_O to AC_DEFUN_ONCE, avoiding problems caused by multiple expansions. --- m4/minuso.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/minuso.m4 b/m4/minuso.m4 index 984427c..06f74c9 100644 --- a/m4/minuso.m4 +++ b/m4/minuso.m4 @@ -8,7 +8,7 @@ # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl -- 1.8.1