summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2019-12-06 17:25:58 +1100
committerMarge Bot <eric+marge@anholt.net>2020-08-31 09:14:57 +0000
commit0398caa97fa6ab9a0eac29dfca38b3fceb2cc026 (patch)
tree91293e09b06c9e64155e647ac86aa5f7cffab482
parentc97af23b13c55c27f5fe381793ee9a3d6f3a2280 (diff)
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@jsg.id.au> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>
-rw-r--r--meson.build6
-rw-r--r--src/gbm/meson.build2
2 files changed, 7 insertions, 1 deletions
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