From patchwork Sat Nov 29 22:42:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 41714 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4A10820AEC for ; Sat, 29 Nov 2014 22:43:32 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id ex7sf5470409wid.7 for ; Sat, 29 Nov 2014 14:43:31 -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=QmAbLajQUfB4HlRlSyUo2JAjoShrtvNUMIbw+WCCGoZXvHF6r/zpgEDIC2WEk2cW3+ aK8pKpAd6u2HSFcE0XKHh12U0Qjk56XXPGUkHjB5eamanCy5RL5X+cuxuG3knwNghGZT jwFTDjn5ELhKthdrzybxXLJcmDtJXP5fFTsnayifNlUC+/irpLYgzNIaBtPFiHBP/DRL GIKrTy2KRSfBFkrgBwzhFgRDPoGAg/luyn1dv8gUvHdPDjVK+bKGBs8MwuRr+8tFXSf3 Snyf5yhzsY7snwS9iT12OdeF2Ux5KdFZNpKp8skW+37oFexC64BRziWmlS7BVZCT2Ue9 Yacg== X-Gm-Message-State: ALoCoQlSzEwxMBzhlfqJrrdvsURTdrE34IjFwOMr/c5i3c6zbWM9k4JfAsKIjA3Y4GeH+fyp39Hh X-Received: by 10.152.43.50 with SMTP id t18mr9929lal.8.1417301011570; Sat, 29 Nov 2014 14:43:31 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.72 with SMTP id b8ls1131361laf.2.gmail; Sat, 29 Nov 2014 14:43:31 -0800 (PST) X-Received: by 10.112.141.233 with SMTP id rr9mr50403607lbb.1.1417301011423; Sat, 29 Nov 2014 14:43:31 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id u9si6342679laj.89.2014.11.29.14.43.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 29 Nov 2014 14:43:31 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id f15so7644408lbj.27 for ; Sat, 29 Nov 2014 14:43:31 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr49151274lbc.66.1417301011074; Sat, 29 Nov 2014 14:43:31 -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 ew9csp80214lbc; Sat, 29 Nov 2014 14:43:30 -0800 (PST) X-Received: by 10.229.49.69 with SMTP id u5mr72988662qcf.19.1417301009878; Sat, 29 Nov 2014 14:43:29 -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 y9si15968938qad.90.2014.11.29.14.43.29 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 29 Nov 2014 14:43:29 -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 1Xuqjf-0006p9-Jh; Sat, 29 Nov 2014 22:43:27 +0000 Received: from mail-lb0-f175.google.com ([209.85.217.175]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XuqjO-0006eP-Jj for lng-odp@lists.linaro.org; Sat, 29 Nov 2014 22:43:10 +0000 Received: by mail-lb0-f175.google.com with SMTP id u10so6797901lbd.20 for ; Sat, 29 Nov 2014 14:43:05 -0800 (PST) X-Received: by 10.152.7.71 with SMTP id h7mr48689777laa.68.1417300984982; Sat, 29 Nov 2014 14:43:04 -0800 (PST) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id q9sm3541711lah.12.2014.11.29.14.43.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Nov 2014 14:43:04 -0800 (PST) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Sat, 29 Nov 2014 23:42:58 +0100 Message-Id: <1417300979-6248-4-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1417300979-6248-1-git-send-email-anders.roxell@linaro.org> References: <1417300979-6248-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 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.182 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}