| 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 | |
|---|
| 1 | dnl @synopsis AC_CXX_EXCEPTIONS |
|---|
| 2 | dnl |
|---|
| 3 | dnl If the C++ compiler supports exceptions handling (try, throw and |
|---|
| 4 | dnl catch), define HAVE_EXCEPTIONS. |
|---|
| 5 | dnl |
|---|
| 6 | dnl @category Cxx |
|---|
| 7 | dnl @author Todd Veldhuizen |
|---|
| 8 | dnl @author Luc Maisonobe <luc@spaceroots.org> |
|---|
| 9 | dnl @version 2004-02-04 |
|---|
| 10 | dnl @license AllPermissive |
|---|
| 11 | |
|---|
| 12 | AC_DEFUN([AC_CXX_EXCEPTIONS], |
|---|
| 13 | [AC_CACHE_CHECK(whether the compiler supports exceptions, |
|---|
| 14 | ac_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 | ]) |
|---|
| 21 | if test "$ac_cv_cxx_exceptions" = yes; then |
|---|
| 22 | AC_DEFINE(HAVE_EXCEPTIONS,,[define if the compiler supports exceptions]) |
|---|
| 23 | fi |
|---|
| 24 | ]) |
|---|
Note: See
TracBrowser
for help on using the repository browser.