From 739cdc82b5325402231f3f5e1a38f681fcbd1db2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2016 09:34:11 -0700 Subject: [PATCH] Also try clang MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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 933955f1..9a9fbd3b 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.11.4.GIT