meson: fix dlopen support for cryptsetup
dlopen is treated as a dependency, but that's not quite right, it should be an alternative way to link to libcryptsetup. Search for it only if cryptsetup is not disabled, and if the cryptsetup-dlopen is explicitly set to enabled. If it is, do not link to libcryptsetup. Add cryptsetup support status to the meson summary.
This commit is contained in:
parent
8da7e26cbc
commit
71b98c36d4
|
@ -81,7 +81,7 @@ lib_mount = library(
|
||||||
link_with : [lib_common,
|
link_with : [lib_common,
|
||||||
lib_blkid],
|
lib_blkid],
|
||||||
dependencies : [lib_selinux,
|
dependencies : [lib_selinux,
|
||||||
lib_cryptsetup,
|
get_option('cryptsetup-dlopen').enabled() ? lib_dl : lib_cryptsetup,
|
||||||
realtime_libs],
|
realtime_libs],
|
||||||
install : build_libmount)
|
install : build_libmount)
|
||||||
|
|
||||||
|
|
17
meson.build
17
meson.build
|
@ -312,10 +312,19 @@ lib_cryptsetup = dependency(
|
||||||
required : get_option('cryptsetup'))
|
required : get_option('cryptsetup'))
|
||||||
conf.set('HAVE_CRYPTSETUP', lib_cryptsetup.found() ? 1 : false)
|
conf.set('HAVE_CRYPTSETUP', lib_cryptsetup.found() ? 1 : false)
|
||||||
|
|
||||||
lib_cryptsetup_dl = dependency(
|
if not get_option('cryptsetup').disabled() and get_option('cryptsetup-dlopen').enabled()
|
||||||
'dl',
|
lib_dl = cc.find_library(
|
||||||
required : get_option('cryptsetup-dlopen'))
|
'libdl',
|
||||||
conf.set('CRYPTSETUP_VIA_DLOPEN', lib_cryptsetup_dl.found() ? 1 : false)
|
required : true)
|
||||||
|
conf.set('CRYPTSETUP_VIA_DLOPEN', 1)
|
||||||
|
summary('cryptsetup support (dlopen)',
|
||||||
|
'enabled',
|
||||||
|
section : 'components')
|
||||||
|
else
|
||||||
|
summary('cryptsetup support',
|
||||||
|
lib_cryptsetup.found() ? 'enabled' : 'disabled',
|
||||||
|
section : 'components')
|
||||||
|
endif
|
||||||
|
|
||||||
have = cc.has_function(
|
have = cc.has_function(
|
||||||
'crypt_activate_by_signed_key',
|
'crypt_activate_by_signed_key',
|
||||||
|
|
Loading…
Reference in New Issue