From 1468a6f45408ba22e678f7c954b6192cbcbc087a Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 23 Mar 2017 11:45:31 +0300 Subject: [PATCH] Detect sigsetjmp() availability by configure * configure.ac (AC_TRY_LINK(sigsetjmp)): Add (define GC_NO_SIGSETJMP if sigsetjmp is not available). --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index 7561e1f..94e6fbc 100644 --- a/configure.ac +++ b/configure.ac @@ -795,6 +795,17 @@ if test x"$have_dladdr" = xyes; then AC_DEFINE([HAVE_DLADDR], 1, [Define to use 'dladdr' function.]) fi +# sigsetjmp could be a macro (thus AC_CHECK_FUNCS cannot be used). +AC_MSG_CHECKING(for sigsetjmp) +old_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $CFLAGS_EXTRA" +AC_TRY_LINK([#include ], + [sigjmp_buf t; sigsetjmp(t, 0)], + [AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) + AC_DEFINE([GC_NO_SIGSETJMP], [1], [Missing sigsetjmp])]) +CFLAGS="$old_CFLAGS" + # Check for AViiON Machines running DGUX ac_is_dgux=no AC_CHECK_HEADER(sys/dg_sys_info.h, -- 2.7.4