9
# Checks whether getcontext(3) is available.
11
# This macro uses compile-time detection and so is cross-compile
20
# Copyright (c) 2006 YAMAMOTO Kengo <yamaken AT bp.iij4u.or.jp>
22
# Copying and distribution of this file, with or without
23
# modification, are permitted in any medium without royalty provided
24
# the copyright notice and this notice are preserved.
26
AC_DEFUN([AX_FUNC_GETCONTEXT], [
27
AC_CACHE_CHECK([for getcontext],
28
[ax_cv_func_getcontext],
30
AC_LANG_PROGRAM([[@%:@include <ucontext.h>]],
32
return getcontext(&ctx);]]),
33
[ax_cv_func_getcontext=yes],
34
[ax_cv_func_getcontext=no])])
35
if test "x$ax_cv_func_getcontext" = xyes; then
36
AC_DEFINE([HAVE_GETCONTEXT], [1],
37
[Define to 1 if you have the `getcontext' function.])