From patchwork Thu Feb 18 21:22:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 8354701 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9A7DC9F727 for ; Thu, 18 Feb 2016 21:25:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1EE992020F for ; Thu, 18 Feb 2016 21:25:34 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 910FD203A0 for ; Thu, 18 Feb 2016 21:25:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWW2B-00042a-JV; Thu, 18 Feb 2016 21:22:47 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWW2A-00042U-0e for xen-devel@lists.xen.org; Thu, 18 Feb 2016 21:22:46 +0000 Received: from [85.158.139.211] by server-15.bemta-5.messagelabs.com id FF/6F-02989-52636C65; Thu, 18 Feb 2016 21:22:45 +0000 X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-10.tower-206.messagelabs.com!1455830563!23400172!1 X-Originating-IP: [209.85.161.174] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 20728 invoked from network); 18 Feb 2016 21:22:44 -0000 Received: from mail-yw0-f174.google.com (HELO mail-yw0-f174.google.com) (209.85.161.174) by server-10.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 18 Feb 2016 21:22:44 -0000 Received: by mail-yw0-f174.google.com with SMTP id g127so51911971ywf.2 for ; Thu, 18 Feb 2016 13:22:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cardoe.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4xOTGOi9RwbnvCZIunOEznIIF10ZPRDTyW+3fKdpxeo=; b=RXN5W4bNARUSvqAc0qHSxHXKHdqZj9PH8KFTRAfwiiabroyjfayD/1TnA7woXdl87D PsXu2RQ2nSFAPA1YMmXTb0LicKdehXRDtf+rjqAHwi3yThzLORLik8ad+XHaxv6Kbqi2 ybmvxPV17REdTrpsT8pp2xl37vud9/J8TVSMA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4xOTGOi9RwbnvCZIunOEznIIF10ZPRDTyW+3fKdpxeo=; b=M0/BggScJ5C9fqdZMdwnqDhua+ewYsgEfgcgjdZPquzRjavJep7NLv8CycGHvxQIG+ cqBuNnuV4TPbe6d5Ty2Jlr7FycLatkhokukdNXznjpdD3gpWl9iplqOcpF0bCWqI6sAr ZnbBk1oH4gli/ol22Ng4Igtq++36nz8kv7nlqA8cUAtlLoS8PLoJVKRpRJso8ILU+LO2 JLl098/1H08H/JD49u+uh1EBPcePQGQa/2h109iZNcoaQZs9GXDSvfd9iToE0wBp2a4I I3jotaFLG6+uar0X6HC6CdWLTz205MOQHV7CUR/0J3LW36EUAU+hskrFVdPQKaLg5vIB 9eAQ== X-Gm-Message-State: AG10YOTRuooklLfxFoXmhybXx9r2Y78CTmjfIbly2fs8Ss2JW2xETuO+T9cSZ75Zo44PJA== X-Received: by 10.129.82.77 with SMTP id g74mr5851791ywb.219.1455830563654; Thu, 18 Feb 2016 13:22:43 -0800 (PST) Received: from swanson.lan (c-68-46-196-185.hsd1.al.comcast.net. [68.46.196.185]) by smtp.gmail.com with ESMTPSA id z7sm6067633ywf.7.2016.02.18.13.22.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Feb 2016 13:22:42 -0800 (PST) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Thu, 18 Feb 2016 15:22:24 -0600 Message-Id: <1455830545-848-3-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1455830545-848-1-git-send-email-cardoe@cardoe.com> References: <1455830545-848-1-git-send-email-cardoe@cardoe.com> Cc: Ian Jackson , Wei Liu , Doug Goldstein , Ian Campbell , Stefano Stabellini Subject: [Xen-devel] [PATCH 3/4] m4/python: fix checks for Python library support X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP AC_CHECK_LIB() was running gcc -Llib -lm -lutils conftest.c which on platforms that do as needed operations by default will result in underlinking. Instead AC_CHECK_LIB() suggests supplying the extra libraries necessary in a 5th argument. Signed-off-by: Doug Goldstein --- CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu --- m4/python_devel.m4 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/m4/python_devel.m4 b/m4/python_devel.m4 index deff19e..6aaed4e 100644 --- a/m4/python_devel.m4 +++ b/m4/python_devel.m4 @@ -10,9 +10,9 @@ AS_IF([test x"$pyconfig" = x"no"], [ print "-I" + distutils.sysconfig.get_config_var("INCLUDEPY")'`" CPPFLAGS="$CPPFLAGS `$PYTHON -c 'import distutils.sysconfig; \ print distutils.sysconfig.get_config_var("CFLAGS")'`" - LDFLAGS="$LDFLAGS `$PYTHON -c 'import distutils.sysconfig; \ + PYTHON_LIBS="$LDFLAGS `$PYTHON -c 'import distutils.sysconfig; \ print distutils.sysconfig.get_config_var("LIBS")'`" - LDFLAGS="$LDFLAGS `$PYTHON -c 'import distutils.sysconfig; \ + PYTHON_LIBS="$LDFLAGS `$PYTHON -c 'import distutils.sysconfig; \ print distutils.sysconfig.get_config_var("SYSLIBS")'`" LDFLAGS="$LDFLAGS `$PYTHON -c 'import distutils.sysconfig; \ print "-L" + distutils.sysconfig.get_python_lib(plat_specific=1,\ @@ -25,12 +25,14 @@ AS_IF([test x"$pyconfig" = x"no"], [ dnl If python-config is found use it CPPFLAGS="$CFLAGS `$PYTHON-config --cflags`" LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags`" + PYTHON_LIBS="$LIBS `$PYTHON-config --libs`" ]) AC_CHECK_HEADER([Python.h], [], [AC_MSG_ERROR([Unable to find Python development headers])],) AC_CHECK_LIB(python$ac_python_version, PyArg_ParseTuple, [], - [AC_MSG_ERROR([Unable to find a suitable python development library])]) + [AC_MSG_ERROR([Unable to find a suitable python development library])], + [$PYTHON_LIBS]) CPPFLAGS=$ac_previous_cppflags LDFLAGS=$ac_previous_ldflags ])