mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-13 10:45:45 +00:00
meson: Use dependencies for pkgconfig
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
d841229ea5
commit
181cd6dc51
19
meson.build
19
meson.build
@ -206,9 +206,8 @@ threads = dependency('threads')
|
||||
## Seccomp.
|
||||
libseccomp = dependency('libseccomp')
|
||||
conf.set10('HAVE_SECCOMP', libseccomp.found())
|
||||
pkgconfig_libs += libseccomp
|
||||
if libseccomp.found()
|
||||
pkgconfig_libs += '-lseccomp'
|
||||
|
||||
if libseccomp.version().version_compare('>=2.5.0')
|
||||
# https://github.com/seccomp/libseccomp/commit/dead12bc788b259b148cc4d93b970ef0bd602b1a
|
||||
conf.set10('HAVE_DECL_SECCOMP_NOTIFY_FD', true)
|
||||
@ -245,9 +244,7 @@ endif
|
||||
## SELinux.
|
||||
libselinux = dependency('libselinux', required: false)
|
||||
conf.set10('HAVE_SELINUX', libselinux.found())
|
||||
if libselinux.found()
|
||||
pkgconfig_libs += '-lselinux'
|
||||
endif
|
||||
pkgconfig_libs += libselinux
|
||||
|
||||
## AppArmor.
|
||||
libapparmor = dependency('libapparmor', required: false)
|
||||
@ -256,9 +253,7 @@ conf.set10('HAVE_APPARMOR', libapparmor.found())
|
||||
## OpenSSL.
|
||||
libopenssl = dependency('openssl', required: false)
|
||||
conf.set10('HAVE_OPENSSL', libopenssl.found())
|
||||
if libopenssl.found()
|
||||
pkgconfig_libs += '-lssl -lcrypto'
|
||||
endif
|
||||
pkgconfig_libs += libopenssl
|
||||
|
||||
## Libcap..
|
||||
libcap = dependency('libcap', required: false)
|
||||
@ -267,9 +262,7 @@ if not libcap.found()
|
||||
libcap = cc.find_library('cap', required: false)
|
||||
endif
|
||||
conf.set10('HAVE_LIBCAP', libcap.found())
|
||||
if libcap.found()
|
||||
pkgconfig_libs += '-lcap'
|
||||
endif
|
||||
pkgconfig_libs += libcap
|
||||
|
||||
libcap_static = dependency('libcap', required: false, static: true)
|
||||
if not libcap_static.found()
|
||||
@ -282,9 +275,7 @@ conf.set10('HAVE_STATIC_LIBCAP', libcap_static.found())
|
||||
pam = cc.find_library('pam',
|
||||
has_headers: 'security/pam_modules.h')
|
||||
conf.set10('HAVE_PAM', pam.found())
|
||||
if pam.found()
|
||||
pkgconfig_libs += '-lpam'
|
||||
endif
|
||||
pkgconfig_libs += pam
|
||||
|
||||
## Others.
|
||||
have = cc.has_function('strchrnul', prefix: '#include <string.h>', args: '-D_GNU_SOURCE')
|
||||
|
Loading…
Reference in New Issue
Block a user