mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 07:47:05 +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.
|
## Seccomp.
|
||||||
libseccomp = dependency('libseccomp')
|
libseccomp = dependency('libseccomp')
|
||||||
conf.set10('HAVE_SECCOMP', libseccomp.found())
|
conf.set10('HAVE_SECCOMP', libseccomp.found())
|
||||||
|
pkgconfig_libs += libseccomp
|
||||||
if libseccomp.found()
|
if libseccomp.found()
|
||||||
pkgconfig_libs += '-lseccomp'
|
|
||||||
|
|
||||||
if libseccomp.version().version_compare('>=2.5.0')
|
if libseccomp.version().version_compare('>=2.5.0')
|
||||||
# https://github.com/seccomp/libseccomp/commit/dead12bc788b259b148cc4d93b970ef0bd602b1a
|
# https://github.com/seccomp/libseccomp/commit/dead12bc788b259b148cc4d93b970ef0bd602b1a
|
||||||
conf.set10('HAVE_DECL_SECCOMP_NOTIFY_FD', true)
|
conf.set10('HAVE_DECL_SECCOMP_NOTIFY_FD', true)
|
||||||
@ -245,9 +244,7 @@ endif
|
|||||||
## SELinux.
|
## SELinux.
|
||||||
libselinux = dependency('libselinux', required: false)
|
libselinux = dependency('libselinux', required: false)
|
||||||
conf.set10('HAVE_SELINUX', libselinux.found())
|
conf.set10('HAVE_SELINUX', libselinux.found())
|
||||||
if libselinux.found()
|
pkgconfig_libs += libselinux
|
||||||
pkgconfig_libs += '-lselinux'
|
|
||||||
endif
|
|
||||||
|
|
||||||
## AppArmor.
|
## AppArmor.
|
||||||
libapparmor = dependency('libapparmor', required: false)
|
libapparmor = dependency('libapparmor', required: false)
|
||||||
@ -256,9 +253,7 @@ conf.set10('HAVE_APPARMOR', libapparmor.found())
|
|||||||
## OpenSSL.
|
## OpenSSL.
|
||||||
libopenssl = dependency('openssl', required: false)
|
libopenssl = dependency('openssl', required: false)
|
||||||
conf.set10('HAVE_OPENSSL', libopenssl.found())
|
conf.set10('HAVE_OPENSSL', libopenssl.found())
|
||||||
if libopenssl.found()
|
pkgconfig_libs += libopenssl
|
||||||
pkgconfig_libs += '-lssl -lcrypto'
|
|
||||||
endif
|
|
||||||
|
|
||||||
## Libcap..
|
## Libcap..
|
||||||
libcap = dependency('libcap', required: false)
|
libcap = dependency('libcap', required: false)
|
||||||
@ -267,9 +262,7 @@ if not libcap.found()
|
|||||||
libcap = cc.find_library('cap', required: false)
|
libcap = cc.find_library('cap', required: false)
|
||||||
endif
|
endif
|
||||||
conf.set10('HAVE_LIBCAP', libcap.found())
|
conf.set10('HAVE_LIBCAP', libcap.found())
|
||||||
if libcap.found()
|
pkgconfig_libs += libcap
|
||||||
pkgconfig_libs += '-lcap'
|
|
||||||
endif
|
|
||||||
|
|
||||||
libcap_static = dependency('libcap', required: false, static: true)
|
libcap_static = dependency('libcap', required: false, static: true)
|
||||||
if not libcap_static.found()
|
if not libcap_static.found()
|
||||||
@ -282,9 +275,7 @@ conf.set10('HAVE_STATIC_LIBCAP', libcap_static.found())
|
|||||||
pam = cc.find_library('pam',
|
pam = cc.find_library('pam',
|
||||||
has_headers: 'security/pam_modules.h')
|
has_headers: 'security/pam_modules.h')
|
||||||
conf.set10('HAVE_PAM', pam.found())
|
conf.set10('HAVE_PAM', pam.found())
|
||||||
if pam.found()
|
pkgconfig_libs += pam
|
||||||
pkgconfig_libs += '-lpam'
|
|
||||||
endif
|
|
||||||
|
|
||||||
## Others.
|
## Others.
|
||||||
have = cc.has_function('strchrnul', prefix: '#include <string.h>', args: '-D_GNU_SOURCE')
|
have = cc.has_function('strchrnul', prefix: '#include <string.h>', args: '-D_GNU_SOURCE')
|
||||||
|
Loading…
Reference in New Issue
Block a user