Received: from eggs.gnu.org ([2001:4830:134:3::10]:38086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyFmt-0006Uw-Bv for qemu-devel@nongnu.org; Mon, 16 Nov 2015 04:09:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyFmp-0000HH-En for qemu-devel@nongnu.org; Mon, 16 Nov 2015 04:09:23 -0500 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:38685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyFmp-0000HB-8q for qemu-devel@nongnu.org; Mon, 16 Nov 2015 04:09:19 -0500 Received: by wmec201 with SMTP id c201so109667271wme.1 for ; Mon, 16 Nov 2015 01:09:18 -0800 (PST) From: Eduardo Otubo Date: Mon, 16 Nov 2015 10:09:06 +0100 Message-Id: <1447664947-31044-3-git-send-email-eduardo.otubo@profitbricks.com> In-Reply-To: <1447664947-31044-1-git-send-email-eduardo.otubo@profitbricks.com> References: <1447664947-31044-1-git-send-email-eduardo.otubo@profitbricks.com> Subject: [Qemu-devel] [PULL 02/03] configure: arm/aarch64: allow enable-seccomp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, drjones@redhat.com, dann.frazier@canonical.com From: Andrew Jones This is a revert of ae6e8ef11e6cb, but with a bit of refactoring, and also specifically adding arm/aarch64, rather than all architectures. Currently, libseccomp code appears to also support mips, ppc, and s390. We could therefore allow qemu to enable seccomp for those platforms as well, with additional configure patches, given they're tested and proven to work. Signed-off-by: Andrew Jones Acked-by: Eduardo Otubo --- configure | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/configure b/configure index f75df4b..dd47d9b 100755 --- a/configure +++ b/configure @@ -1888,16 +1888,34 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if test "$cpu" = "i386" || test "$cpu" = "x86_64" && - $pkg_config --atleast-version=2.1.1 libseccomp; then + case "$cpu" in + i386|x86_64) + libseccomp_minver="2.1.1" + ;; + arm|aarch64) + libseccomp_minver="2.2.3" + ;; + *) + libseccomp_minver="" + ;; + esac + + if test "$libseccomp_minver" != "" && + $pkg_config --atleast-version=$libseccomp_minver libseccomp ; then libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" - seccomp="yes" + seccomp="yes" else - if test "$seccomp" = "yes"; then - feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.1" - fi - seccomp="no" + if test "$seccomp" = "yes" ; then + if test "$libseccomp_minver" != "" ; then + feature_not_found "libseccomp" \ + "Install libseccomp devel >= $libseccomp_minver" + else + feature_not_found "libseccomp" \ + "libseccomp is not supported for host cpu $cpu" + fi + fi + seccomp="no" fi fi ########################################## -- 2.1.4