]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android/external-libgbm.git/commitdiff
meson: replace `if(compiles) have=true` with `have=compiles`
authorEric Engestrom <eric.engestrom@imgtec.com>
Fri, 16 Mar 2018 17:10:26 +0000 (17:10 +0000)
committerEric Engestrom <eric.engestrom@imgtec.com>
Tue, 20 Mar 2018 14:31:18 +0000 (14:31 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
meson.build

index b90127aa1fbc879ffb3295708d122562f2ce1900..100a59faa451ce8536d6a2f90a2b70790c158a12 100644 (file)
@@ -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)