summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Bowler <nbowler@elliptictech.com>2013-05-11 11:45:16 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-05-11 11:54:21 +0200
commitc148dc73a92c1df5e70a61e9495e62c010090bd4 (patch)
tree12bb1d737adce38e1282690f3ae8abc8749f4a77
parent32eb770b73903a6b09216709790a093b33afff8d (diff)
downloadautomake-c148dc73a92c1df5e70a61e9495e62c010090bd4.tar.gz
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 <stefano.lattarini@gmail.com>
-rw-r--r--m4/minuso.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/m4/minuso.m4 b/m4/minuso.m4
index 984427cfc..06f74c906 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