From patchwork Thu Apr 7 13:17:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 65316 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp73214lbl; Thu, 7 Apr 2016 06:18:03 -0700 (PDT) X-Received: by 10.107.184.198 with SMTP id i189mr3249282iof.26.1460035083341; Thu, 07 Apr 2016 06:18:03 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j202si7203641ioj.160.2016.04.07.06.18.02; Thu, 07 Apr 2016 06:18:03 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 78805619BF; Thu, 7 Apr 2016 13:18:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 98B666162F; Thu, 7 Apr 2016 13:17:57 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 4A0E06177D; Thu, 7 Apr 2016 13:17:55 +0000 (UTC) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) by lists.linaro.org (Postfix) with ESMTPS id 1D291615DD for ; Thu, 7 Apr 2016 13:17:54 +0000 (UTC) Received: by mail-lf0-f51.google.com with SMTP id j11so56605913lfb.1 for ; Thu, 07 Apr 2016 06:17:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+sgY64FhyCA+VCKuXyna/pTTIHgQxCdiKkB41uE0IKQ=; b=XmS5JjjdUoquY0JjqZkRXKDAFpBnLT7vWpO4nepy0ObDeHBA2D+U9kV0zXdMjYQinU +oan/pQTncGLAwudk5FeYBZ/LQwS/1CVtkUkvZm8o7S5dtdhp6Vle8LSD+PxaEBeCpVE t15fCbQhId22dGABq+ljgB+RXcQ63URw6/fCNbZqBHAOKiPYPBLfrMFDzTgaHxlPdxG3 /jFM51lCDelJ971kLNppJHz/W5LHxpjK0EKtVUBDC7HMg0DUoiAmdlULiUwIMPcST+x9 7P5imMOXIWpf3lXWuoFiTVCIVMSjuPzwfnwVzONM/N8uRU2Qkf969Ts9Nl31Me+dAd2x vLgQ== X-Gm-Message-State: AD7BkJJz6SaBAOMiszTBwuAFRJFyngGwNl2AJCKraAMjRjaCkiAojXGceknoG2LkeZiFmxcw99Y= X-Received: by 10.25.211.141 with SMTP id k135mr1402379lfg.164.1460035072615; Thu, 07 Apr 2016 06:17:52 -0700 (PDT) Received: from localhost.localdomain (ppp91-77-173-31.pppoe.mtu-net.ru. [91.77.173.31]) by smtp.gmail.com with ESMTPSA id ez1sm1231722lbc.29.2016.04.07.06.17.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Apr 2016 06:17:52 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 7 Apr 2016 16:17:44 +0300 Message-Id: <1460035065-8416-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCH 1/2] configure: support out-of-tree CUnit X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Brian Brooks If --with-cunit-path=DIR is used, skip the AC_CHECK_LIB and modify the linker flags accordingly. Signed-off-by: Brian Brooks Signed-off-by: Maxim Uvarov --- test/m4/validation.m4 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/m4/validation.m4 b/test/m4/validation.m4 index b137118..f6c93f7 100644 --- a/test/m4/validation.m4 +++ b/test/m4/validation.m4 @@ -33,12 +33,16 @@ AC_HELP_STRING([--with-cunit-path=DIR path to CUnit libs and headers], ########################################################################## # Check for CUnit availability ########################################################################## -if test x$cunit_support = xyes +if test x$cunit_support = xyes -a -z "$CUNIT_PATH" then AC_CHECK_LIB([cunit],[CU_get_error], [], [AC_MSG_ERROR([CUnit libraries required])]) AC_CHECK_HEADERS([CUnit/Basic.h], [], [AC_MSG_FAILURE(["can't find cunit headers"])]) else - cunit_support=no + if test -z "$CUNIT_PATH"; then + cunit_support=no + else + AM_LDFLAGS="$AM_LDFLAGS -lcunit" + fi fi