From: Jonathan Gray Date: Fri, 6 Dec 2019 06:25:58 +0000 (+1100) Subject: meson: conditionally include -ldl in gbm pkg-config file X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0398caa97fa6ab9a0eac29dfca38b3fceb2cc026;p=mesa.git 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: --- 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