xwayland: Do not enable DRI3 without eventfd
DRI3 version 1.4 which supports explicit buffers synchronization relies on the eventfd interface. As result, building would fail with DRI3 enabled on platforms without the eventfd interface. Check for the availability of the sys/eventfd.h header and disable DRI3 support if missing. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1523>
This commit is contained in:
parent
a58352b985
commit
96bdc156a1
|
@ -505,14 +505,18 @@ else
|
||||||
build_dri2 = get_option('dri2') == 'true'
|
build_dri2 = get_option('dri2') == 'true'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
have_eventfd = cc.has_header('sys/eventfd.h')
|
||||||
if get_option('dri3') == 'auto'
|
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
|
else
|
||||||
build_dri3 = get_option('dri3') == 'true'
|
build_dri3 = get_option('dri3') == 'true'
|
||||||
if build_dri3
|
if build_dri3
|
||||||
if not xshmfence_dep.found()
|
if not xshmfence_dep.found()
|
||||||
error('DRI3 requested, but xshmfence not found')
|
error('DRI3 requested, but xshmfence not found')
|
||||||
endif
|
endif
|
||||||
|
if not have_eventfd
|
||||||
|
error('DRI3 requested, but sys/eventfd.h not found')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue