meson: Fix sanlock detection

If the user explicitly asked for sanlock support to be enabled,
then failure to find the corresponding library should result in
an error.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Andrea Bolognani 2021-05-27 16:35:38 +02:00
parent 6f25a5ac8a
commit d20685c259

View File

@ -1145,7 +1145,7 @@ if readline_dep.found()
endif
if not get_option('sanlock').disabled()
sanlock_dep = dependency('libsanlock_client', required: false)
sanlock_dep = dependency('libsanlock_client', required: get_option('sanlock'))
if sanlock_dep.found()
conf.set('WITH_SANLOCK', 1)