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
parent
52b96a6fbf
commit
f9539d4128
|
@ -205,8 +205,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach header : ['sys/select.h', 'alloca.h']
|
foreach header : ['sys/select.h', 'alloca.h']
|
||||||
config.set10('HAVE_' + header.underscorify().to_upper(),
|
config.set10('HAVE_' + header.underscorify().to_upper(), cc.check_header(header))
|
||||||
cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header)))
|
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if (cc.has_header_symbol('sys/sysmacros.h', 'major') and
|
if (cc.has_header_symbol('sys/sysmacros.h', 'major') and
|
||||||
|
|
Loading…
Reference in New Issue