$as_echo "$as_me: WARNING: backtrace() is not available, wxStackWalker will not be available" >&2;}
wxUSE_STACKWALKER=no
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cxa_demangle() in <cxxabi.h>" >&5
+ if test "$ac_cv_header_cxxabi_h" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cxa_demangle() in <cxxabi.h>" >&5
$as_echo_n "checking for __cxa_demangle() in <cxxabi.h>... " >&6; }
if ${wx_cv_func_cxa_demangle+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_ext=cpp
+ ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <cxxabi.h>
int
main ()
{
- int rc;
- __cxxabiv1::__cxa_demangle("foo", 0, 0, &rc);
+ int rc;
+ __cxxabiv1::__cxa_demangle("foo", 0, 0, &rc);
;
return 0;
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_func_cxa_demangle" >&5
$as_echo "$wx_cv_func_cxa_demangle" >&6; }
+ else
+ wx_cv_func_cxa_demangle=no
+ fi
if test "$wx_cv_func_cxa_demangle" = "yes"; then
$as_echo "#define HAVE_CXA_DEMANGLE 1" >>confdefs.h
fi
fi
+
+ if test "$ac_cv_header_cxxabi_h" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for abi::__forced_unwind() in <cxxabi.h>" >&5
+$as_echo_n "checking for abi::__forced_unwind() in <cxxabi.h>... " >&6; }
+if ${wx_cv_type_abi_forced_unwind+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <cxxabi.h>
+int
+main ()
+{
+
+ void foo(abi::__forced_unwind&);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ wx_cv_type_abi_forced_unwind=yes
+else
+ wx_cv_type_abi_forced_unwind=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_type_abi_forced_unwind" >&5
+$as_echo "$wx_cv_type_abi_forced_unwind" >&6; }
+ else
+ wx_cv_type_abi_forced_unwind=no
+ fi
+
+ if test "$wx_cv_type_abi_forced_unwind" = "yes"; then
+ $as_echo "#define HAVE_ABI_FORCEDUNWIND 1" >>confdefs.h
+
+ fi
fi
else
AC_MSG_WARN([backtrace() is not available, wxStackWalker will not be available])
wxUSE_STACKWALKER=no
else
- AC_CACHE_CHECK([for __cxa_demangle() in <cxxabi.h>], wx_cv_func_cxa_demangle,
- [
- AC_LANG_PUSH(C++)
- AC_TRY_LINK([#include <cxxabi.h>],
- [
- int rc;
- __cxxabiv1::__cxa_demangle("foo", 0, 0, &rc);
- ],
- wx_cv_func_cxa_demangle=yes,
- wx_cv_func_cxa_demangle=no
- )
- AC_LANG_POP()
- ]
- )
+ if test "$ac_cv_header_cxxabi_h" = "yes"; then
+ AC_CACHE_CHECK([for __cxa_demangle() in <cxxabi.h>], wx_cv_func_cxa_demangle,
+ [
+ AC_LANG_PUSH(C++)
+ AC_TRY_LINK([#include <cxxabi.h>],
+ [
+ int rc;
+ __cxxabiv1::__cxa_demangle("foo", 0, 0, &rc);
+ ],
+ wx_cv_func_cxa_demangle=yes,
+ wx_cv_func_cxa_demangle=no
+ )
+ AC_LANG_POP()
+ ]
+ )
+ else
+ wx_cv_func_cxa_demangle=no
+ fi
if test "$wx_cv_func_cxa_demangle" = "yes"; then
AC_DEFINE(HAVE_CXA_DEMANGLE)
AC_DEFINE(HAVE___THREAD_KEYWORD)
fi
fi
+
+ if test "$ac_cv_header_cxxabi_h" = "yes"; then
+ AC_CACHE_CHECK([for abi::__forced_unwind() in <cxxabi.h>],
+ wx_cv_type_abi_forced_unwind,
+ [
+ AC_LANG_PUSH(C++)
+ AC_TRY_COMPILE([#include <cxxabi.h>],
+ [
+ void foo(abi::__forced_unwind&);
+ ],
+ wx_cv_type_abi_forced_unwind=yes,
+ wx_cv_type_abi_forced_unwind=no
+ )
+ AC_LANG_POP()
+ ]
+ )
+ else
+ wx_cv_type_abi_forced_unwind=no
+ fi
+
+ if test "$wx_cv_type_abi_forced_unwind" = "yes"; then
+ AC_DEFINE(HAVE_ABI_FORCEDUNWIND)
+ fi
fi
dnl from if !MSW
#include <thread.h>
#endif
-#ifdef HAVE_CXXABI_H
+#ifdef HAVE_ABI_FORCEDUNWIND
#include <cxxabi.h>
#endif
wxT("Thread %p Entry() returned %lu."),
THR_ID(pthread), wxPtrToUInt(pthread->m_exitcode));
}
-#ifdef HAVE_CXXABI_H
+#ifdef HAVE_ABI_FORCEDUNWIND
// When using common C++ ABI under Linux we must always rethrow this
// special exception used to unwind the stack when the thread was
// cancelled, otherwise the thread library would simply terminate the
pthread->SetState(STATE_EXITED);
throw;
}
-#endif // HAVE_CXXABI_H
+#endif // HAVE_ABI_FORCEDUNWIND
wxCATCH_ALL( wxTheApp->OnUnhandledException(); )
{