From: Paul Eggert Date: Tue, 15 Mar 2016 16:34:11 +0000 (-0700) Subject: Also try clang X-Git-Tag: v2.69b~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=739cdc82b5325402231f3f5e1a38f681fcbd1db2;p=thirdparty%2Fautoconf.git Also try clang 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. --- 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])