Commit | Line | Data |
---|---|---|
1dc60eeb PB |
1 | dnl |
2 | dnl Check whether _Unwind_GetIPInfo is available. | |
3 | dnl | |
4 | AC_DEFUN([GCC_CHECK_UNWIND_GETIPINFO], [ | |
5 | AC_LANG_SAVE | |
6 | AC_LANG_CPLUSPLUS | |
7 | ac_save_CXXFLAGS="$CXXFLAGS" | |
8 | CXXFLAGS="$CXXFLAGS -fno-exceptions" | |
9 | AC_MSG_CHECKING([for _Unwind_GetIPInfo]) | |
10 | AC_CACHE_VAL(gcc_cv_getipinfo, [ | |
11 | AC_TRY_LINK([extern "C" { extern void _Unwind_GetIPInfo(); }], | |
12 | [_Unwind_GetIPInfo();], | |
13 | [gcc_cv_getipinfo=yes], | |
14 | [gcc_cv_getipinfo=no]) | |
15 | ]) | |
16 | if test $gcc_cv_getipinfo = yes; then | |
17 | AC_DEFINE(HAVE_GETIPINFO, 1, [Define if _Unwind_GetIPInfo is available.]) | |
18 | fi | |
19 | AC_MSG_RESULT($gcc_cv_getipinfo) | |
20 | CXXFLAGS="$ac_save_CXXFLAGS" | |
21 | AC_LANG_RESTORE | |
22 | ]) |