Commit cc907c0f authored by Martin Szulecki's avatar Martin Szulecki

Workaround autoconf bug and ensure a C++ compiler is mandatory

If AC_PROG_CXX is used after AC_PROG_CC, it will return "g++" even if no
C++ compiler is installed. However, as we need one, testing compiling a
program will make configure fail if indeed no C++ compiler is installed.
parent a2c5ec63
......@@ -27,6 +27,16 @@ AC_SUBST(LIBXML2_VERSION)
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
# AC_PROG_CXX will return "g++" even if no c++ compiler is installed
AC_LANG_PUSH([C++])
AC_MSG_CHECKING([whether $CXX is available and compiles a program])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([C++ compiler not available or unable to compile])])
AC_LANG_POP
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
......
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