meson: Use [ true, false, auto ] for tristate values

For symmetry with the boolean options. I really do not want to care
whether an option is a tristate if I'm trying to set it explicitly.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Adam Jackson 2017-10-24 13:03:09 -04:00
parent c2c6e9e68a
commit 04163fe8c6
2 changed files with 35 additions and 35 deletions

View File

@ -76,9 +76,9 @@ compositeproto_dep = dependency('compositeproto', version: '>= 0.4')
recordproto_dep = dependency('recordproto', version: '>= 1.13.99.1')
scrnsaverproto_dep = dependency('scrnsaverproto', version: '>= 1.1')
resourceproto_dep = dependency('resourceproto', version: '>= 1.2.0')
xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0', required: get_option('dri1') == 'yes')
dri2proto_dep = dependency('dri2proto', version: '>= 2.8', required: get_option('dri2') == 'yes')
dri3proto_dep = dependency('dri3proto', version: '>= 1.0', required: get_option('dri3') == 'yes')
xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0', required: get_option('dri1') == 'true')
dri2proto_dep = dependency('dri2proto', version: '>= 2.8', required: get_option('dri2') == 'true')
dri3proto_dep = dependency('dri3proto', version: '>= 1.0', required: get_option('dri3') == 'true')
xineramaproto_dep = dependency('xineramaproto')
xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0')
xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: false)
@ -93,7 +93,7 @@ xkbfile_dep = dependency('xkbfile')
xfont2_dep = dependency('xfont2', version: '>= 2.0')
nettle_dep = dependency('nettle')
dbus_required = get_option('systemd_logind') == 'yes'
dbus_required = get_option('systemd_logind') == 'true'
dbus_dep = dependency('dbus-1', version: '>= 1.0', required: dbus_required)
# Resolve default values of some options
@ -118,13 +118,13 @@ glamor_option = get_option('glamor')
build_udev = get_option('udev')
if host_machine.system() == 'windows'
build_udev = false
hal_option = 'no'
hal_option = 'false'
endif
if get_option('systemd_logind') == 'auto'
build_systemd_logind = build_udev and dbus_dep.found()
else
build_systemd_logind = get_option('systemd_logind') == 'yes'
build_systemd_logind = get_option('systemd_logind') == 'true'
endif
build_xorg = false
@ -134,7 +134,7 @@ if (host_machine.system() != 'darwin' and
build_xorg = (host_machine.system() != 'darwin' and
host_machine.system() != 'windows')
else
build_xorg = get_option('xorg') == 'yes'
build_xorg = get_option('xorg') == 'true'
endif
endif
xorgsdkdir = join_paths(get_option('prefix'), get_option('includedir'), 'xorg')
@ -142,8 +142,8 @@ xorgsdkdir = join_paths(get_option('prefix'), get_option('includedir'), 'xorg')
build_xwayland = false
if (host_machine.system() != 'darwin' and
host_machine.system() != 'windows')
if get_option('xwayland') != 'no'
xwayland_required = get_option('xwayland') == 'yes'
if get_option('xwayland') != 'false'
xwayland_required = get_option('xwayland') == 'true'
xwayland_dep = [
dependency('wayland-client', version: '>= 1.3.0', required: xwayland_required),
@ -165,8 +165,8 @@ endif
build_xnest = false
if (host_machine.system() != 'darwin' and
host_machine.system() != 'windows')
if get_option('xnest') != 'no'
xnest_required = get_option('xnest') == 'yes'
if get_option('xnest') != 'false'
xnest_required = get_option('xnest') == 'true'
xnest_dep = [
dependency('xext', version: '>= 1.0.99.4', required: xnest_required),
@ -191,7 +191,7 @@ if get_option('xwin') == 'auto'
build_xwin = true
endif
else
build_xwin = get_option('xwin') == 'yes'
build_xwin = get_option('xwin') == 'true'
endif
# XXX: Finish these.
@ -200,7 +200,7 @@ build_xquartz = false
if get_option('ipv6') == 'auto'
build_ipv6 = cc.has_function('getaddrinfo')
else
build_ipv6 = get_option('ipv6') == 'yes'
build_ipv6 = get_option('ipv6') == 'true'
endif
int10 = get_option('int10')
@ -223,7 +223,7 @@ if hal_option == 'auto'
build_hal = false
endif
else
build_hal = hal_option == 'yes'
build_hal = hal_option == 'true'
if build_hal
hal_dep = dependency('hal')
endif
@ -253,7 +253,7 @@ endif
if glamor_option == 'auto'
build_glamor = build_xorg or build_xwayland
else
build_glamor = get_option('glamor') == 'yes'
build_glamor = get_option('glamor') == 'true'
endif
gbm_dep = dependency('', required:false)
@ -274,19 +274,19 @@ build_glx = get_option('glx')
if get_option('dri1') == 'auto'
build_dri1 = xf86driproto_dep.found()
else
build_dri1 = get_option('dri1') == 'yes'
build_dri1 = get_option('dri1') == 'true'
endif
if get_option('dri2') == 'auto'
build_dri2 = dri2proto_dep.found()
else
build_dri2 = get_option('dri2') == 'yes'
build_dri2 = get_option('dri2') == 'true'
endif
if get_option('dri3') == 'auto'
build_dri3 = dri3proto_dep.found() and xshmfence_dep.found()
else
build_dri3 = get_option('dri3') == 'yes'
build_dri3 = get_option('dri3') == 'true'
if build_dri3
if not xshmfence_dep.found()
error('DRI3 requested, but xshmfence not found')
@ -294,7 +294,7 @@ else
endif
endif
libdrm_required = (get_option('dri1') == 'yes') or (get_option('dri2') == 'yes') or (get_option('dri3') == 'yes')
libdrm_required = (get_option('dri1') == 'true') or (get_option('dri2') == 'true') or (get_option('dri3') == 'true')
libdrm_dep = dependency('libdrm', version: '>= 2.3.1', required: libdrm_required)
build_modesetting = false
if libdrm_dep.found()
@ -314,7 +314,7 @@ if get_option('vbe') == 'auto'
build_vbe = true
endif
else
build_vbe = get_option('vbe') == 'yes'
build_vbe = get_option('vbe') == 'true'
endif
build_vgahw = false
@ -325,7 +325,7 @@ if get_option('vgahw') == 'auto'
build_vgahw = true
endif
else
build_vgahw = get_option('vgahw') == 'yes'
build_vgahw = get_option('vgahw') == 'true'
endif
# XXX: Allow configuration of these.

View File

@ -1,18 +1,18 @@
option('xorg', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
option('xorg', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable Xorg X Server')
option('xephyr', type: 'boolean', value: false,
description: 'Enable Xephyr nested X server')
option('xwayland', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
option('xwayland', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable XWayland X server')
option('glamor', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
option('glamor', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable glamor (default yes for Xorg/Xwayland builds)')
option('xnest', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
option('xnest', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable Xnest nested X server')
option('dmx', type: 'boolean', value: false,
description: 'Enable DMX nested X server')
option('xvfb', type: 'boolean', value: true,
description: 'Enable Xvfb X server')
option('xwin', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
option('xwin', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable XWin X server')
option('builder_addr', type: 'string', description: 'Builder address', value: 'xorg@lists.freedesktop.org')
@ -25,7 +25,7 @@ option('module_dir', type: 'string',
option('glx', type: 'boolean', value: true)
option('xdmcp', type: 'boolean', value: true)
option('xdm-auth-1', type: 'boolean', value: true)
option('ipv6', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto')
option('ipv6', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto')
option('xkb_dir', type: 'string')
option('xkb_output_dir', type: 'string')
@ -41,22 +41,22 @@ option('vendor_name_short', type: 'string', value: 'X.Org')
option('vendor_web', type: 'string', value: 'http://wiki.x.org')
option('os_vendor', type: 'string', value: '')
option('int10', type: 'combo', choices: ['stub', 'x86emu', 'vm86', 'auto', 'disabled'],
option('int10', type: 'combo', choices: ['stub', 'x86emu', 'vm86', 'auto', 'false'],
value: 'auto',
description: 'Xorg int10 backend (default: usually x86emu)')
option('pciaccess', type: 'boolean', value: 'true',
description: 'Xorg pciaccess support')
option('udev', type: 'boolean', value: 'true')
option('hal', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
option('hal', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable HAL integration')
option('systemd_logind', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
option('systemd_logind', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable systemd-logind integration')
option('vbe', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
option('vbe', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Xorg VBE module')
option('vgahw', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
option('vgahw', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Xorg VGA access module')
option('dri1', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Build DRI1 extension (default: auto)')
option('dri2', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Build DRI2 extension (default: auto)')
option('dri3', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Build DRI3 extension (default: auto)')
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)')
option('dri3', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI3 extension (default: auto)')