From c12f8998e9a2f4d393dfa7f7f88aaea2332a378b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 6 Feb 2024 13:41:53 +0100 Subject: [PATCH] meson: fix mismatch with handling of lib_dl dependency lib_dl is only defined if both conditions are met, so meson would fail with an undefined variable. --- libmount/meson.build | 2 +- meson.build | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libmount/meson.build b/libmount/meson.build index a9d4d77804..d1262e7f04 100644 --- a/libmount/meson.build +++ b/libmount/meson.build @@ -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( diff --git a/meson.build b/meson.build index 839a70440e..35490f26e6 100644 --- a/meson.build +++ b/meson.build @@ -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 -- 2.47.3