aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom2018-03-12 11:17:55 -0500
committerEric Engestrom2018-03-14 04:47:39 -0500
commit2bd461e32a5fd50169704786ba975324ddc11cb2 (patch)
treecfd8d7cd651ed2e7d357b32719578083f744c950
parent0663dbd3efc7e6d644662c903722d1fc4a199cfa (diff)
downloadexternal-libgbm-2bd461e32a5fd50169704786ba975324ddc11cb2.tar.gz
external-libgbm-2bd461e32a5fd50169704786ba975324ddc11cb2.tar.xz
external-libgbm-2bd461e32a5fd50169704786ba975324ddc11cb2.zip
meson: make it easy to add headers to check
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
-rw-r--r--meson.build11
1 files changed, 5 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index a0c79e30..b85f1d7a 100644
--- a/meson.build
+++ b/meson.build
@@ -186,12 +186,11 @@ else
186 dep_rt = [] 186 dep_rt = []
187endif 187endif
188dep_m = cc.find_library('m', required : false) 188dep_m = cc.find_library('m', required : false)
189if cc.compiles('#include <sys/sysctl.h>', name : 'sys/sysctl.h works') 189foreach header : ['sys/sysctl.h', 'sys/select.h']
190 config.set10('HAVE_SYS_SYSCTL_H', true) 190 if cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header))
191endif 191 config.set10('HAVE_' + header.underscorify().to_upper(), true)
192if cc.compiles('#include <sys/select.h>', name : 'sys/select.h works') 192 endif
193 config.set10('HAVE_SYS_SELECT_H', true) 193endforeach
194endif
195if cc.has_header_symbol('sys/sysmacros.h', 'major') 194if cc.has_header_symbol('sys/sysmacros.h', 'major')
196 config.set10('MAJOR_IN_SYSMACROS', true) 195 config.set10('MAJOR_IN_SYSMACROS', true)
197elif cc.has_header_symbol('sys/mkdev.h', 'major') 196elif cc.has_header_symbol('sys/mkdev.h', 'major')