aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-11-24 19:42:01 +0000
committerWilliam Hubbs <w.d.hubbs@gmail.com>2021-11-27 13:14:10 -0600
commit2ba16135cbef444a566da5e2e02e2f41b48c2109 (patch)
treea16e476254a08ebf5a133d2ac285cbbccdf94b40 /meson.build
parentb94517376e6bd1e02e09cf5b4cf38d1c52fdb6be (diff)
meson: fallback to libcrypt detection outside of pkg-config
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
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 4 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index fe0e04ef..4cc9232c 100644
--- a/meson.build
+++ b/meson.build
@@ -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 = []