From nobody Mon May 6 06:30:08 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1576083476; cv=none; d=zohomail.com; s=zohoarc; b=IR7FvW6hJo+Ury7e0Wux7j/CDbDDFYbZ0T4e5BmnIG6xgGhHagbUXSUK357pWMqHxc0+wZrfsx0d87mE0FUD7P0ll9jDGovHkZka6oUkG25ZBj4MIQSpYMNylE8ipD3fJNc79rOZfEUal07qVsU1pm5+arWR+ddZHq4hyQ/Vqqk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576083476; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=eYGNPMxzsu/i2eihWoRx6LIzReSoiz71ak3CCb6ARZI=; b=E6Jb66JSjnhTkU8EU0n2G9dRk9STf6oXu8CiiVNJJHkudNSeJGeu+Us8f6VXdsTHZvCavpCfB6ks1s14/4Ghi/7BRzeXeUvPaUA4jJwtpFFWNowW0i15PeullrcKZL5kPrhAhhgiBImqQCg51c1PXdzvUd46aiR0yOxBuQtrAbY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1576083476516721.4725619227247; Wed, 11 Dec 2019 08:57:56 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1if5IW-0001th-1r; Wed, 11 Dec 2019 16:57:12 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1if5IU-0001tc-7K for xen-devel@lists.xenproject.org; Wed, 11 Dec 2019 16:57:10 +0000 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 41a3833a-1c37-11ea-8ba6-12813bfff9fa; Wed, 11 Dec 2019 16:57:04 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4374AAD31; Wed, 11 Dec 2019 16:57:03 +0000 (UTC) X-Inumbo-ID: 41a3833a-1c37-11ea-8ba6-12813bfff9fa X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Wed, 11 Dec 2019 17:56:59 +0100 Message-Id: <20191211165659.29939-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH-for-4.13] build: fix tools/configure in case only python3 exists X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Ian Jackson , Wei Liu MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Calling ./configure with python3 being there but no python, tools/configure will fail. Fix that by defaulting to python and falling back to python3 or python2. While at it fix the use of non portable "type -p" by replacing it by AC_PATH_PROG(). Signed-off-by: Juergen Gross Acked-by: Wei Liu Reviewed-by: Ian Jackson --- tools/configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/configure.ac b/tools/configure.ac index a8d8ce5ffe..8d86c42de8 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -337,8 +337,9 @@ case "$host_os" in freebsd*) ;; *) AX_PATH_PROG_OR_FAIL([BASH], [bash]);; esac -AS_IF([test -z "$PYTHON"], [PYTHON=3D"python"]) -AS_IF([echo "$PYTHON" | grep -q "^/"], [], [PYTHON=3D`type -p "$PYTHON"`]) +AS_IF([test -z "$PYTHON"], [AC_CHECK_PROGS([PYTHON], [python python3 pytho= n2], err)]) +AS_IF([test "$PYTHON" =3D "err"], [AC_MSG_ERROR([No python interpreter fou= nd])]) +AS_IF([echo "$PYTHON" | grep -q "^/"], [], [AC_PATH_PROG([PYTHON], [$PYTHO= N])]) PYTHONPATH=3D$PYTHON PYTHON=3D`basename $PYTHONPATH` =20 --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel