diff options
author | Mark Weiman <mark.weiman@markzz.com> | 2021-04-17 05:45:21 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2021-04-19 09:08:40 +0200 |
commit | 207f0439eeecb505f74590af481236ec60c09876 (patch) | |
tree | 6575d40e466e14e9126be518f6c8cc6610a150ab /meson.build | |
parent | c294b7cb4c3a160cbbbe404baeaa23a3c8290a99 (diff) | |
download | pacman-207f0439eeecb505f74590af481236ec60c09876.tar.gz pacman-207f0439eeecb505f74590af481236ec60c09876.tar.xz |
meson.build: Fix detection of symbols
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.
Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 579ff2ed..f76a647b 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 : [ |