~ubuntu-branches/ubuntu/maverick/uim/maverick

« back to all changes in this revision

Viewing changes to sigscheme/m4/ax_func_sigsetjmp.m4

  • Committer: Bazaar Package Importer
  • Author(s): Masahito Omote
  • Date: 2008-06-25 19:56:33 UTC
  • mfrom: (3.1.18 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080625195633-8jljph4rfq00l8o7
Tags: 1:1.5.1-2
* uim-tcode: provide tutcode-custom.scm, tutcode-bushudic.scm
  and tutcode-rule.scm (Closes: #482659)
* Fix FTBFS: segv during compile (Closes: #483078).
  I personally think this bug is not specific for uim but is a optimization
  problem on gcc-4.3.1. (https://bugs.freedesktop.org/show_bug.cgi?id=16477)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
##### 
 
2
#
 
3
# SYNOPSIS
 
4
#
 
5
#   AX_FUNC_SIGSETJMP
 
6
#
 
7
# DESCRIPTION
 
8
#
 
9
#   Check whether sigsetjmp(3) and siglongjmp(3) is available.
 
10
#
 
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.
 
16
#
 
17
# LAST MODIFICATION
 
18
#
 
19
#   2007-08-11
 
20
#
 
21
# COPYLEFT
 
22
#
 
23
#   Copyright (c) 2007 YAMAMOTO Kengo <yamaken AT bp.iij4u.or.jp>
 
24
#
 
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.
 
28
 
 
29
AC_DEFUN([AX_FUNC_SIGSETJMP], [
 
30
  AC_CACHE_CHECK([for sigsetjmp],
 
31
                 [ax_cv_func_sigsetjmp],
 
32
                 [AC_LINK_IFELSE(
 
33
                    AC_LANG_PROGRAM([[@%:@include <setjmp.h>]],
 
34
                                    [[sigjmp_buf env;
 
35
                                      while (!sigsetjmp(env, 1))
 
36
                                        siglongjmp(env, 1);
 
37
                                      return 0;]]),
 
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.])
 
43
  fi
 
44
])