]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: use dependency('dl')
authorRosen Penev <rosenp@gmail.com>
Fri, 9 Sep 2022 01:54:08 +0000 (18:54 -0700)
committerRosen Penev <rosenp@gmail.com>
Fri, 9 Sep 2022 02:44:13 +0000 (19:44 -0700)
if meson is new enough.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
meson.build

index 57bf8961e3451893de3abb5fbb8b55efe9d876bf..3185d2273aa426ac2f76f4632756f62ac329cccd 100644 (file)
@@ -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',