dnl GEANY_PROG_CXX
dnl Check for a working C++ compiler.
dnl like AC_PROG_CXX, but makes sure the compiler actually works instead of
dnl falling back on a reasonable default only.
dnl
dnl You must call AC_PROG_CXX yourself before this macro.
AC_DEFUN([GEANY_PROG_CXX],
[
AC_REQUIRE([AC_PROG_CXX])
AC_LANG_PUSH([C++])
AC_MSG_CHECKING([whether the C++ compiler works])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[class Test {public: static int main() {return 0;}};]],
[[Test::main();]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([The C++ compiler $CXX does not work. Please install a working C++ compiler or define CXX to the appropriate value.])])
AC_LANG_POP([C++])
])
-
Colomban Wendling yazdı
This is more reliable than using `which`, which doesn't work if the CXX environment variable is set to something else than an executable (e.g contains options), and is apparently less portable on some systems. See: * http://lists.geany.org/pipermail/devel/2009-September/001367.html, which lead to 5bb28825. * https://sourceforge.net/p/geany/bugs/455/, which lead to a revert of the above, 5b9605a9. Fixes #829.
e3f7d256