source: box/trunk/infrastructure/m4/ac_cxx_exceptions.m4 @ 217

Revision 217, 696 bytes checked in by martin, 6 years ago (diff)

Set svn:eol-style as appropriate for all files

  • Property svn:eol-style set to native
Line 
1dnl @synopsis AC_CXX_EXCEPTIONS
2dnl
3dnl If the C++ compiler supports exceptions handling (try, throw and
4dnl catch), define HAVE_EXCEPTIONS.
5dnl
6dnl @category Cxx
7dnl @author Todd Veldhuizen
8dnl @author Luc Maisonobe <luc@spaceroots.org>
9dnl @version 2004-02-04
10dnl @license AllPermissive
11
12AC_DEFUN([AC_CXX_EXCEPTIONS],
13[AC_CACHE_CHECK(whether the compiler supports exceptions,
14ac_cv_cxx_exceptions,
15[AC_LANG_SAVE
16 AC_LANG_CPLUSPLUS
17 AC_TRY_COMPILE(,[try { throw  1; } catch (int i) { return i; }],
18 ac_cv_cxx_exceptions=yes, ac_cv_cxx_exceptions=no)
19 AC_LANG_RESTORE
20])
21if test "$ac_cv_cxx_exceptions" = yes; then
22  AC_DEFINE(HAVE_EXCEPTIONS,,[define if the compiler supports exceptions])
23fi
24])
Note: See TracBrowser for help on using the repository browser.