From patchwork Fri May 21 21:25:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1482335 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fn05R37VYz9sW4 for ; Sat, 22 May 2021 07:25:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2665441461; Fri, 21 May 2021 21:25:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id euMdJPyuNr-I; Fri, 21 May 2021 21:25:43 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTP id 097A841886; Fri, 21 May 2021 21:25:42 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4228FC000D; Fri, 21 May 2021 21:25:41 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 219EAC0001 for ; Fri, 21 May 2021 21:25:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E5A5441460 for ; Fri, 21 May 2021 21:25:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g5XtuctDwo05 for ; Fri, 21 May 2021 21:25:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by smtp4.osuosl.org (Postfix) with ESMTPS id DF97E4145E for ; Fri, 21 May 2021 21:25:38 +0000 (UTC) Received: (Authenticated sender: blp@ovn.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 41E71E0007; Fri, 21 May 2021 21:25:35 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Fri, 21 May 2021 14:25:29 -0700 Message-Id: <20210521212529.821216-3-blp@ovn.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210521212529.821216-1-blp@ovn.org> References: <20210521212529.821216-1-blp@ovn.org> MIME-Version: 1.0 Cc: Ben Pfaff Subject: [ovs-dev] [PATCH ovn 3/3] configure: Also find and verify version of ovsdb2ddlog. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This tool is also needed and also varies from one version of DDlog to another, so we should find it and check its version in the same way. Signed-off-by: Ben Pfaff --- acinclude.m4 | 24 ++++++++++++++++-------- northd/automake.mk | 4 ++-- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 887c6cc73158..0ed805675af9 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -85,14 +85,22 @@ AC_DEFUN([OVS_CHECK_DDLOG], [ AC_MSG_ERROR([ddlog is required to build with DDlog]) fi - AC_MSG_CHECKING([$DDLOG version]) - $DDLOG --version >&AS_MESSAGE_LOG_FD 2>&1 - ddlog_version=$($DDLOG --version | sed -n 's/^DDlog v\([[^ ]]*\).*/\1/p') - AC_MSG_RESULT([$ddlog_version]) - m4_if([$1], [], [], [ - AS_CASE([$ddlog_version], - [$1 | $1.*], [], - [*], [AC_MSG_ERROR([DDlog version $1.x is required, but $ddlog_version is installed])])]) + AC_ARG_VAR([OVSDB2DDLOG], [path to ovsdb2ddlog binary]) + AC_PATH_PROGS([OVSDB2DDLOG], [ovsdb2ddlog], [none], [$DDLOG_PATH]) + if test X"$OVSDB2DDLOG" = X"none"; then + AC_MSG_ERROR([ovsdb2ddlog is required to build with DDlog]) + fi + + for tool in "$DDLOG" "$OVSDB2DDLOG"; do + AC_MSG_CHECKING([$tool version]) + $tool --version >&AS_MESSAGE_LOG_FD 2>&1 + tool_version=$($tool --version | sed -n 's/^.* v\([[^ ]]*\).*/\1/p') + AC_MSG_RESULT([$tool_version]) + m4_if([$1], [], [], [ + AS_CASE([$tool_version], + [$1 | $1.*], [], + [*], [AC_MSG_ERROR([DDlog version $1.x is required, but $tool is version $ddlog_version])])]) + done AC_ARG_VAR([CARGO]) AC_CHECK_PROGS([CARGO], [cargo], [none]) diff --git a/northd/automake.mk b/northd/automake.mk index aaea7e1b1336..4fc81c17bfa3 100644 --- a/northd/automake.mk +++ b/northd/automake.mk @@ -50,13 +50,13 @@ northd_ovn_northd_ddlog_LDADD = \ nb_opts = $$(cat $(srcdir)/northd/ovn-nb.dlopts) northd/OVN_Northbound.dl: ovn-nb.ovsschema northd/ovn-nb.dlopts - $(AM_V_GEN)ovsdb2ddlog -f $< --output-file $@ $(nb_opts) + $(AM_V_GEN)$(OVSDB2DDLOG) -f $< --output-file $@ $(nb_opts) northd/ovn-northd-ddlog-nb.inc: ovn-nb.ovsschema northd/ovn-nb.dlopts northd/ovsdb2ddlog2c $(AM_V_GEN)$(run_python) $(srcdir)/northd/ovsdb2ddlog2c -p nb_ -f $< --output-file $@ $(nb_opts) sb_opts = $$(cat $(srcdir)/northd/ovn-sb.dlopts) northd/OVN_Southbound.dl: ovn-sb.ovsschema northd/ovn-sb.dlopts - $(AM_V_GEN)ovsdb2ddlog -f $< --output-file $@ $(sb_opts) + $(AM_V_GEN)$(OVSDB2DDLOG) -f $< --output-file $@ $(sb_opts) northd/ovn-northd-ddlog-sb.inc: ovn-sb.ovsschema northd/ovn-sb.dlopts northd/ovsdb2ddlog2c $(AM_V_GEN)$(run_python) $(srcdir)/northd/ovsdb2ddlog2c -p sb_ -f $< --output-file $@ $(sb_opts)