From: Zbigniew Jędrzejewski-Szmek Date: Tue, 6 Feb 2024 12:41:53 +0000 (+0100) Subject: meson: fix mismatch with handling of lib_dl dependency X-Git-Tag: v2.40-rc2~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a372229d32747d7299f22779391ec85203f8fb83;p=thirdparty%2Futil-linux.git 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. (cherry picked from commit c12f8998e9a2f4d393dfa7f7f88aaea2332a378b) --- 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 c3a61789cf..63a17fbf07 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