1 dnl @synopsis AC_CXX_EXCEPTIONS
3 dnl If the C++ compiler supports exceptions handling (try,
4 dnl throw and catch), define HAVE_EXCEPTIONS.
6 dnl @version $Id: ac_cxx_exceptions.m4,v 1.1 2005/01/07 02:52:49 norwin Exp $
7 dnl @author Todd Veldhuizen and Luc Maisonobe <luc@spaceroots.org>
9 AC_DEFUN([AC_CXX_EXCEPTIONS],
10 [AC_CACHE_CHECK(whether the compiler supports exceptions,
14 AC_TRY_COMPILE(,[try { throw 1; } catch (int i) { return i; }],
15 ac_cv_cxx_exceptions=yes, ac_cv_cxx_exceptions=no)
18 if test "$ac_cv_cxx_exceptions" = yes; then
19 AC_DEFINE(HAVE_EXCEPTIONS,,[define if the compiler supports exceptions])