Discussion:
[SCM] GNU Autoconf source repository branch, master, updated. v2.69-63-gce48964
Stefano Lattarini
2013-01-11 10:22:46 UTC
Permalink
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=ce48964f646970abd69061590b1b82454780e3e5

The branch, master has been updated
via ce48964f646970abd69061590b1b82454780e3e5 (commit)
from ddd0bfbb0629bcb8c7f698435aa93b070df3b69e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ce48964f646970abd69061590b1b82454780e3e5
Author: Stefano Lattarini <***@gmail.com>
Date: Thu Jan 10 15:14:24 2013 +0100

AC_PROG_CC: also check whether $CC supports "-c -o" together

This is for Automake and its 'subdir-object' mode (see automake bug#13378,
in particular <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#73>), so
we make the new behavior available only if the special witness macro
'_AM_PROG_CC_C_O_HELPME' is defined (future Automake versions will define
it). We might decide, at a later date, to make this behaviour public;
but then we'll have to discuss its usefulness and design more in depth,
and if they are agreed upon, adjust the documentation to match, and also
decide what to do with the macro AC_PROG_CC_C_O, with its similar (but
slightly incompatible) semantics; since doing so right now would bring us
off-track (and Automake needs this change *today*, or better, yesterday),
we proceed with this simpler hack.

* lib/autoconf/c.m4 (AC_PROG_CC): Adjust.

Signed-off-by: Stefano Lattarini <***@gmail.com>

-----------------------------------------------------------------------

Summary of changes:
lib/autoconf/c.m4 | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index 990c32a..affd765 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -490,7 +490,31 @@ _AC_PROG_CC_C11([ac_prog_cc_stdc=c11
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89],
[ac_prog_cc_stdc=no
ac_cv_prog_cc_stdc=no])])])
-dnl
+dnl This is a hook for Automake and its 'subdir-objects' mode, which
+dnl needs to know whether $CC supports "-c -o" together or not. See
+dnl automake bug#13378, in particular <http://debbugs.gnu.org/13378#73>.
+dnl FIXME: there is some code duplication with AC_PROG_CC_C_O here.
+m4_ifdef([_AM_PROG_CC_C_O_HELPME],
+[set dummy $CC; ac_cc=`AS_ECHO(["$[2]"]) | \
+ sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'`
+AC_MSG_CHECKING([whether $CC understands -c and -o together])
+AC_CACHE_VAL([ac_cv_prog_cc_${ac_cc}_c_o],
+[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&AS_MESSAGE_LOG_FD'
+rm -f conftest2.*
+if _AC_DO_VAR(ac_try) && test -f conftest2.$ac_objext
+then
+ AC_MSG_RESULT([yes])
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+else
+ AC_MSG_RESULT([no])
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+])])dnl
AC_LANG_POP(C)dnl
])# AC_PROG_CC



hooks/post-receive
--
GNU Autoconf source repository
Loading...