From patchwork Fri Mar 25 19:25:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Brooks X-Patchwork-Id: 64894 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp838845lbc; Fri, 1 Apr 2016 09:45:50 -0700 (PDT) X-Received: by 10.50.25.228 with SMTP id f4mr4749883igg.21.1459529150640; Fri, 01 Apr 2016 09:45:50 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d2si4736163igx.19.2016.04.01.09.45.50; Fri, 01 Apr 2016 09:45:50 -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 2449E61B79; Fri, 1 Apr 2016 16:45:50 +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=0.8 required=5.0 tests=BAYES_00, DATE_IN_PAST_96_XX, 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 E46CD61B68; Fri, 1 Apr 2016 16:45:43 +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 41A1F61A52; Fri, 1 Apr 2016 16:45:42 +0000 (UTC) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by lists.linaro.org (Postfix) with ESMTPS id 1C5C861A52 for ; Fri, 1 Apr 2016 16:45:41 +0000 (UTC) Received: by mail-pa0-f49.google.com with SMTP id td3so94963243pab.2 for ; Fri, 01 Apr 2016 09:45:41 -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=fbseQA5hUdskpRivNveTwzxtMorivMw4hZdb/QKuT2k=; b=XT3Me5lNwnhl3qajh3ctLVXKNDyOfabE0f4IRFzZoELyP7qB0u2dLL3396S41kspjz y/Nclc2S+vUzEfzKeTU35VhAhjKse4SS9NsY3pO7DX9ANSJttHp9M89uNtjouozSYOLd Ji85aMAOJ8yhCJ/ngX6Ol934kWqqK++xq+3XmWWKuWC1cyP64Bfm+wYeKq2H9iWDDrpQ t/ug+JN4Zy0KObVJHzOV2jzpiJiJ9NE52REhE1Lyf8A4OnnZ1f86c/+iB50cx1CKn0Qc 5HyVVatk9bFOsd887b3KvQSopYPaiRVB14XwbLQuOTLgR6PmyvzgU4a+eKDg/n/uF0zn qwdw== X-Gm-Message-State: AD7BkJL6GCR5aeSdVWkGuEcbc7oRWf3G6XkGqJdBnrcPlhe9MVzdnhl9Joc97CkLSXMpwcaBBwQ= X-Received: by 10.66.249.228 with SMTP id yx4mr32523677pac.29.1459529140441; Fri, 01 Apr 2016 09:45:40 -0700 (PDT) Received: from vm-arch-01.localdomain (rrcs-24-73-248-195.sw.biz.rr.com. [24.73.248.195]) by smtp.gmail.com with ESMTPSA id zp5sm23263730pac.9.2016.04.01.09.45.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Apr 2016 09:45:39 -0700 (PDT) From: Brian Brooks To: lng-odp@lists.linaro.org Date: Fri, 25 Mar 2016 14:25:26 -0500 Message-Id: <1458933927-77722-1-git-send-email-brian.brooks@linaro.org> X-Mailer: git-send-email 2.8.0 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" If --with-cunit-path=DIR is used, skip the AC_CHECK_LIB and modify the linker flags accordingly. Signed-off-by: Brian Brooks --- 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