diff --git a/meson.build b/meson.build index eb57a8bcbe..3bef55347d 100644 --- a/meson.build +++ b/meson.build @@ -1022,7 +1022,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,