From 1800cc8546c0fb0da8b2781c72c70ce922e5452e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 27 Apr 2017 01:30:30 -0400 Subject: meson: also search for libcap directly --- meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index b18e645d39..c412aff91f 100644 --- a/meson.build +++ b/meson.build @@ -614,7 +614,12 @@ libm = cc.find_library('m') libdl = cc.find_library('dl') libcrypt = cc.find_library('crypt') -libcap = dependency('libcap') +libcap = dependency('libcap', required : false) +if not libcap.found() + # Compat with Ubuntu 14.04 which ships libcap w/o .pc file + libcap = cc.find_library('cap') +endif + libmount = dependency('mount', version : '>= 2.27') -- cgit v1.2.3 From 9f0e9c0119c67bd960082d0350c32938f4fca967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 27 Apr 2017 10:05:18 -0400 Subject: meson: add version check for libseccomp Compilation fails because of the missing arm64 bits with old seccomp versions. --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index c412aff91f..d9dfe7fbd9 100644 --- a/meson.build +++ b/meson.build @@ -626,6 +626,7 @@ libmount = dependency('mount', want_seccomp = get_option('seccomp') if want_seccomp != 'false' libseccomp = dependency('libseccomp', + version : '>= 2.3.1', required : want_seccomp == 'true') if libseccomp.found() conf.set('HAVE_SECCOMP', 1) -- cgit v1.2.3 From 2c5434ad3cbf7dfa8837083bcadbdc2b9a2bcaea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 27 Apr 2017 10:05:41 -0400 Subject: meson: fix detection of "-Wno-" options --- meson.build | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index d9dfe7fbd9..fa0ef168f8 100644 --- a/meson.build +++ b/meson.build @@ -246,10 +246,6 @@ foreach arg : ['-Wundef', '-Wendif-labels', '-Wstrict-aliasing=2', '-Wwrite-strings', - '-Wno-unused-parameter', - '-Wno-missing-field-initializers', - '-Wno-unused-result', - '-Wno-format-signedness', '-Werror=overflow', '-Wdate-time', '-Wnested-externs', @@ -268,6 +264,17 @@ foreach arg : ['-Wundef', endif endforeach +# "negative" arguments: gcc on purpose does not return an error for "-Wno-" +# arguments, just emits a warnings. So test for the "positive" version instead. +foreach arg : ['unused-parameter', + 'missing-field-initializers', + 'unused-result', + 'format-signedness'] + if cc.has_argument('-W' + arg) + add_project_arguments('-Wno-' + arg, language : 'c') + endif +endforeach + if cc.compiles(' #include #include -- cgit v1.2.3