From patchwork Fri Aug 7 11:00:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 52024 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 5D52722EAD for ; Fri, 7 Aug 2015 11:02:15 +0000 (UTC) Received: by lbbnr7 with SMTP id nr7sf33238968lbb.2 for ; Fri, 07 Aug 2015 04:02:14 -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=Rxno4Iiq6takiVCj5nbKnwYn2m3TsDM7BH/0MWyTge4=; b=kXwpVAZ34uoA46SuidpjHyGPCZCwXxKpqfSwMLOnQTVtLfljFrMzdFrME2fHsXEnl5 vTuTSKabCqrxFfV14wyWqdzPq8UjNgxjCiXXNW1PdXVLaqqfO7hh0qM0U24+McwgBUtb RH95M9w9eTekzrcon7LwZxMBxeJriWZHt0cmbVRrq123xQqlEfEOJ8RuQDwY9F1jPUJ0 ykkf5UEnnYTTaewF7dMYjbnUTSu1I4I0vioRB+KFqdA04/ni9YuOCjWIcr+CpqyVN4Mf kAiegoGcqcSjDem4GObeoA7yeoHiNSJ9vqvcgxV9NJCtbjF0hwrawxXzpInrw/u8Ct5M B6iw== X-Gm-Message-State: ALoCoQk+YenIi+sPqx/KeuvRn068If6OVU7U+XbwcqcEunblAxvZ8SQuXLGdMaJTS9+EJmhiv//b X-Received: by 10.194.19.33 with SMTP id b1mr1965668wje.6.1438945334349; Fri, 07 Aug 2015 04:02:14 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.108 with SMTP id ud12ls456806lac.43.gmail; Fri, 07 Aug 2015 04:02:14 -0700 (PDT) X-Received: by 10.112.149.164 with SMTP id ub4mr6924562lbb.65.1438945334051; Fri, 07 Aug 2015 04:02:14 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id b1si7162294lbd.146.2015.08.07.04.02.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Aug 2015 04:02:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by labjt7 with SMTP id jt7so47901120lab.0 for ; Fri, 07 Aug 2015 04:02:14 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr7101340lbc.32.1438945333833; Fri, 07 Aug 2015 04:02:13 -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 l6csp292127lba; Fri, 7 Aug 2015 04:02:12 -0700 (PDT) X-Received: by 10.55.22.16 with SMTP id g16mr6007712qkh.87.1438945332410; Fri, 07 Aug 2015 04:02:12 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m89si17337363qge.4.2015.08.07.04.02.10; Fri, 07 Aug 2015 04:02:12 -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 64FF062162; Fri, 7 Aug 2015 11:02:10 +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 AD7B962181; Fri, 7 Aug 2015 11:01:15 +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 B8F7862162; Fri, 7 Aug 2015 11:01:11 +0000 (UTC) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by lists.linaro.org (Postfix) with ESMTPS id 0A1D8620A8 for ; Fri, 7 Aug 2015 11:01:10 +0000 (UTC) Received: by wicne3 with SMTP id ne3so55837430wic.1 for ; Fri, 07 Aug 2015 04:01:09 -0700 (PDT) X-Received: by 10.180.74.115 with SMTP id s19mr5061214wiv.18.1438945269258; Fri, 07 Aug 2015 04:01:09 -0700 (PDT) Received: from localhost.localdomain ([87.120.178.39]) by smtp.gmail.com with ESMTPSA id bu12sm14078755wjb.44.2015.08.07.04.01.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Aug 2015 04:01:08 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 7 Aug 2015 14:00:57 +0300 Message-Id: <1438945258-12898-3-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 2/3] linux-generic: move pthread 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.54 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: Maxim Uvarov --- configure.ac | 16 ---------------- platform/linux-generic/m4/configure.m4 | 2 ++ platform/linux-generic/m4/odp_pthread.m4 | 13 +++++++++++++ 3 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 platform/linux-generic/m4/odp_pthread.m4 diff --git a/configure.ac b/configure.ac index a994080..41646b9 100644 --- a/configure.ac +++ b/configure.ac @@ -153,8 +153,6 @@ AC_ARG_ENABLE([test-helper], AM_CONDITIONAL([test_helper], [test x$test_helper = xyes ]) ########################################################################## - -########################################################################## # Enable/disable test-cpp ########################################################################## test_cpp=no @@ -202,18 +200,6 @@ AC_ARG_ENABLE([debug], ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG" ########################################################################## -# Check for pthreads availability -########################################################################## - -AX_PTHREAD([CC="$PTHREAD_CC"], [ - echo "Error! We require pthreads to be available" - exit -1 - ]) -LIBS="$PTHREAD_LIBS $LIBS" -AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS" -AM_LDFLAGS="$AM_LDFLAGS $PTHREAD_LDFLAGS" - -########################################################################## # Check for doxygen availability ########################################################################## AC_CHECK_PROGS([DOXYGEN], [doxygen]) @@ -330,8 +316,6 @@ AC_SEARCH_LIBS([timer_create],[rt posix4]) ########################################################################## # distribute the changed variables among the Makefiles -AM_LDFLAGS="$AM_LDFLAGS -pthread -lrt" - AC_SUBST([LIBS]) AC_SUBST([AM_CPPFLAGS]) AC_SUBST([CPPFLAGS]) diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index bb92198..ddac90e 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_pthread.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_pthread.m4 b/platform/linux-generic/m4/odp_pthread.m4 new file mode 100644 index 0000000..7f39103 --- /dev/null +++ b/platform/linux-generic/m4/odp_pthread.m4 @@ -0,0 +1,13 @@ +########################################################################## +# Check for pthreads availability +########################################################################## + +AX_PTHREAD([CC="$PTHREAD_CC"], [ + echo "Error! We require pthreads to be available" + exit -1 + ]) +LIBS="$PTHREAD_LIBS $LIBS" +AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS" +AM_LDFLAGS="$AM_LDFLAGS $PTHREAD_LDFLAGS" + +AM_LDFLAGS="$AM_LDFLAGS -pthread -lrt"