<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40305 >

> [joan.cr...@gmail.com - Sun Jun 22 15:36:48 2008]:
> 
> I can't build version 2.2, because g++ is not installed. The error message
> is:
> 
> ../../../../bootstrap/depcomp: line 470: exec: g++: not found
> make[5]: *** [toluaxx.bind.o] Error 127
> 
> I can install g++, sure, but perhaps autogen.sh should have checked g++'s
> existence before? Right now, autogen doesn't report any problems.
> 
> Joan
> 
> 

Patch attached.

AC_PROG_CXX does not abort when no C++ compiler is found, it just sets
CXX to "g++" in this case. So a separate check is needed.

Index: configure.ac
===================================================================
--- configure.ac	(revision 15567)
+++ configure.ac	(working copy)
@@ -205,6 +205,15 @@
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_CXX
+AC_MSG_CHECKING([whether the C++ compiler works]); 
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE(
+  [AC_LANG_PROGRAM()],
+  AC_MSG_RESULT(yes),
+  AC_MSG_RESULT(no)
+  AC_MSG_FAILURE(no acceptable C++ compiler found in \$PATH)
+)
+AC_LANG_POP([C++])
 AC_PROG_LN_S
 AC_DISABLE_SHARED
 AC_PROG_LIBTOOL
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to