GNOME Bugzilla – Bug 684758
anjuta-3.5.91 fails to configure due to ac_ct_CXX check
Last modified: 2012-10-21 15:15:15 UTC
Created attachment 225124 [details] config.log showing the failure On my system, anjuta-3.5.91 fails to configure when detecting the system C++ compiler: checking for x86_64-pc-linux-gnu-g++... x86_64-pc-linux-gnu-g++ checking whether we are using the GNU C++ compiler... yes checking whether x86_64-pc-linux-gnu-g++ accepts -g... yes checking dependency style of x86_64-pc-linux-gnu-g++... none configure: error: C++ Compiler required to compile Anjuta This is due to incorrectly using the AC_PROG_CXX macro. According to autoconf documentation[1], AC_PROG_CXX sets CXX to the C++ compiler. Anjuta's configure script instead checks for ac_ct_CXX, which is not guaranteed to be set. [1] http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/C_002b_002b-Compiler.html
Created attachment 225125 [details] [review] proposed patch
Thanks for reporting this bug. This is already fixed in the master version.
Sorry, I have commented the wrong bug this one is not fixed.
(In reply to comment #0) > This is due to incorrectly using the AC_PROG_CXX macro. According to autoconf > documentation[1], AC_PROG_CXX sets CXX to the C++ compiler. Anjuta's configure > script instead checks for ac_ct_CXX, which is not guaranteed to be set. Indeed ac_ct_CXX is an internal variable set by autoconf which shouldn't be used. But checking CXX is not completely right neither because it is set by default to g++ when no C++ compiler is found. I imagine that the use of ac_ct_CXX was done to avoid this issue with CXX.
Review of attachment 225125 [details] [review]: I think the goal of checking ac_ct_CXX is to check if a C++ compiler is really here. The AC_PROG_CXX set CXX to g++ by default, even if a C++ compiler is not found.
Thanks for your patch but I have not committed it because it doesn't really check if a C++ compiler is present. Anyway, I have replaced the check of ac_ct_CXX which is indeed an internal variable by the use of AC_LINK_IFELSE. Please reopen the bug if it doesn't solve the issue on your system.
*** Bug 686578 has been marked as a duplicate of this bug. ***