mirror of
git://git.sv.gnu.org/autoconf
synced 2025-03-07 14:26:52 +08:00
improve AC_PROG_CC and AC_PROG_CXX
This commit is contained in:
parent
10cd1172b4
commit
4cb653bd0d
@ -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>
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user