mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-03 01:17:45 +03:00
meson: allow to fallback to use libxcrypt.pc or glibc's libcrypt
Some distributions still use glibc's libcrypt. In that case, libcrypt.pc does not exist and dependency() will fail. Also, even if libxcrypt is used, there may not be a symlink from libcrypt.pc to libxcrypt.pc. So, let's add a secondary name. Follow-up ford625f717db
. Fixes #28289. [ fixed to fallback to extra dependency() call as multiple deps require meson 0.60 ] (cherry picked from commit555737878f
) (cherry picked from commit087b9a70b0
) (cherry picked from commit6f7b7b661e
)
This commit is contained in:
parent
725bde83bd
commit
ce32489b1e
@ -998,7 +998,14 @@ threads = dependency('threads')
|
||||
librt = cc.find_library('rt')
|
||||
libm = cc.find_library('m')
|
||||
libdl = cc.find_library('dl')
|
||||
libcrypt = dependency('libcrypt')
|
||||
libcrypt = dependency('libcrypt', required : false)
|
||||
if not libcrypt.found()
|
||||
libcrypt = dependency('libxcrypt', required : false)
|
||||
endif
|
||||
if not libcrypt.found()
|
||||
# fallback to use find_library() if libcrypt is provided by glibc, e.g. for LibreELEC.
|
||||
libcrypt = cc.find_library('crypt')
|
||||
endif
|
||||
libcap = dependency('libcap')
|
||||
|
||||
# On some architectures, libatomic is required. But on some installations,
|
||||
|
Loading…
Reference in New Issue
Block a user