X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=meson.build;h=824e3c46bc5524b743ded186e0de8fc945409f90;hb=1c9ea24a19a28e87f6038281c516287f25ad88b5;hp=56ff916c4bd8b55334a8789a5d80b8fdc6f561ea;hpb=53f9131205a63fa8b282ab2a7e96c48209447da0;p=mesa.git diff --git a/meson.build b/meson.build index 56ff916c4bd..824e3c46bc5 100644 --- a/meson.build +++ b/meson.build @@ -353,15 +353,9 @@ endif with_dri2 = (with_dri or with_any_vk) and with_dri_platform == 'drm' with_dri3 = get_option('dri3') if with_dri3 == 'auto' - if system_has_kms_drm and with_dri2 - with_dri3 = true - else - with_dri3 = false - endif -elif with_dri3 == 'true' - with_dri3 = true + with_dri3 = system_has_kms_drm and with_dri2 else - with_dri3 = false + with_dri3 = with_dri3 == 'true' endif if with_any_vk and (with_platform_x11 and not with_dri3) @@ -1022,11 +1016,15 @@ else endif if with_llvm _llvm_version = dep_llvm.version().split('.') - # Development versions of LLVM have an 'svn' suffix, we don't want that for - # our version checks. + # Development versions of LLVM have an 'svn' or 'git' suffix, we don't want + # that for our version checks. + # svn suffixes are stripped by meson as of 0.43, and git suffixes are + # strippped as of 0.44, but we support older meson versions. _llvm_patch = _llvm_version[2] if _llvm_patch.endswith('svn') _llvm_patch = _llvm_patch.split('s')[0] + elif _llvm_patch.contains('git') + _llvm_patch = _llvm_patch.split('g')[0] endif pre_args += [ '-DHAVE_LLVM=0x0@0@0@1@'.format(_llvm_version[0], _llvm_version[1]), @@ -1215,8 +1213,10 @@ inc_include = include_directories('include') gl_priv_reqs = [ 'x11', 'xext', 'xdamage >= 1.1', 'xfixes', 'x11-xcb', 'xcb', - 'xcb-glx >= 1.8.1', 'libdrm >= 2.4.75', -] + 'xcb-glx >= 1.8.1'] +if dep_libdrm.found() + gl_priv_reqs += 'libdrm >= 2.4.75' +endif if dep_xxf86vm != [] and dep_xxf86vm.found() gl_priv_reqs += 'xxf86vm' endif