1dnl Available from the GNU Autoconf Macro Archive at: 2dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_explicit.html 3dnl 4AC_DEFUN([AC_CXX_EXPLICIT], 5[AC_CACHE_CHECK(whether the compiler supports the explicit keyword, 6ac_cv_cxx_explicit, 7[AC_LANG_SAVE 8 AC_LANG_CPLUSPLUS 9 AC_TRY_COMPILE([class A{public:explicit A(double){}};], 10[double c = 5.0;A x(c);return 0;], 11 ac_cv_cxx_explicit=yes, ac_cv_cxx_explicit=no) 12 AC_LANG_RESTORE 13]) 14if test "$ac_cv_cxx_explicit" = yes; then 15 AC_DEFINE(HAVE_EXPLICIT,,[define if the compiler supports the explicit keyword]) 16fi 17]) 18