]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: fix mismatch with handling of lib_dl dependency
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 6 Feb 2024 12:41:53 +0000 (13:41 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 13 Feb 2024 19:20:45 +0000 (20:20 +0100)
lib_dl is only defined if both conditions are met, so meson would fail with an
undefined variable.

(cherry picked from commit c12f8998e9a2f4d393dfa7f7f88aaea2332a378b)

libmount/meson.build
meson.build

index a9d4d77804891b38970118a49b21b101709905cd..d1262e7f044039369958d6ead857782a7bdb436d 100644 (file)
@@ -83,7 +83,7 @@ lib_mount_static = static_library(
 
 lib__mount_deps = [
   lib_selinux,
-  get_option('cryptsetup-dlopen').enabled() ? lib_dl : lib_cryptsetup,
+  cryptsetup_dlopen ? lib_dl : lib_cryptsetup,
   realtime_libs
 ]
 lib_mount = library(
index c3a61789cf7ee420c836af3226f1d31dad46f9bb..63a17fbf0749e1526cfd2e96caab27b63cbcdc0d 100644 (file)
@@ -364,7 +364,8 @@ lib_cryptsetup = dependency(
   required : get_option('cryptsetup'))
 conf.set('HAVE_CRYPTSETUP', lib_cryptsetup.found() ? 1 : false)
 
-if not get_option('cryptsetup').disabled() and get_option('cryptsetup-dlopen').enabled()
+cryptsetup_dlopen = not get_option('cryptsetup').disabled() and get_option('cryptsetup-dlopen').enabled()
+if cryptsetup_dlopen
   if meson.version().version_compare('>= 0.62.0')
     lib_dl = dependency('dl')
   else