From patchwork Fri Aug 7 11:00:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 52025 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 patches.linaro.org (Postfix) with ESMTPS id 1CE6C22EAD for ; Fri, 7 Aug 2015 11:02:52 +0000 (UTC) Received: by wilj18 with SMTP id j18sf15880385wil.0 for ; Fri, 07 Aug 2015 04:02:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to: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=Ms6PZQnz/H1klt3D50ytVnt9UIJ8IF61RQv11eeycB8=; b=KY5y3nxiMlvYGsE4+6iV5Tkk+/FB3jAQtkLfl7g6nu0ZXiJRolS5YXA1fyknW3i1CO h2m0JVIXpIMEhoWhHxyMmWa9XDR79lIk4oNNdOOcSg+8aCxZqynBBN8PPYWzZqcbW3/L /6lMfFdMg1+6m+o/FsJGlDKxtnbcYQLJIqg1YHQbLmIxPGhnajafp+6pl8E+BPsYAaQb QgcJkQa+zkkK71Zs6sniycMlxWIrWl19lxJB4IWEV5xUO9t61ncMr4ctYpiO8c4jSg+j fTNaRhTffdx07Npl58w/ReZohgRw6WgIhsKkO8tIT6ru3pjRmjc5SQ9p56uu2ClQysEO nG0Q== X-Gm-Message-State: ALoCoQlQO5Ewf+0OGqWXIiOG+QAGVhGzl9gTU/R3bMulqxmDlRUOWTHI5g7MT7SJf5F6g05H9Nga X-Received: by 10.112.119.166 with SMTP id kv6mr929341lbb.3.1438945371327; Fri, 07 Aug 2015 04:02:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.224.129 with SMTP id rc1ls430823lac.25.gmail; Fri, 07 Aug 2015 04:02:51 -0700 (PDT) X-Received: by 10.112.35.229 with SMTP id l5mr7107817lbj.0.1438945371174; Fri, 07 Aug 2015 04:02:51 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id s9si3875754lal.150.2015.08.07.04.02.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Aug 2015 04:02:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lagz9 with SMTP id z9so19921455lag.3 for ; Fri, 07 Aug 2015 04:02:50 -0700 (PDT) X-Received: by 10.152.22.133 with SMTP id d5mr534852laf.112.1438945370744; Fri, 07 Aug 2015 04:02:50 -0700 (PDT) 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.7.198 with SMTP id l6csp292567lba; Fri, 7 Aug 2015 04:02:49 -0700 (PDT) X-Received: by 10.140.133.8 with SMTP id 8mr12574127qhf.51.1438945369056; Fri, 07 Aug 2015 04:02:49 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g32si807960qgg.124.2015.08.07.04.02.48; Fri, 07 Aug 2015 04:02:49 -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; Received: by lists.linaro.org (Postfix, from userid 109) id 51DD662113; Fri, 7 Aug 2015 11:02:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal 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 ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 4D9F06218F; Fri, 7 Aug 2015 11:01:45 +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 DAE4F621A1; Fri, 7 Aug 2015 11:01:39 +0000 (UTC) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by lists.linaro.org (Postfix) with ESMTPS id EF0C7620A8 for ; Fri, 7 Aug 2015 11:01:11 +0000 (UTC) Received: by wibxm9 with SMTP id xm9so60881479wib.1 for ; Fri, 07 Aug 2015 04:01:11 -0700 (PDT) X-Received: by 10.180.187.193 with SMTP id fu1mr5307309wic.75.1438945271185; Fri, 07 Aug 2015 04:01:11 -0700 (PDT) Received: from localhost.localdomain ([87.120.178.39]) by smtp.gmail.com with ESMTPSA id bu12sm14078755wjb.44.2015.08.07.04.01.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Aug 2015 04:01:10 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 7 Aug 2015 14:00:58 +0300 Message-Id: <1438945258-12898-4-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438945258-12898-1-git-send-email-maxim.uvarov@linaro.org> References: <1438945258-12898-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 3/3] linux-generic: move openssl checks inside linux-generic X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 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" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@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.47 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 openssl is not requirement for other platform. Signed-off-by: Maxim Uvarov --- configure.ac | 19 ------------------- platform/linux-generic/m4/configure.m4 | 1 + platform/linux-generic/m4/odp_openssl.m4 | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 19 deletions(-) create mode 100644 platform/linux-generic/m4/odp_openssl.m4 diff --git a/configure.ac b/configure.ac index 41646b9..0ebc627 100644 --- a/configure.ac +++ b/configure.ac @@ -210,17 +210,6 @@ fi AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"]) ########################################################################## -# 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_CPPFLAGS="$AM_CPPFLAGS -I$OPENSSL_PATH/include" - AM_LDFLAGS="$AM_LDFLAGS -L$OPENSSL_PATH/lib" - ],[]) - -########################################################################## # Save and set temporary compilation flags ########################################################################## OLD_LDFLAGS=$LDFLAGS @@ -244,14 +233,6 @@ fi AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ]) ########################################################################## -# Check for OpenSSL availability -########################################################################## -AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], - [AC_MSG_FAILURE([OpenSSL libraries required])]) -AC_CHECK_HEADERS([openssl/des.h openssl/rand.h openssl/hmac.h openssl/evp.h], [], - [AC_MSG_ERROR([OpenSSL headers required])]) - -########################################################################## # Restore old saved variables ########################################################################## LDFLAGS=$OLD_LDFLAGS diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index ddac90e..9658274 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -17,6 +17,7 @@ AC_LINK_IFELSE( exit -1) m4_include([platform/linux-generic/m4/odp_pthread.m4]) +m4_include([platform/linux-generic/m4/odp_openssl.m4]) AC_CONFIG_FILES([platform/linux-generic/Makefile platform/linux-generic/test/Makefile diff --git a/platform/linux-generic/m4/odp_openssl.m4 b/platform/linux-generic/m4/odp_openssl.m4 new file mode 100644 index 0000000..2344914 --- /dev/null +++ b/platform/linux-generic/m4/odp_openssl.m4 @@ -0,0 +1,32 @@ +########################################################################## +# 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_CPPFLAGS="$AM_CPPFLAGS -I$OPENSSL_PATH/include" + AM_LDFLAGS="$AM_LDFLAGS -L$OPENSSL_PATH/lib" + ],[]) + +########################################################################## +# Save and set temporary compilation flags +########################################################################## +OLD_LDFLAGS=$LDFLAGS +OLD_CPPFLAGS=$CPPFLAGS +LDFLAGS="$AM_LDFLAGS $LDFLAGS" +CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" + +########################################################################## +# Check for OpenSSL availability +########################################################################## +AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], + [AC_MSG_FAILURE([OpenSSL libraries required])]) +AC_CHECK_HEADERS([openssl/des.h openssl/rand.h openssl/hmac.h openssl/evp.h], [], + [AC_MSG_ERROR([OpenSSL headers required])]) + +########################################################################## +# Restore old saved variables +########################################################################## +LDFLAGS=$OLD_LDFLAGS +CPPFLAGS=$OLD_CPPFLAGS