1 diff --git a/include/meson.build b/include/meson.build
2 index a64d9373a92..22c50eb5eb7 100644
3 --- a/include/meson.build
4 +++ b/include/meson.build
5 @@ -89,7 +89,7 @@ if with_egl
9 -if with_osmesa != 'none'
11 install_headers('GL/osmesa.h', subdir : 'GL')
14 diff --git a/meson.build b/meson.build
15 index 898d025f066..d73818e7ce5 100644
18 @@ -444,7 +444,7 @@ if with_any_vk and (with_platform_x11 and not with_dri3)
19 error('Vulkan drivers require dri3 for X11 support')
22 - if with_glx == 'disabled' and not with_egl and not with_gbm and with_osmesa != 'classic'
23 + if with_glx == 'disabled' and not with_egl and not with_gbm and not with_osmesa.contains('classic')
24 error('building dri drivers require at least one windowing system or classic osmesa')
27 @@ -1508,8 +1508,8 @@ else
31 -if with_osmesa != 'none'
32 - if with_osmesa == 'gallium' and not with_gallium_softpipe
34 + if with_osmesa.contains('gallium') and not with_gallium_softpipe
35 error('OSMesa gallium requires gallium softpipe or llvmpipe.')
37 if host_machine.system() == 'windows'
38 @@ -1710,10 +1710,10 @@ lines = ['',
39 with_gles2 ? 'yes' : 'no'),
42 -if with_osmesa != 'none'
46 - if with_osmesa == 'gallium'
47 + if with_osmesa.contains('gallium')
50 lines += 'OSMesa: lib' + osmesa_lib_name + suffix
51 diff --git a/meson_options.txt b/meson_options.txt
52 index 626baf3d5c2..cb3dc3b383f 100644
53 --- a/meson_options.txt
54 +++ b/meson_options.txt
55 @@ -295,9 +295,9 @@ option(
61 - choices : ['none', 'classic', 'gallium'],
64 + choices : ['classic', 'gallium'],
65 description : 'Build OSmesa.'
68 diff --git a/src/mesa/meson.build b/src/mesa/meson.build
69 index fa5c54cc6fb..f7b223862fa 100644
70 --- a/src/mesa/meson.build
71 +++ b/src/mesa/meson.build
72 @@ -744,7 +744,7 @@ libmesa_gallium = static_library(
76 -if with_osmesa == 'classic'
77 +if with_osmesa.contains('classic')
78 subdir('drivers/osmesa')