]> granicus.if.org Git - gc/commitdiff
configure.ac: add check for NO_GETCONTEXT definition
authorSamuel Martin <s.martin49@gmail.com>
Wed, 15 Mar 2017 21:39:37 +0000 (00:39 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 7 Apr 2017 15:58:43 +0000 (18:58 +0300)
* configure.ac: Add AC_CHECK_FUNCS(getcontext); add -DNO_GETCONTEXT to
CFLAGS if $ac_cv_func_getcontext is "no".

configure.ac

index 95b2cfa340806dca816ec777194d717493163b9d..093dbeac684a6e4bba8cded069c7d128d72bd5e8 100644 (file)
@@ -456,6 +456,11 @@ if test "$GCC" = yes; then
   AC_MSG_RESULT($ac_cv_fno_strict_aliasing)
 fi
 
+# Check for getcontext (uClibc can be configured without it, for example)
+AC_CHECK_FUNCS([getcontext])
+AS_IF([test "$ac_cv_func_getcontext" = "no"],
+      [CFLAGS="$CFLAGS -DNO_GETCONTEXT"])
+
 case "$host" in
 # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64
 # and unnecessary everywhere.