Skip to content

Commit

Permalink
meson: fallback to libcrypt detection outside of pkg-config
Browse files Browse the repository at this point in the history
Much like PAM, not all implementations of libcrypt provide a pkg-config
file, and hence we can't find it using the old logic.

Let's fall back to the standard AC_SEARCH_LIBS-style check if the pkg-config-style
detection fails.

This fixes finding e.g. musl's libcrypt.

X-Gentoo-Bug: 827074
X-Gentoo-Bug-URL: https://bugs.gentoo.org/827074
  • Loading branch information
thesamesam authored and williamh committed Nov 27, 2021
1 parent b945173 commit 2ba1613
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ if selinux_dep.found()
error('Pam was requested but could not be located')
endif
else
crypt_dep = dependency('libcrypt', required : not get_option('pam'))
crypt_dep = dependency('libcrypt', required : false)
if not crypt_dep.found()
crypt_dep = cc.find_library('crypt', required : true)
endif
endif
else
cc_selinux_flags = []
Expand Down

0 comments on commit 2ba1613

Please sign in to comment.