fail configure if you don't have a working c++ compiler

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11603 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-02-02 23:04:08 +00:00
parent 356cfa02e8
commit 40f18d3014
1 changed files with 12 additions and 0 deletions

View File

@ -53,6 +53,18 @@ AC_LANG_C
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
AC_PROG_CXX 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_AWK
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
AC_PROG_INSTALL AC_PROG_INSTALL