mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 13:47:41 +00:00
commit
5730c268f1
22
meson.build
22
meson.build
@ -16,7 +16,7 @@ project(
|
|||||||
'c_std=gnu11',
|
'c_std=gnu11',
|
||||||
'warning_level=2',
|
'warning_level=2',
|
||||||
],
|
],
|
||||||
meson_version: '>= 0.60')
|
meson_version: '>= 0.61')
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
pkgconfig = import('pkgconfig')
|
pkgconfig = import('pkgconfig')
|
||||||
@ -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')
|
||||||
@ -615,7 +606,6 @@ pkg_config_file = pkgconfig.generate(liblxc,
|
|||||||
url: 'http://linuxcontainers.org',
|
url: 'http://linuxcontainers.org',
|
||||||
libraries: '-lutil -lpthread -ldl',
|
libraries: '-lutil -lpthread -ldl',
|
||||||
libraries_private: pkgconfig_libs,
|
libraries_private: pkgconfig_libs,
|
||||||
install_dir: join_paths(libdir, 'pkgconfig')
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Empty dirs.
|
# Empty dirs.
|
||||||
|
Loading…
Reference in New Issue
Block a user