]> 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)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 6 Feb 2024 13:06:40 +0000 (14:06 +0100)
lib_dl is only defined if both conditions are met, so meson would fail with an
undefined variable.

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 839a70440eaa5ec9f5c34866100d17c9c783d0ff..35490f26e6bc4cfe765d4420ebd8769810995490 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