]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
improve AC_PROG_CC and AC_PROG_CXX
authorStepan Kasal <kasal@ucw.cz>
Fri, 25 Feb 2005 08:52:48 +0000 (08:52 +0000)
committerStepan Kasal <kasal@ucw.cz>
Fri, 25 Feb 2005 08:52:48 +0000 (08:52 +0000)
ChangeLog
lib/autoconf/c.m4

index d2f3c8d7a577d11f30890c0166719900999b5535..81309c976b5fe5367ff6c4dd6575b9316ca4b2e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-02-24  Stepan Kasal  <kasal@ucw.cz>
+
+       * lib/autoconf/c.m4 (AC_PROG_CC): Be more careful to skip
+         `/usr/ucb/cc'; use `cl.exe' to distinguish the MS compiler
+         from a Common Lisp's `cl'.
+       (AC_PROG_CXX): Behave according to the documentation: don't
+         search for $ac_tool_prefix$CCC and $CCC, just set CXX=$CCC;
+         make the variable CCC precious; use `cl.exe', not `cl'.
+
 2005-02-23  Paul Eggert  <eggert@cs.ucla.edu>
            Alexandre Duret-Lutz  <adl@gnu.org>
 
index 52f31c36a31df17cece4d580f0c0a3116aee58c6..b72710fe9af5f1b5d89784f99ae8ab0b6e6c02d5 100644 (file)
@@ -460,13 +460,19 @@ m4_ifval([$1],
       [AC_CHECK_TOOLS(CC, [$1])],
 [AC_CHECK_TOOL(CC, gcc)
 if test -z "$CC"; then
-  AC_CHECK_TOOL(CC, cc)
+  dnl Here we want:
+  dnl  AC_CHECK_TOOL(CC, cc)
+  dnl but without the check for a tool without the prefix.
+  dnl Until the check is removed from there, copy the code:
+  if test -n "$ac_tool_prefix"; then
+    AC_CHECK_PROG(CC, [${ac_tool_prefix}cc], [${ac_tool_prefix}cc])
+  fi
 fi
 if test -z "$CC"; then
   AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
 fi
 if test -z "$CC"; then
-  AC_CHECK_TOOLS(CC, cl)
+  AC_CHECK_TOOLS(CC, cl.exe)
 fi
 ])
 
@@ -696,11 +702,17 @@ AC_ARG_VAR([CXX],      [C++ compiler command])dnl
 AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])dnl
 _AC_ARG_VAR_LDFLAGS()dnl
 _AC_ARG_VAR_CPPFLAGS()dnl
-AC_CHECK_TOOLS(CXX,
-              [$CCC m4_default([$1],
-                         [g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC])],
-              g++)
-
+_AC_ARG_VAR_PRECIOUS([CCC])dnl
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    AC_CHECK_TOOLS(CXX,
+                  [m4_default([$1],
+                              [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC])],
+                  g++)
+  fi
+fi
 # Provide some information about the compiler.
 echo "$as_me:$LINENO:" \
      "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD