Commit 2bd461e3 authored by Eric Engestrom's avatar Eric Engestrom 💤
Browse files

meson: make it easy to add headers to check


Signed-off-by: Eric Engestrom's avatarEric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker's avatarDylan Baker <dylan@pnwbakers.com>
parent 0663dbd3
...@@ -186,12 +186,11 @@ else ...@@ -186,12 +186,11 @@ else
dep_rt = [] dep_rt = []
endif endif
dep_m = cc.find_library('m', required : false) dep_m = cc.find_library('m', required : false)
if cc.compiles('#include <sys/sysctl.h>', name : 'sys/sysctl.h works') foreach header : ['sys/sysctl.h', 'sys/select.h']
config.set10('HAVE_SYS_SYSCTL_H', true) if cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header))
endif config.set10('HAVE_' + header.underscorify().to_upper(), true)
if cc.compiles('#include <sys/select.h>', name : 'sys/select.h works') endif
config.set10('HAVE_SYS_SELECT_H', true) endforeach
endif
if cc.has_header_symbol('sys/sysmacros.h', 'major') if cc.has_header_symbol('sys/sysmacros.h', 'major')
config.set10('MAJOR_IN_SYSMACROS', true) config.set10('MAJOR_IN_SYSMACROS', true)
elif cc.has_header_symbol('sys/mkdev.h', 'major') elif cc.has_header_symbol('sys/mkdev.h', 'major')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment