]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Also try clang
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 15 Mar 2016 16:34:11 +0000 (09:34 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 15 Mar 2016 16:34:34 +0000 (09:34 -0700)
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

index 933955f17015916da6b5b69678368c7da99c4740..9a9fbd3b219cd89d3102fa7e777ebc4a617ed470 100644 (file)
@@ -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])