+dnl check for POSIX signals if we need them
+if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then
+ AC_CHECK_FUNCS(sigaction)
+
+ if test "$ac_cv_func_sigaction" = "no"; then
+ AC_MSG_WARN([No POSIX signal functions on this system, wxApp::OnFatalException will not be called])
+ wxUSE_ON_FATAL_EXCEPTION=no
+ fi
+
+ if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ AC_CACHE_CHECK([for sa_handler type], wx_cv_type_sa_handler,
+ [
+ AC_TRY_COMPILE([#include <signal.h>],
+ [
+ extern void testSigHandler(int);
+
+ struct sigaction sa;
+ sa.sa_handler = testSigHandler;
+ ], [
+ wx_cv_type_sa_handler=int
+ ], [
+ wx_cv_type_sa_handler=void
+ ])
+ ])
+
+ AC_LANG_RESTORE
+
+ AC_DEFINE_UNQUOTED(wxTYPE_SA_HANDLER, $wx_cv_type_sa_handler)
+ fi
+fi
+