On 17/4/21 1:45 pm, Mark Weiman wrote: > This patch changes the behavior of meson to define configuration options > *only* when the symbol checked is present. Currently, it defines all of > them in config.h whether the symbol exists or not and the code that > looks for it doesn't check the macro's value, but whether it's defined. >
Remember back when we used autotools and all this just worked! :D Patch looks good to me. Allan > Signed-off-by: Mark Weiman <[email protected]> > --- > meson.build | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/meson.build b/meson.build > index 483c4fbd..14b3381a 100644 > --- a/meson.build > +++ b/meson.build > @@ -146,7 +146,9 @@ foreach sym : [ > 'tcflush', > ] > have = cc.has_function(sym, args : '-D_GNU_SOURCE') > - conf.set10('HAVE_' + sym.to_upper(), have) > + if have > + conf.set10('HAVE_' + sym.to_upper(), have) > + endif > endforeach > > foreach member : [ >
