1 gc/configure.ac: add check for NO_GETCONTEXT definition
3 This patch is ported from bdwgc package. Since Gauche uses an internal
4 copy of the boehm gc code, it is affected by the same problem.
6 Both configure and configure.ac are modified because autoreconf fails
7 due to an incompatibility with the version of the autotools used by
10 Signed-off-by: Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
12 Original credits of patch in bdwgc package:
13 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
14 [yann.morin.1998@free.fr: add a comment, change variable name, use
15 AS_IF, remove debug traces, use AC_CHECK_FUNCS (as suggested by
17 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
18 Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
20 diff -ur a/gc/configure b/gc/configure
21 --- a/gc/configure 2015-11-12 21:41:02.394822056 +0900
22 +++ b/gc/configure 2015-11-12 22:04:14.655157423 +0900
23 @@ -16153,6 +16153,23 @@
24 $as_echo "$ac_cv_fno_strict_aliasing" >&6; }
27 +# Check for getcontext (uClibc can be configured without it, for example)
28 +for ac_func in getcontext
30 + ac_fn_c_check_func "$LINENO" "getcontext" "ac_cv_func_getcontext"
31 +if test "x$ac_cv_func_getcontext" = xyes; then :
32 + cat >>confdefs.h <<_ACEOF
33 +#define HAVE_GETCONTEXT 1
39 +if test "$ac_cv_func_getcontext" = "no"; then :
40 + CFLAGS="$CFLAGS -DNO_GETCONTEXT"
41 + CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"
45 # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64
46 # and unnecessary everywhere.
47 diff -ur a/gc/configure.ac b/gc/configure.ac
48 --- a/gc/configure.ac 2015-11-12 22:31:44.851510997 +0900
49 +++ b/gc/configure.ac 2015-11-12 22:33:39.292191227 +0900
51 AC_MSG_RESULT($ac_cv_fno_strict_aliasing)
54 +# Check for getcontext (uClibc can be configured without it, for example)
55 +AC_CHECK_FUNCS([getcontext])
56 +AS_IF([test "$ac_cv_func_getcontext" = "no"],
57 + [CFLAGS="$CFLAGS -DNO_GETCONTEXT"
58 + CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"])
61 # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64
62 # and unnecessary everywhere.