summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-08 20:02:31 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-15 11:52:30 +0200
commite8644a414a9953a4f7a3b966519dee6fcf66eff0 (patch)
treee0d1ced56e719478f7df919a82ee4258f34c4ba4 /meson.build
parent83764f8d002afaef1492909bc4b00821eacab38f (diff)
downloadsystemd-e8644a414a9953a4f7a3b966519dee6fcf66eff0.tar.gz
meson: test if we have libcrypt_ra
We always seem to have either libcrypt_r and not the other two, or all three. So the fallback for libcrypt_ra needs to be based on libcrypt_r.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 10 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index ab0d7da1e9..203aa63c1a 100644
--- a/meson.build
+++ b/meson.build
@@ -881,6 +881,16 @@ libm = cc.find_library('m')
libdl = cc.find_library('dl')
libcrypt = cc.find_library('crypt')
+crypt_header = conf.get('HAVE_CRYPT_H') == 1 ? \
+ '''#include <crypt.h>''' : '''#include <unistd.h>'''
+foreach ident : [
+ ['crypt_ra', crypt_header]]
+
+ have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE',
+ dependencies : libcrypt)
+ conf.set10('HAVE_' + ident[0].to_upper(), have)
+endforeach
+
libcap = dependency('libcap', required : false)
if not libcap.found()
# Compat with Ubuntu 14.04 which ships libcap w/o .pc file