From patchwork Tue Aug 4 09:10:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 51907 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id AC25522E8E for ; Tue, 4 Aug 2015 09:12:40 +0000 (UTC) Received: by wibdx1 with SMTP id dx1sf4083052wib.2 for ; Tue, 04 Aug 2015 02:12:39 -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=7vIUPdY5H4FBH4RG0QEFtzoHKNTfonX5CaGwDz7PEAs=; b=OerhSw8opW1awa/l1c7Ah2He6nutBxHXyavf0GqUbZQbs9R0dqGfS9RIw4s+U5oyeY izdEbf1OiUom3J3K4Blu8i7051lyujAAJCCw9/R7n5G3i2kdst2ZkQ9nKpj0TbCLWv5w YXbpNTzHN56QUKtu+N3sj9ZeTQZhS9IjUSxuQAO4IL01R7ph3Km3gyXojbUKVGF3cICu yMycv8TLvYh53/xeha2HOqI3tbUgDB0RaX6mVJjdp6ZtuhGj//soVFvivpcZTESZwHp5 veZKCGnd7XpJkurfK4zgMuWaxyooegSiBwCTef5tQXtL2u2TFeLprVSwqhjhxPNOG1dE HDTQ== X-Gm-Message-State: ALoCoQkl8iGmCFFeBWK8tHDntA5E24BqAIR6z0A/qu+ZF2QiV4PTmeSurHQQtzyIHbCaHM1edm4C X-Received: by 10.112.218.10 with SMTP id pc10mr800882lbc.8.1438679559899; Tue, 04 Aug 2015 02:12:39 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.40 with SMTP id kv8ls16613lac.94.gmail; Tue, 04 Aug 2015 02:12:39 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr2188774lbc.112.1438679559461; Tue, 04 Aug 2015 02:12:39 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id p1si240635laj.140.2015.08.04.02.12.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Aug 2015 02:12:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by labix3 with SMTP id ix3so2855972lab.0 for ; Tue, 04 Aug 2015 02:12:39 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr2301827lbc.32.1438679559343; Tue, 04 Aug 2015 02:12:39 -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 l6csp2304133lba; Tue, 4 Aug 2015 02:12:38 -0700 (PDT) X-Received: by 10.107.15.18 with SMTP id x18mr2675736ioi.167.1438679557675; Tue, 04 Aug 2015 02:12:37 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b17si1161783iob.68.2015.08.04.02.12.36; Tue, 04 Aug 2015 02:12:37 -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 BFC8E61F69; Tue, 4 Aug 2015 09:12:36 +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 2411261F66; Tue, 4 Aug 2015 09:11:32 +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 0FBC361F52; Tue, 4 Aug 2015 09:11:29 +0000 (UTC) Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by lists.linaro.org (Postfix) with ESMTPS id E32EC61F6A for ; Tue, 4 Aug 2015 09:10:58 +0000 (UTC) Received: by wibxm9 with SMTP id xm9so14562240wib.1 for ; Tue, 04 Aug 2015 02:10:58 -0700 (PDT) X-Received: by 10.194.185.180 with SMTP id fd20mr5711899wjc.16.1438679457941; Tue, 04 Aug 2015 02:10:57 -0700 (PDT) Received: from localhost.localdomain ([87.120.178.39]) by smtp.gmail.com with ESMTPSA id fo1sm1240153wib.24.2015.08.04.02.10.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Aug 2015 02:10:57 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 4 Aug 2015 12:10:42 +0300 Message-Id: <1438679443-3047-4-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438679443-3047-1-git-send-email-maxim.uvarov@linaro.org> References: <1438679443-3047-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 3/4] 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.45 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 | 33 -------------------------------- platform/linux-generic/m4/configure.m4 | 2 ++ platform/linux-generic/m4/odp_openssl.m4 | 32 +++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 33 deletions(-) create mode 100644 platform/linux-generic/m4/odp_openssl.m4 diff --git a/configure.ac b/configure.ac index 088725f..0d246dc 100644 --- a/configure.ac +++ b/configure.ac @@ -224,25 +224,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 -OLD_CPPFLAGS=$CPPFLAGS -LDFLAGS="$AM_LDFLAGS $LDFLAGS" -CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" - -########################################################################## # Check for CUnit availability ########################################################################## if test x$cunit_support = xyes @@ -258,20 +239,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 -CPPFLAGS=$OLD_CPPFLAGS - -########################################################################## # Default warning setup ########################################################################## ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes" diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 8e6a505..22add4b 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -16,6 +16,8 @@ AC_LINK_IFELSE( echo "Use newer version. For gcc > 4.7.0" exit -1) +m4_include([platform/linux-generic/m4/odp_openssl.m4]) + AC_CONFIG_FILES([platform/linux-generic/Makefile platform/linux-generic/test/Makefile platform/linux-generic/test/pktio/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..ab31dd1 --- /dev/null +++ b/platform/linux-generic/m4/odp_openssl.m4 @@ -0,0 +1,32 @@ +########################################################################## +# Save and set temporary compilation flags +########################################################################## +OLD_LDFLAGS=$LDFLAGS +OLD_CPPFLAGS=$CPPFLAGS +LDFLAGS="$AM_LDFLAGS $LDFLAGS" +CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" + +########################################################################## +# 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" + ],[]) + +########################################################################## +# 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