On 10/04/2012 12:41 AM, Václav Zeman wrote:
Does attached patch work for you?
Following up on this old thread, I applied the attached. In practice I expect this doesn't matter much, as people configure with CC=clang when they want clang. But we should at least fall back on clang if other C or C++ or ObjC compilers do not work.
From 5915a37c68ce43137d538246e30e47a2cb92b3b9 Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Tue, 15 Mar 2016 09:34:11 -0700 Subject: [PATCH] Also try clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem reported by Václav Zeman in: http://lists.gnu.org/archive/html/autoconf/2012-10/msg00000.html * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_OBJC): Also try clang. (AC_PROG_CXX): Also try clang++. These are at the end of the existing lists, to avoid compatibility issues in older installations. --- lib/autoconf/c.m4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 933955f..9a9fbd3 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -457,6 +457,9 @@ fi if test -z "$CC"; then AC_CHECK_TOOLS(CC, cl.exe) fi +if test -z "$CC"; then + AC_CHECK_TOOL(CC, clang) +fi ]) test -z "$CC" && AC_MSG_FAILURE([no acceptable C compiler found in \$PATH]) @@ -704,7 +707,7 @@ if test -z "$CXX"; then else AC_CHECK_TOOLS(CXX, [m4_default([$1], - [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC])], + [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++])], g++) fi fi @@ -883,7 +886,7 @@ _AC_ARG_VAR_LIBS()dnl _AC_ARG_VAR_CPPFLAGS()dnl _AC_ARG_VAR_PRECIOUS([OBJC])dnl AC_CHECK_TOOLS(OBJC, - [m4_default([$1], [gcc objcc objc cc CC])], + [m4_default([$1], [gcc objcc objc cc CC clang])], gcc) # Provide some information about the compiler. _AS_ECHO_LOG([checking for _AC_LANG compiler version]) -- 2.5.0
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf