]> granicus.if.org Git - gc/commitdiff
Use AC_DEFINE for defining NO_GETCONTEXT in configure
authorIvan Maidanski <ivmai@mail.ru>
Wed, 15 Mar 2017 21:49:22 +0000 (00:49 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 7 Apr 2017 15:59:02 +0000 (18:59 +0300)
(code refactoring of commit 7c13fb8)

* configure.ac [!ac_cv_func_getcontext]: Use AC_DEFINE(NO_GETCONTEXT)
instead of directly adding -D NO_GETCONTEXT to CFLAGS.

configure.ac

index 093dbeac684a6e4bba8cded069c7d128d72bd5e8..e944b519230a1a18824cb2a271ed7818c54d3f6b 100644 (file)
@@ -458,8 +458,9 @@ 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"])
+if test "$ac_cv_func_getcontext" = "no"; then
+  AC_DEFINE([NO_GETCONTEXT], [1], [Missing getcontext()])
+fi
 
 case "$host" in
 # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64