with_intel = false
_intel = get_option('intel')
-if _intel != 'false'
- if _intel == 'true' and not with_atomics
+if not _intel.disabled()
+ if _intel.enabled() and not with_atomics
error('libdrm_intel requires atomics.')
else
- with_intel = (_intel == 'true' or host_machine.cpu_family().startswith('x86')) and with_atomics
+ with_intel = (_intel.enabled() or host_machine.cpu_family().startswith('x86')) and with_atomics
endif
endif
summary('Intel', with_intel)
with_radeon = false
_radeon = get_option('radeon')
-if _radeon != 'false'
- if _radeon == 'true' and not with_atomics
+if not _radeon.disabled()
+ if _radeon.enabled() and not with_atomics
error('libdrm_radeon requires atomics.')
endif
with_radeon = with_atomics
with_amdgpu = false
_amdgpu = get_option('amdgpu')
-if _amdgpu != 'false'
- if _amdgpu == 'true' and not with_atomics
+if not _amdgpu.disabled()
+ if _amdgpu.enabled() and not with_atomics
error('libdrm_amdgpu requires atomics.')
endif
with_amdgpu = with_atomics
with_nouveau = false
_nouveau = get_option('nouveau')
-if _nouveau != 'false'
- if _nouveau == 'true' and not with_atomics
+if not _nouveau.disabled()
+ if _nouveau.enabled() and not with_atomics
error('libdrm_nouveau requires atomics.')
endif
with_nouveau = with_atomics
with_vmwgfx = false
_vmwgfx = get_option('vmwgfx')
-if _vmwgfx != 'false'
+if not _vmwgfx.disabled()
with_vmwgfx = true
endif
summary('vmwgfx', with_vmwgfx)
with_omap = false
_omap = get_option('omap')
-if _omap == 'true'
+if _omap.enabled()
if not with_atomics
error('libdrm_omap requires atomics.')
endif
with_freedreno = false
_freedreno = get_option('freedreno')
-if _freedreno != 'false'
- if _freedreno == 'true' and not with_atomics
+if not _freedreno.disabled()
+ if _freedreno.enabled() and not with_atomics
error('libdrm_freedreno requires atomics.')
else
- with_freedreno = (_freedreno == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family())) and with_atomics
+ with_freedreno = (_freedreno.enabled() or ['arm', 'aarch64'].contains(host_machine.cpu_family())) and with_atomics
endif
endif
summary('Freedreno', with_freedreno)
with_tegra = false
_tegra = get_option('tegra')
-if _tegra == 'true'
+if _tegra.enabled()
if not with_atomics
error('libdrm_tegra requires atomics.')
endif
with_etnaviv = false
_etnaviv = get_option('etnaviv')
-if _etnaviv == 'true'
+if _etnaviv.enabled()
if not with_atomics
error('libdrm_etnaviv requires atomics.')
endif
endif
summary('Etnaviv', with_etnaviv)
-with_exynos = get_option('exynos') == 'true'
+with_exynos = get_option('exynos').enabled()
summary('EXYNOS', with_exynos)
with_vc4 = false
_vc4 = get_option('vc4')
-if _vc4 != 'false'
- with_vc4 = _vc4 == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family())
+if not _vc4.disabled()
+ with_vc4 = _vc4.enabled() or ['arm', 'aarch64'].contains(host_machine.cpu_family())
endif
summary('VC4', with_vc4)
option(
'intel',
- type : 'combo',
- value : 'auto',
- choices : ['true', 'false', 'auto'],
+ type : 'feature',
description : '''Enable support for Intel's KMS API.''',
)
option(
'radeon',
- type : 'combo',
- value : 'auto',
- choices : ['true', 'false', 'auto'],
+ type : 'feature',
description : '''Enable support for radeons's KMS API.''',
)
option(
'amdgpu',
- type : 'combo',
- value : 'auto',
- choices : ['true', 'false', 'auto'],
+ type : 'feature',
description : '''Enable support for amdgpu's KMS API.''',
)
option(
'nouveau',
- type : 'combo',
- value : 'auto',
- choices : ['true', 'false', 'auto'],
+ type : 'feature',
description : '''Enable support for nouveau's KMS API.''',
)
option(
'vmwgfx',
- type : 'combo',
- value : 'true',
- choices : ['true', 'false', 'auto'],
+ type : 'feature',
description : '''Enable support for vmgfx's KMS API.''',
)
option(
'omap',
- type : 'combo',
- value : 'false',
- choices : ['true', 'false', 'auto'],
+ type : 'feature',
+ value : 'disabled',
description : '''Enable support for OMAP's experimental KMS API.''',
)
option(
'exynos',
- type : 'combo',
- value : 'false',
- choices : ['true', 'false', 'auto'],
+ type : 'feature',
+ value : 'disabled',
description : '''Enable support for EXYNOS's experimental KMS API.''',
)
option(
'freedreno',
- type : 'combo',
- value : 'auto',
- choices : ['true', 'false', 'auto'],
+ type : 'feature',
description : '''Enable support for freedreno's KMS API.''',
)
option(
'tegra',
- type : 'combo',
- value : 'false',
- choices : ['true', 'false', 'auto'],
+ type : 'feature',
+ value : 'disabled',
description : '''Enable support for Tegra's experimental KMS API.''',
)
option(
'vc4',
- type : 'combo',
- value : 'auto',
- choices : ['true', 'false', 'auto'],
+ type : 'feature',
description : '''Enable support for vc4's KMS API.''',
)
option(
'etnaviv',
- type : 'combo',
- value : 'false',
- choices : ['true', 'false', 'auto'],
+ type : 'feature',
+ value : 'disabled',
description : '''Enable support for etnaviv's experimental KMS API.''',
)
option(