"Fossies" - the Fresh Open Source Software Archive

Member "ruby-2.7.4/tool/m4/ruby_check_setjmp.m4" (7 Jul 2021, 530 Bytes) of package /linux/misc/ruby-2.7.4.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "ruby_check_setjmp.m4": 2.7.3_vs_2.7.4.

    1 # -*- Autoconf -*-
    2 # used for AC_ARG_WITH(setjmp-type)
    3 AC_DEFUN([RUBY_CHECK_SETJMP], [
    4 AC_CACHE_CHECK([for ]$1[ as a macro or function], ac_cv_func_$1,
    5   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
    6 @%:@include <setjmp.h>
    7 ]AC_INCLUDES_DEFAULT([$3])[
    8 @%:@define JMPARGS_1 env
    9 @%:@define JMPARGS_2 env,1
   10 @%:@define JMPARGS JMPARGS_]m4_ifval($2,2,1)[
   11 ]],
   12     [m4_ifval($2,$2,jmp_buf)[ env; $1(JMPARGS);]])],
   13     ac_cv_func_$1=yes,
   14     ac_cv_func_$1=no)]
   15 )
   16 AS_IF([test "$ac_cv_func_]$1[" = yes], [AC_DEFINE([HAVE_]AS_TR_CPP($1), 1)])
   17 ])dnl