diff --git a/meson.build b/meson.build index 05d96a73a..4743d63e1 100644 --- a/meson.build +++ b/meson.build @@ -332,14 +332,18 @@ endif libdrm_dep = dependency('libdrm', version: libdrm_req, required: false) +have_eventfd = cc.has_header('sys/eventfd.h') if get_option('dri3') == 'auto' - build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() and libdrm_dep.found() + build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() and libdrm_dep.found() and have_eventfd else build_dri3 = get_option('dri3') == 'true' if build_dri3 if not xshmfence_dep.found() error('DRI3 requested, but xshmfence not found') endif + if not have_eventfd + error('DRI3 requested, but sys/eventfd.h not found') + endif endif endif