enhanced c++ compiler detection

This commit is contained in:
2014-05-28 16:51:32 +00:00
parent 134d91e5a1
commit e21afe6f6e
34 changed files with 125 additions and 4 deletions

View File

@ -26,9 +26,12 @@ AC_PROG_CC
dnl determine a C++ compiler to use
AC_PROG_CXX
dnl check if the C++ compiler exists in PATH.
dnl check if the C++ compiler exists in PATH
AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
dnl check if the C++ compiler supports namespace
AX_CXX_NAMESPACE_STD
dnl determine some key programs
AC_PROG_INSTALL
AC_PROG_EGREP
@ -568,9 +571,17 @@ else
AC_SUBST(BUILD_MODE, "release")
fi
AC_ARG_ENABLE([cxx], [AS_HELP_STRING([--enable-cxx],[build the library for C++ if a C++ compiler is available (default. yes)])],
enable_cxx_is=$enableval,enable_cxx_is=yes)
AC_ARG_ENABLE([cxx],
[AS_HELP_STRING([--enable-cxx],[build the library for C++ if a C++ compiler is available (default. yes)])],
enable_cxx_is=$enableval,
enable_cxx_is=yes
)
dnl disable c++ if no c++ compiler was found
[test "${HAVE_CXX}" = "yes" || enable_cxx_is="no"]
dnl disable c++ if the compiler is too old.
[test "${HAVE_CXX_NAMESPACE_STD}" = "yes" || enable_cxx_is="no"]
AM_CONDITIONAL(ENABLE_CXX, test "${enable_cxx_is}" = "yes" )
AX_PTHREAD()