From c2feeca1b008fb01b2128daef2dc361dfb193a41 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sun, 28 Apr 2019 21:56:20 +0100 Subject: [PATCH] meson: Absence of dri.pc is an error if building with GLX Currently, this can error if dri.pc isn't found, as we can't then get the value of pkgconfig variable from it: include/meson.build:199:10: ERROR: 'dri' is not a pkgconfig dependency I think we need DRI_DRIVER_PATH (only) when building GLX, even if dri2/3 isn't enabled, so we know where to load swrast_dri.so from. (For autotools, configure.ac directly calls `pkg-config --variable=dridriverdir dri`, the backticks swallowing any error, causing the value of this define to be empty if dri.pc isn't present) --- include/meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/meson.build b/include/meson.build index bbd5a66901..f7991c0453 100644 --- a/include/meson.build +++ b/include/meson.build @@ -10,7 +10,7 @@ endif release = major * 10000000 + minor * 100000 + patch * 1000 + subpatch -dri_dep = dependency('dri', required: build_dri2 or build_dri3) +dri_dep = dependency('dri', required: build_glx) conf_data = configuration_data() conf_data.set('_DIX_CONFIG_H_', '1') @@ -196,7 +196,9 @@ conf_data.set('DGA', build_dga) 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')) +if build_glx + conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir')) +endif conf_data.set('HAS_SHM', build_mitshm) conf_data.set('MITSHM', build_mitshm) conf_data.set('PANORAMIX', build_xinerama)