From: Ivan Maidanski Date: Wed, 15 Mar 2017 21:49:22 +0000 (+0300) Subject: Use AC_DEFINE for defining NO_GETCONTEXT in configure X-Git-Tag: v8.0.0~857 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99134699a9a6a78c3575d88bc5eab139571bd7d6;p=gc Use AC_DEFINE for defining NO_GETCONTEXT in configure (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. --- diff --git a/configure.ac b/configure.ac index d2cdfe59..22353547 100644 --- a/configure.ac +++ b/configure.ac @@ -466,8 +466,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