From patchwork Tue Apr 7 11:16:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Fontana X-Patchwork-Id: 11477943 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B07381 for ; Tue, 7 Apr 2020 11:17:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4909F20644 for ; Tue, 7 Apr 2020 11:17:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4909F20644 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:45404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLmE3-0001Yz-F2 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 07 Apr 2020 07:17:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50202) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLmDX-0000io-Up for qemu-devel@nongnu.org; Tue, 07 Apr 2020 07:16:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLmDQ-0001J5-61 for qemu-devel@nongnu.org; Tue, 07 Apr 2020 07:16:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:43916) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jLmDQ-0001I3-0L for qemu-devel@nongnu.org; Tue, 07 Apr 2020 07:16:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B4B60AC62; Tue, 7 Apr 2020 11:16:20 +0000 (UTC) From: Claudio Fontana To: Laurent Vivier Subject: [PATCH] configure: check for bison, flex before dtc submodule build Date: Tue, 7 Apr 2020 13:16:18 +0200 Message-Id: <20200407111618.17241-1-cfontana@suse.de> X-Mailer: git-send-email 2.16.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Alex Bennee , Claudio Fontana , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" if fdt is required, and the system DTC (libfdt) is not usable, check for the dtc submodule requirements before trying to build it, and error out with a helpful message in case the dependencies are not met. Signed-off-by: Claudio Fontana --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure b/configure index 22870f3867..68b95b8e94 100755 --- a/configure +++ b/configure @@ -4276,6 +4276,14 @@ EOF git_submodules="${git_submodules} dtc" fi if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then + for binary in ${BISON:-bison} ${LEX:-flex} ; do + if ! has $binary ; then + error_exit "DTC (libfdt) version >= 1.4.2 not present on the system,\n" \ + "and using the dtc submodule replacement requires '${binary}'.\n" \ + "Please install the DTC (libfdt) devel package,\n" \ + "or the required binary '${binary}' to use the dtc submodule instead.\n" + fi + done fdt=git mkdir -p dtc if [ "$pwd_is_source_path" != "y" ] ; then