Kaydet (Commit) 42c02db1 authored tarafından Colomban Wendling's avatar Colomban Wendling

Merge pull request #1155 from b4n/cxx-check

Test whether the C++ compiler works by compiling a test program
...@@ -30,11 +30,7 @@ AC_PROG_CC_C99 ...@@ -30,11 +30,7 @@ AC_PROG_CC_C99
AM_PROG_CC_C_O AM_PROG_CC_C_O
AC_PROG_CXX AC_PROG_CXX
# check for C++ compiler explicitly and fail if none is found, do this check GEANY_PROG_CXX
# after AC_PROG_CXX has set the CXX environment variable
if ! which $CXX >/dev/null 2>&1; then
AC_MSG_ERROR([No C++ compiler found. Please install a C++ compiler.])
fi
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
......
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++])
])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment