1 dnl Available from the GNU Autoconf Macro Archive at:
2 dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_exceptions.html
3 dnl @version Id: 1.3 2004-02-04
5 dnl $Id: ac_cxx_exceptions.m4,v 1.2 2004/09/07 01:19:26 dnelson Exp $
6 AC_DEFUN([AC_CXX_EXCEPTIONS],
7 [AC_CACHE_CHECK(whether the compiler supports exceptions,
11 AC_TRY_COMPILE(,[try { throw 1; } catch (int i) { return i; }],
12 ac_cv_cxx_exceptions=yes, ac_cv_cxx_exceptions=no)
15 if test "$ac_cv_cxx_exceptions" = yes; then
16 AC_DEFINE(HAVE_EXCEPTIONS,,[define if the compiler supports exceptions])