From 431f1a147e33b3fae7ea78a47d40a6014b682ebd Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 16 Mar 2018 17:10:26 +0000 Subject: [PATCH] meson: replace `if(compiles) have=true` with `have=compiles` Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov Reviewed-by: Dylan Baker --- meson.build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index b90127aa..100a59fa 100644 --- a/meson.build +++ b/meson.build @@ -187,9 +187,8 @@ else endif dep_m = cc.find_library('m', required : false) foreach header : ['sys/sysctl.h', 'sys/select.h', 'alloca.h'] - if cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header)) - config.set10('HAVE_' + header.underscorify().to_upper(), true) - endif + config.set('HAVE_' + header.underscorify().to_upper(), + cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header))) endforeach if cc.has_header_symbol('sys/sysmacros.h', 'major') config.set10('MAJOR_IN_SYSMACROS', true)