From: Rosen Penev Date: Fri, 9 Sep 2022 01:54:08 +0000 (-0700) Subject: meson: use dependency('dl') X-Git-Tag: v2.39-rc1~529^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=324aa32cb36184afd59d91578ea5715ece5487a1;p=thirdparty%2Futil-linux.git meson: use dependency('dl') if meson is new enough. Signed-off-by: Rosen Penev --- 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',