9
# Check whether sigsetjmp(3) and siglongjmp(3) is available.
11
# Since sigsetjmp(3) and siglongjmp(3) may be a macro,
12
# AC_CHECK_FUNC() is not appropriate to detect them. This macro can
13
# properly detect them although having '_FUNC_' prefix for the naming
14
# convention. This macro uses compile-time detection and so is
15
# cross-compile ready.
23
# Copyright (c) 2007 YAMAMOTO Kengo <yamaken AT bp.iij4u.or.jp>
25
# Copying and distribution of this file, with or without
26
# modification, are permitted in any medium without royalty provided
27
# the copyright notice and this notice are preserved.
29
AC_DEFUN([AX_FUNC_SIGSETJMP], [
30
AC_CACHE_CHECK([for sigsetjmp],
31
[ax_cv_func_sigsetjmp],
33
AC_LANG_PROGRAM([[@%:@include <setjmp.h>]],
35
while (!sigsetjmp(env, 1))
38
[ax_cv_func_sigsetjmp=yes],
39
[ax_cv_func_sigsetjmp=no])])
40
if test "x$ax_cv_func_sigsetjmp" = xyes; then
41
AC_DEFINE([HAVE_SIGSETJMP], [1],
42
[Define to 1 if you have the `sigsetjmp' (and 'siglongjmp') function or macro.])