From 324aa32cb36184afd59d91578ea5715ece5487a1 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 8 Sep 2022 18:54:08 -0700 Subject: [PATCH] meson: use dependency('dl') if meson is new enough. Signed-off-by: Rosen Penev --- meson.build | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 57bf8961e3..3185d2273a 100644 --- a/meson.build +++ b/meson.build @@ -326,9 +326,11 @@ lib_cryptsetup = dependency( conf.set('HAVE_CRYPTSETUP', lib_cryptsetup.found() ? 1 : false) if not get_option('cryptsetup').disabled() and get_option('cryptsetup-dlopen').enabled() - lib_dl = cc.find_library( - 'libdl', - required : true) + if meson.version().version_compare('>= 0.62.0') + lib_dl = dependency('dl') + else + lib_dl = cc.find_library('dl') + endif conf.set('CRYPTSETUP_VIA_DLOPEN', 1) summary('cryptsetup support (dlopen)', 'enabled', -- 2.47.3