From patchwork Mon Nov 24 16:01:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 41412 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C03D824524 for ; Mon, 24 Nov 2014 16:02:10 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf2193755wib.10 for ; Mon, 24 Nov 2014 08:02:10 -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=ZdmaAakWT2qndxJv0tkVAESn4lfhiuMxcISkRgL4F2g=; b=QcHqFwPWG8waNOj/tpzrmJc6nVNLD8/PjCHXpmUCYFZOASkrhhzvsROSXRrHElvOag tRPytpfjXSGNdBguZC6sPprCDxE29j00laoxMAmtgxJRrouSkYcJBZcGi0ybuAPG7xbt CLttlbH0bQlrk2pPb1KrCG1LDNW0Z99+vB6cFSzVzpLfrMf8BVv/6Icx/S6PzWyG8z1X dvsKT+RGsFRDJmaKZ44IUCygsQKAUsA+fuGcLLBmamRFotJ2fEXHV75sMDTXAOf0AadA 4yUwIMvBBN7B2wWpjxu9qxNqUIQzDri7yRqidC/+5c0Jdz0CiHnIvuCgXPRcQLyrZG6r GUJw== X-Gm-Message-State: ALoCoQmPC4G59xXhTfneeoqUEZxPMKWJMfQX6u/m06Jw+v/RHyhcALtEILYgqITdAJqzHHKaDQ8Y X-Received: by 10.152.18.136 with SMTP id w8mr897072lad.5.1416844930017; Mon, 24 Nov 2014 08:02:10 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.39 with SMTP id f7ls425590lab.75.gmail; Mon, 24 Nov 2014 08:02:09 -0800 (PST) X-Received: by 10.112.167.130 with SMTP id zo2mr21293743lbb.4.1416844929703; Mon, 24 Nov 2014 08:02:09 -0800 (PST) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id ob4si15661197lbb.40.2014.11.24.08.02.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Nov 2014 08:02:09 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id pv20so7828620lab.37 for ; Mon, 24 Nov 2014 08:02:09 -0800 (PST) X-Received: by 10.112.38.4 with SMTP id c4mr5519648lbk.46.1416844929621; Mon, 24 Nov 2014 08:02:09 -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 ew9csp280385lbc; Mon, 24 Nov 2014 08:02:08 -0800 (PST) X-Received: by 10.224.29.196 with SMTP id r4mr30316875qac.12.1416844927997; Mon, 24 Nov 2014 08:02:07 -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 c12si15881238qae.103.2014.11.24.08.02.07 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 24 Nov 2014 08:02:07 -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 1Xsw5V-0006YH-Cj; Mon, 24 Nov 2014 16:02:05 +0000 Received: from mail-lb0-f174.google.com ([209.85.217.174]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xsw5G-0006XF-GJ for lng-odp@lists.linaro.org; Mon, 24 Nov 2014 16:01:50 +0000 Received: by mail-lb0-f174.google.com with SMTP id w7so7773931lbi.33 for ; Mon, 24 Nov 2014 08:01:44 -0800 (PST) X-Received: by 10.112.24.130 with SMTP id u2mr21183691lbf.57.1416844904887; Mon, 24 Nov 2014 08:01:44 -0800 (PST) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id q6sm2053032lag.35.2014.11.24.08.01.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 08:01:44 -0800 (PST) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Mon, 24 Nov 2014 17:01:36 +0100 Message-Id: <1416844898-12631-3-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 2/4] configure: cleanup OpenSSL configuration 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.215.50 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 Always check OpenSSL dependency Signed-off-by: Anders Roxell --- configure.ac | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 3752f3d..acd0060 100644 --- a/configure.ac +++ b/configure.ac @@ -126,21 +126,37 @@ if test -z "$DOXYGEN"; fi ########################################################################## -# Check for openssl availability +# Set optional OpenSSL path ########################################################################## - AC_ARG_WITH([openssl-path], AC_HELP_STRING([--with-openssl-path=DIR Path to openssl libs and headers], [(or in the default path if not specified).]), -[OPENSSL_PATH=$withval -AM_CFLAGS="$AM_CFLAGS -I$OPENSSL_PATH/include" -AM_LDFLAGS="$AM_LDFLAGS -L$OPENSSL_PATH/lib -lcrypto" -],[ + [OPENSSL_PATH=$withval + AM_CFLAGS="$AM_CFLAGS -I$OPENSSL_PATH/include" + AM_LDFLAGS="$AM_LDFLAGS -L$OPENSSL_PATH/lib" + ],[AC_MSG_RESULT([no])]) + +########################################################################## +# Save and set temporary compilation flags +########################################################################## +OLD_LDFLAGS=$LDFLAGS +OLD_CFLAGS=$CFLAGS +LDFLAGS="$AM_LDFLAGS $LDFLAGS" +CFLAGS="$AM_CFLAGS $CFLAGS" + +########################################################################## +# Check for OpenSSL availability +########################################################################## AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], - [AC_MSG_FAILURE([can't find openssl crypto lib])]) + [AC_MSG_FAILURE([OpenSSL libraries required])]) AC_CHECK_HEADERS([openssl/des.h openssl/rand.h openssl/hmac.h openssl/evp.h], [], - [AC_MSG_FAILURE([can't find openssl crypto headers])]) - ]) + [AC_MSG_ERROR([OpenSSL headers required])]) + +########################################################################## +# Restore old saved variables +########################################################################## +LDFLAGS=$OLD_LDFLAGS +CFLAGS=$OLD_CFLAGS ########################################################################## # Default warning setup