Commit 43ffd572 authored by Laurent Carlier's avatar Laurent Carlier Committed by Adam Jackson

meson: Make SHM extension optional

v2: check for header 'sys/shm.h'
Signed-off-by: Laurent Carlier's avatarLaurent Carlier <lordheavym@gmail.com>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent de456572
......@@ -167,7 +167,7 @@ conf_data.set('DPMSExtension', build_dpms)
conf_data.set('DRI2', build_dri2)
conf_data.set('DRI3', build_dri3)
conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir'))
conf_data.set('HAS_SHM', '1')
conf_data.set('HAS_SHM', build_mitshm)
conf_data.set('MITSHM', build_mitshm)
conf_data.set('PANORAMIX', build_xinerama)
conf_data.set('PRESENT', '1')
......
......@@ -387,8 +387,14 @@ if (get_option('linux_acpi') == true and
endif
endif
build_mitshm = false
if get_option('mitshm') == 'auto'
build_mitshm = cc.has_header('sys/shm.h')
elif get_option('mitshm') == 'true'
build_mitshm = true
endif
# XXX: Allow configuration of these.
build_mitshm = true
build_xselinux = false
build_xf86vidmode = xf86vidmodeproto_dep.found()
......
......@@ -81,6 +81,8 @@ option('linux_apm', type: 'boolean', value: true,
description: 'APM support on Linux')
option('linux_acpi', type: 'boolean', value: true,
description: 'ACPI support on Linux')
option('mitshm', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'SHM extension')
option('dri1', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI1 extension (default: auto)')
option('dri2', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI2 extension (default: auto)')
......
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