From patchwork Mon May 24 17:33:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1482905 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 4Fpkpp2HVhz9sPf for ; Tue, 25 May 2021 03:34:10 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 18124403CA; Mon, 24 May 2021 17:34:08 +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 R4HosxvlRxOM; Mon, 24 May 2021 17:34:07 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTP id 0A7BC4039E; Mon, 24 May 2021 17:34:05 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id CEE2FC000E; Mon, 24 May 2021 17:34:05 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 20697C0001 for ; Mon, 24 May 2021 17:34:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id CAC2040388 for ; Mon, 24 May 2021 17:33:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BIhDPJPCmimK for ; Mon, 24 May 2021 17:33:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by smtp2.osuosl.org (Postfix) with ESMTPS id ACAD140377 for ; Mon, 24 May 2021 17:33:39 +0000 (UTC) Received: (Authenticated sender: blp@ovn.org) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 91D5B1BF207; Mon, 24 May 2021 17:33:36 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Mon, 24 May 2021 10:33:19 -0700 Message-Id: <20210524173319.962817-4-blp@ovn.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524173319.962817-1-blp@ovn.org> References: <20210524173319.962817-1-blp@ovn.org> MIME-Version: 1.0 Cc: Ben Pfaff Subject: [ovs-dev] [PATCH ovn v3 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 2fbcab8463c3..e7f829520029 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\([[0-9]][[^ ]]*\).*/\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\([[0-9]][[^ ]]*\).*/\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 $tool_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)