>From c148dc73a92c1df5e70a61e9495e62c010090bd4 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Nick Bowler Date: Sat, 11 May 2013 11:45:16 +0200 Subject: [PATCH 2/2] Use AC_DEFUN_ONCE to define AM_PROG_CC_C_O 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 use AC_DEFUN_ONCE, avoiding problems caused by multiple expansions. Copyright-paperwork-exempt: yes Signed-off-by: Stefano Lattarini --- 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.3.rc0.19.g7e6a0cc