From nobody Mon Feb 9 02:28:00 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639554317; cv=none; d=zohomail.com; s=zohoarc; b=O7xq0XiPZLx/GfXddfHUAn2J9WE7XQHk9fB5neREeabqjLv0lEzR7gy5y/yyEzyJquFkdPB4DKWUPNtGDTmxLP4pkdRB+ptBj0pAk4D0whJucNMQ/F4LUSravizL2R5QQsV0RU670LqaayedR9lanqmOcWrypL/F62lh9PpcfMM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639554317; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Z48alLw/im+ochSlr+Mo16B/ARMNqNw59dEjukANF7w=; b=DS7ZYES81bqEdr802FmYFvcTddlQGhbdIM3vDtdoL+ZWnn0AudQC6ulClPySPMq/PGDzccOQrIFzzHv6wR/VSPO/wydRmbVkyaIxdxt4rbYIvK2KbHzQkuMqePsQwNNNN0RPD9pA+tXGdHQApwv4LDFhlyrO3M/HkiBNIX20kIA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1639554317460695.5607671218883; Tue, 14 Dec 2021 23:45:17 -0800 (PST) Received: from localhost ([::1]:59576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxOyS-00058j-Cw for importer@patchew.org; Wed, 15 Dec 2021 02:45:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxOnw-00039G-NB for qemu-devel@nongnu.org; Wed, 15 Dec 2021 02:34:24 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:33204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxOnv-0004Ik-0m for qemu-devel@nongnu.org; Wed, 15 Dec 2021 02:34:24 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-296--XnwA5wzNuuSJepgcZwnNg-1; Wed, 15 Dec 2021 02:34:20 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1A3CA2F45; Wed, 15 Dec 2021 07:34:19 +0000 (UTC) Received: from thuth.com (dhcp-192-183.str.redhat.com [10.33.192.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4EE721092790; Wed, 15 Dec 2021 07:34:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639553661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z48alLw/im+ochSlr+Mo16B/ARMNqNw59dEjukANF7w=; b=hKylKGdRMPby3b0NCP5GV329iwmrjk0GGj35tQjOj9+ONdcF8aKbvr1ayGVgxAUrohoiSS SW3T3pbwXf2j1cvZs0AvD091uO2oHfZ/r/cFxxZih8Zbt+ekaV0VhDcoD8d9Drp75uVK9r rdCm3uxBCYj/BSU6faRxvxHGF9HIvt4= X-MC-Unique: -XnwA5wzNuuSJepgcZwnNg-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 09/16] Move the libssh setup from configure to meson.build Date: Wed, 15 Dec 2021 08:33:55 +0100 Message-Id: <20211215073402.144286-10-thuth@redhat.com> In-Reply-To: <20211215073402.144286-1-thuth@redhat.com> References: <20211215073402.144286-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.719, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , "Richard W . M . Jones" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639554318793100001 Content-Type: text/plain; charset="utf-8" It's easier to do this in meson.build now. Message-Id: <20211209144801.148388-1-thuth@redhat.com> Acked-by: Richard W.M. Jones Signed-off-by: Thomas Huth --- configure | 27 --------------------------- meson.build | 13 +++++++++---- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 14 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 48c21775f3..bb99a40ed0 100755 --- a/configure +++ b/configure @@ -344,7 +344,6 @@ debug_stack_usage=3D"no" crypto_afalg=3D"no" tls_priority=3D"NORMAL" tpm=3D"$default_feature" -libssh=3D"$default_feature" live_block_migration=3D${default_feature:-yes} numa=3D"$default_feature" replication=3D${default_feature:-yes} @@ -1078,10 +1077,6 @@ for opt do ;; --enable-tpm) tpm=3D"yes" ;; - --disable-libssh) libssh=3D"no" - ;; - --enable-libssh) libssh=3D"yes" - ;; --disable-live-block-migration) live_block_migration=3D"no" ;; --enable-live-block-migration) live_block_migration=3D"yes" @@ -1448,7 +1443,6 @@ cat << EOF live-block-migration Block migration in the main migration stream coroutine-pool coroutine freelist (better performance) tpm TPM support - libssh ssh block device support numa libnuma support avx2 AVX2 optimization support avx512f AVX512F optimization support @@ -2561,21 +2555,6 @@ if test "$modules" =3D yes; then fi fi =20 -########################################## -# libssh probe -if test "$libssh" !=3D "no" ; then - if $pkg_config --exists "libssh >=3D 0.8.7"; then - libssh_cflags=3D$($pkg_config libssh --cflags) - libssh_libs=3D$($pkg_config libssh --libs) - libssh=3Dyes - else - if test "$libssh" =3D "yes" ; then - error_exit "libssh required for --enable-libssh" - fi - libssh=3Dno - fi -fi - ########################################## # TPM emulation is only on POSIX =20 @@ -3636,12 +3615,6 @@ if test "$cmpxchg128" =3D "yes" ; then echo "CONFIG_CMPXCHG128=3Dy" >> $config_host_mak fi =20 -if test "$libssh" =3D "yes" ; then - echo "CONFIG_LIBSSH=3Dy" >> $config_host_mak - echo "LIBSSH_CFLAGS=3D$libssh_cflags" >> $config_host_mak - echo "LIBSSH_LIBS=3D$libssh_libs" >> $config_host_mak -fi - if test "$live_block_migration" =3D "yes" ; then echo "CONFIG_LIVE_BLOCK_MIGRATION=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 96de1a6ef9..ae67ca28ab 100644 --- a/meson.build +++ b/meson.build @@ -874,11 +874,15 @@ if not get_option('glusterfs').auto() or have_block ''', dependencies: glusterfs) endif endif + libssh =3D not_found -if 'CONFIG_LIBSSH' in config_host - libssh =3D declare_dependency(compile_args: config_host['LIBSSH_CFLAGS']= .split(), - link_args: config_host['LIBSSH_LIBS'].split(= )) +if not get_option('libssh').auto() or have_block + libssh =3D dependency('libssh', version: '>=3D0.8.7', + method: 'pkg-config', + required: get_option('libssh'), + kwargs: static_kwargs) endif + libbzip2 =3D not_found if not get_option('bzip2').auto() or have_block libbzip2 =3D cc.find_library('bz2', has_headers: ['bzlib.h'], @@ -1451,6 +1455,7 @@ config_host_data.set('CONFIG_EBPF', libbpf.found()) config_host_data.set('CONFIG_LIBDAXCTL', libdaxctl.found()) config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_LIBNFS', libnfs.found()) +config_host_data.set('CONFIG_LIBSSH', libssh.found()) config_host_data.set('CONFIG_LINUX_AIO', libaio.found()) config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found()) config_host_data.set('CONFIG_LIBPMEM', libpmem.found()) @@ -3430,7 +3435,7 @@ endif summary_info +=3D {'seccomp support': seccomp} summary_info +=3D {'GlusterFS support': glusterfs} summary_info +=3D {'TPM support': config_host.has_key('CONFIG_TPM')} -summary_info +=3D {'libssh support': config_host.has_key('CONFIG_LIBSSH= ')} +summary_info +=3D {'libssh support': libssh} summary_info +=3D {'lzo support': lzo} summary_info +=3D {'snappy support': snappy} summary_info +=3D {'bzip2 support': libbzip2} diff --git a/meson_options.txt b/meson_options.txt index e392323732..4114bfcaa4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -105,6 +105,8 @@ option('libdaxctl', type : 'feature', value : 'auto', description: 'libdaxctl support') option('libpmem', type : 'feature', value : 'auto', description: 'libpmem support') +option('libssh', type : 'feature', value : 'auto', + description: 'ssh block device support') option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') option('libusb', type : 'feature', value : 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 7a17ff4218..ae8f18edc2 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -53,6 +53,7 @@ meson_options_help() { printf "%s\n" ' libiscsi libiscsi userspace initiator' printf "%s\n" ' libnfs libnfs block device driver' printf "%s\n" ' libpmem libpmem support' + printf "%s\n" ' libssh ssh block device support' printf "%s\n" ' libudev Use libudev to enumerate host devices' printf "%s\n" ' libusb libusb support for USB passthrough' printf "%s\n" ' libxml2 libxml2 support for Parallels image for= mat' @@ -177,6 +178,8 @@ _meson_option_parse() { --disable-libnfs) printf "%s" -Dlibnfs=3Ddisabled ;; --enable-libpmem) printf "%s" -Dlibpmem=3Denabled ;; --disable-libpmem) printf "%s" -Dlibpmem=3Ddisabled ;; + --enable-libssh) printf "%s" -Dlibssh=3Denabled ;; + --disable-libssh) printf "%s" -Dlibssh=3Ddisabled ;; --enable-libudev) printf "%s" -Dlibudev=3Denabled ;; --disable-libudev) printf "%s" -Dlibudev=3Ddisabled ;; --enable-libusb) printf "%s" -Dlibusb=3Denabled ;; --=20 2.27.0