Mesa (master): meson: conditionally include -ldl in gbm pkg-config file
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 31 09:28:27 UTC 2020
Module: Mesa
Branch: master
Commit: 0398caa97fa6ab9a0eac29dfca38b3fceb2cc026
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0398caa97fa6ab9a0eac29dfca38b3fceb2cc026
Author: Jonathan Gray <jsg at jsg.id.au>
Date: Fri Dec 6 17:25:58 2019 +1100
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 <jsg at jsg.id.au>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>
---
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
More information about the mesa-commit
mailing list