From 5c0a714dff68c74b6df525979f95f7c39e65febc Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 16 Mar 2017 00:49:22 +0300 Subject: [PATCH] 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. --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 093dbeac..e944b519 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- 2.40.0