From 0398caa97fa6ab9a0eac29dfca38b3fceb2cc026 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Fri, 6 Dec 2019 17:25:58 +1100 Subject: [PATCH] meson: conditionally include -ldl in gbm pkg-config file Follow libGL and only include -ldl in gbm pkg-config file if libdl was actually found. Many systems have these functions in libc and don't have libdl. Fixes: 816bf7d1644 ("meson: build gbm") Signed-off-by: Jonathan Gray Reviewed-by: Eric Engestrom Part-of: --- meson.build | 6 ++++++ src/gbm/meson.build | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index edb49e0fe7c..b79a378776a 100644 --- a/meson.build +++ b/meson.build @@ -1853,6 +1853,12 @@ if dep_dl.found() gl_priv_libs += '-ldl' endif +# FIXME: autotools lists this as incomplete +gbm_priv_libs = [] +if dep_dl.found() + gbm_priv_libs += '-ldl' +endif + pkg = import('pkgconfig') if host_machine.system() == 'windows' diff --git a/src/gbm/meson.build b/src/gbm/meson.build index 2a9be93450b..873366600bc 100644 --- a/src/gbm/meson.build +++ b/src/gbm/meson.build @@ -64,7 +64,7 @@ pkg.generate( description : 'Mesa gbm library', version : meson.project_version(), libraries : libgbm, - libraries_private : '-ldl', # FIXME: autotools lists this a incomplete + libraries_private : gbm_priv_libs, ) if with_symbols_check -- 2.30.2