Hello,

On Fri, Feb 11, 2005 at 07:17:55AM +0000, James Youngman wrote:
> IIRC, "cl" is the Microsoft C compiler, and so to avoid conflict with
> Allegro Common Lisp's "cl" command, we could just invoke it as
> "CL.EXE" instead.  That is, unless Microsoft port their compiler to a
> non-Windows platform.

I implemented this proposal, and two other fixes, see the attched patch.

Paul, can I commit, at whole or only some parts?

Stepan
2005-02-24  Stepan Kasal  <[EMAIL PROTECTED]>

        * 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'.

Index: lib/autoconf/c.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v
retrieving revision 1.197
diff -u -r1.197 c.m4
--- lib/autoconf/c.m4   23 Feb 2005 23:24:49 -0000      1.197
+++ lib/autoconf/c.m4   24 Feb 2005 08:06:59 -0000
@@ -460,13 +460,19 @@
       [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([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

Reply via email to