From patchwork Mon Nov 24 16:01:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 41413 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 786B024524 for ; Mon, 24 Nov 2014 16:02:14 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e53sf5845780eek.11 for ; Mon, 24 Nov 2014 08:02:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=kALUsuIti9pRplkeM5H7Smo2GhANqgEUaybBsUPd8/g=; b=MQDealagj6i4bDv2mY/v+Z/d0nWHQKbg5A2JwH781XneV9Dd3U7ijv5GNg0BZqOTBr ryd8pW5zUBDic7pvGnrVl7HRscdfs/VNxHw4ZHJbqdaE3syNd0K+9gyqTqt1WI680X2u U5wAibntiE3Cde8SvQemoG5MKA+WoZDOg3xEcr3Stq1A1cvn986v6ew+BzqsKJlBtDOE iKh0dOvnTPQunoy1UxHR6tol6pnxV99iCEznDP2vYDuuFiYM/BDmjWaaclJm2qw78jYk MA4KokBpLEA6Z8pYKuS5mogx5zbwe3NkUTkybXQ8zooY6scyts8E13DJsnlOH7OR0gbg vwNA== X-Gm-Message-State: ALoCoQk2OOrTy8feuHV/aXAa8sMdeIGjLBGLkTSzNhY1L6+5INBROaKe6Ia/H55ucmiYkj9iQWp+ X-Received: by 10.152.30.66 with SMTP id q2mr6393704lah.2.1416844933711; Mon, 24 Nov 2014 08:02:13 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.194 with SMTP id g2ls480329lam.3.gmail; Mon, 24 Nov 2014 08:02:13 -0800 (PST) X-Received: by 10.152.18.166 with SMTP id x6mr21012187lad.18.1416844933564; Mon, 24 Nov 2014 08:02:13 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id t4si12274154laj.30.2014.11.24.08.02.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Nov 2014 08:02:13 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id z12so4659513lbi.4 for ; Mon, 24 Nov 2014 08:02:13 -0800 (PST) X-Received: by 10.112.189.10 with SMTP id ge10mr20964960lbc.23.1416844933447; Mon, 24 Nov 2014 08:02:13 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp280407lbc; Mon, 24 Nov 2014 08:02:12 -0800 (PST) X-Received: by 10.140.38.102 with SMTP id s93mr29391184qgs.18.1416844931872; Mon, 24 Nov 2014 08:02:11 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id e4si16107115qge.51.2014.11.24.08.02.11 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 24 Nov 2014 08:02:11 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xsw5Z-0006Yt-OB; Mon, 24 Nov 2014 16:02:09 +0000 Received: from mail-lb0-f173.google.com ([209.85.217.173]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xsw5H-0006XG-OY for lng-odp@lists.linaro.org; Mon, 24 Nov 2014 16:01:51 +0000 Received: by mail-lb0-f173.google.com with SMTP id z12so4698482lbi.32 for ; Mon, 24 Nov 2014 08:01:46 -0800 (PST) X-Received: by 10.152.203.199 with SMTP id ks7mr21183503lac.31.1416844906209; Mon, 24 Nov 2014 08:01:46 -0800 (PST) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id z1sm3630406lad.40.2014.11.24.08.01.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 08:01:45 -0800 (PST) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Mon, 24 Nov 2014 17:01:37 +0100 Message-Id: <1416844898-12631-4-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1416844898-12631-1-git-send-email-anders.roxell@linaro.org> References: <1416844898-12631-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 3/4] configure: always check for cunit (lib and headers) X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: anders.roxell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Anders Roxell --- configure.ac | 29 ++++++++++++++++++++--------- test/validation/Makefile.am | 3 +-- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index acd0060..9df4754 100644 --- a/configure.ac +++ b/configure.ac @@ -70,18 +70,16 @@ AC_ARG_ENABLE([cunit], cunit_support=yes fi]) +########################################################################## +# Set optional CUnit path +########################################################################## AC_ARG_WITH([cunit-path], AC_HELP_STRING([--with-cunit-path=DIR Path to Cunit libs and headers], [(or in the default path if not specified).]), -[CUNIT_PATH=$withval cunit_support=yes], -[ - AS_IF([test x$cunit_support = xyes ], [ - AC_CHECK_HEADERS([CUnit/Basic.h], [], - [AC_MSG_FAILURE(["can't find cunit headers"])]) - ]) -]) -AC_SUBST(CUNIT_PATH) -AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ]) + [CUNIT_PATH=$withval + AM_CFLAGS="$AM_CFLAGS -I$CUNIT_PATH/include" + AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib" + cunit_support=yes],[]) ########################################################################## # Enable/disable ODP_DEBUG_PRINT @@ -145,6 +143,19 @@ LDFLAGS="$AM_LDFLAGS $LDFLAGS" CFLAGS="$AM_CFLAGS $CFLAGS" ########################################################################## +# Check for CUnit availability +########################################################################## +if test x$cunit_support = xyes +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"])]) +fi + +AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ]) + +########################################################################## # Check for OpenSSL availability ########################################################################## AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index 0b831d0..874fd05 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/test/Makefile.inc -AM_CFLAGS += -I$(CUNIT_PATH)/include -AM_LDFLAGS += -L$(CUNIT_PATH)/lib -static -lcunit +AM_LDFLAGS += -static if ODP_CUNIT_ENABLED TESTS = ${bin_PROGRAMS}