meson: use cc.check_header instead of open coding

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
main
Dylan Baker 2022-01-19 11:10:58 -08:00
parent 52b96a6fbf
commit f9539d4128
1 changed files with 1 additions and 2 deletions

View File

@ -205,8 +205,7 @@ else
endif
foreach header : ['sys/select.h', 'alloca.h']
config.set10('HAVE_' + header.underscorify().to_upper(),
cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header)))
config.set10('HAVE_' + header.underscorify().to_upper(), cc.check_header(header))
endforeach
if (cc.has_header_symbol('sys/sysmacros.h', 'major') and