diff --git a/configure.in b/configure.in index c58d4f3cf9..f2c59de38d 100644 --- a/configure.in +++ b/configure.in @@ -53,6 +53,18 @@ AC_LANG_C # Checks for programs. AC_PROG_CC AC_PROG_CXX + +#check if the g++ compiler works +AC_CACHE_CHECK([whether the C++ compiler works], [ac_cv_sys_cxx_works], [ + AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([int main() { }], [ac_cv_sys_cxx_works=yes], + [ac_cv_sys_cxx_works=no]) + AC_LANG_POP([C++]) + ]) +[ if [ "x$ac_cv_sys_cxx_works" = "xno" ]; then ] + AC_MSG_FAILURE([The C++ compiler does not work. Please (re)install the C++ compiler]) +[ fi ] + AC_PROG_AWK AC_PROG_MAKE_SET AC_PROG_INSTALL