From 40f18d30140eabf5483c103b5d658374ad6b839c Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 2 Feb 2009 23:04:08 +0000 Subject: [PATCH] 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 --- configure.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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