[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_PROG_CXX does not work correctly after AC_PROG_CC
From: |
Laurynas Biveinis |
Subject: |
AC_PROG_CXX does not work correctly after AC_PROG_CC |
Date: |
Wed, 17 Apr 2002 14:58:58 +0100 |
Hello,
Suppose that you have a system with GCC but no G++ compiler. Then the
following configure script:
--
AC_INIT(blabla, 0.1)
AC_PROG_CC
AC_PROG_CXX
AC_OUTPUT
--
will produce following output:
--
[...]
checking for gcc... gcc
checking for C compiler default output... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix... .exe
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for g++... no
[...]
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
configure: creating ./config.status
--
and, among others, will substitute CXX and CXXFLAGS variables in
output files. So it does not detect that in fact there is no working
C++ compiler. If I remove AC_PROG_CC in this configure script, then
I get correct error message:
checking for C++ compiler default output... configure: error: C++
compiler cannot create executables
But such a check is missing if there is AC_PROG_CC before AC_PROG_CXX.
I've verified it with DJGPP port of Autoconf 2.50 and Cygwin port of
Autoconf 2.52.
Is there any fix or workaround? Please CC me on replies and TIA ;)
Laurynas
- AC_PROG_CXX does not work correctly after AC_PROG_CC,
Laurynas Biveinis <=