Hi all, This bug is similar to <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21336>, "configure fails to detect C++ compiler on case-insensitive FS", from 2015.
Automake 1.18.1 has this clever code in its configure.ac: # On case-insensitive file systems (seen e.g. on Cygwin and Mac OS X) # we must avoid looking for 'CC', because that would be the same as # 'cc', and could cause $CXX to point to the C compiler, instead of # to a C++ compiler as expected (see automake bugs #11893 and #10766). # Similarly, we must avoid looking for 'RCC', as that can point to the # Qt4 "Resource Compiler": <http://doc.qt.digia.com/4.2/rcc.html> # And we avoid looking for 'KCC' as that can be a kerberos tool under # macOS systems. if test -f /bIn/rMdIr || test -f /uSr/bIn/rMdIr; then # Case-insensitive file system, don't look for CC. am_CC= am_RCC= am_KCC= else am_CC=CC am_RCC=RCC am_KCC=KCC fi # The list of C++ compilers here has been copied, pasted and edited # from 'lib/autoconf/c.m4:AC_PROG_CXX' in the Autoconf distribution. # Keep it in sync, or better again, find out a way to avoid this code # duplication. _AM_COMPILER_CAN_FAIL([AC_PROG_CXX(dnl [aCC $am_CC FCC $am_KCC $am_RCC xlC_r xlC c++ cxx cc++ gpp g++ clang++])], [CXX=false; _AM_SKIP_COMP_TESTS([C++])]) The current development branch of automake (cf8b90f6) has this in its c.m4 when defining AC_PROG_CXX: AC_CHECK_TOOLS(CXX, [m4_default([$1], [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++])], g++) One can note that the two lists are clearly not in sync, and that autoconf doesn't have the same defense against name clashes as automake. On my Windows system, it finds CC as a case-insensitive alternative name to cc. This is a C compiler, so AC_PROG_CXX fails (in my case I'd like it to find cl.exe). Note that Automake explicitly avoids looking for MSVC here and directs to <https://lists.gnu.org/archive/html/automake-patches/2012-01/msg00130.html> for explanations. I suggest Autoconf applies the same defense mechanism as Automake against case-insensitive filesystems, and that both tools sync their list of known compilers. Cheers, -- Antonin
