From patchwork Fri Jul 7 16:16:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 785570 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x409X6qNpz9t1G for ; Sat, 8 Jul 2017 02:16:48 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C0E47A91; Fri, 7 Jul 2017 16:16:45 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 16F52970 for ; Fri, 7 Jul 2017 16:16:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6C7E31AE for ; Fri, 7 Jul 2017 16:16:43 +0000 (UTC) Received: from mfilter20-d.gandi.net (mfilter20-d.gandi.net [217.70.178.148]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id 366B041C0A9; Fri, 7 Jul 2017 18:16:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter20-d.gandi.net Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter20-d.gandi.net (mfilter20-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id vVPJm-zct9NR; Fri, 7 Jul 2017 18:16:40 +0200 (CEST) X-Originating-IP: 173.228.112.34 Received: from sigabrt.gateway.sonic.net (173-228-112-34.dsl.dynamic.fusionbroadband.com [173.228.112.34]) (Authenticated sender: blp@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id BD9C841C093; Fri, 7 Jul 2017 18:16:38 +0200 (CEST) From: Ben Pfaff To: dev@openvswitch.org Date: Fri, 7 Jul 2017 09:16:27 -0700 Message-Id: <20170707161627.17524-1-blp@ovn.org> X-Mailer: git-send-email 2.10.2 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH v2] configure: Fix check for rte_config.h to handle cross-compilation. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The check for rte_config.h in acinclude.m4 used AC_CHECK_FILE, but this macro is intended to check for a file on the host system, not the build system, which means that it fails unconditionally in a cross-compilation environment. However, the intended check here is for a header file, which is part of the build system. To check for part of the build system, we can just use "test", so this commit makes that change. Reported-by: Hemant Agrawal Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-March/329994.html Signed-off-by: Ben Pfaff Acked-by: Darrell Ball --- v1->v2: Remove file name from directory added to DPDK_INCLUDE. Use spaces instead of tabs. acinclude.m4 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 7d7b6832bc2e..82af5ccef2d9 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -206,9 +206,10 @@ AC_DEFUN([OVS_CHECK_DPDK], [ DPDK_INCLUDE="$with_dpdk/include" # If 'with_dpdk' is passed install directory, point to headers # installed in $DESTDIR/$prefix/include/dpdk - AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [], - [AC_CHECK_FILE([$DPDK_INCLUDE/dpdk/rte_config.h], - [DPDK_INCLUDE=$DPDK_INCLUDE/dpdk], [])]) + if test ! -e "$DPDK_INCLUDE/rte_config.h" && \ + test -e "$DPDK_INCLUDE/dpdk/rte_config.h"; then + DPDK_INCLUDE=$DPDK_INCLUDE/dpdk + fi DPDK_LIB_DIR="$with_dpdk/lib" ;; esac