From patchwork Fri Feb 19 02:57:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 8355761 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 290C3C0553 for ; Fri, 19 Feb 2016 03:00:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 53AED203EC for ; Fri, 19 Feb 2016 03:00:18 +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 6C395203E6 for ; Fri, 19 Feb 2016 03:00:17 +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 1aWbG2-00030B-Bj; Fri, 19 Feb 2016 02:57:26 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWbG0-0002z2-Qf for xen-devel@lists.xen.org; Fri, 19 Feb 2016 02:57:24 +0000 Received: from [85.158.137.68] by server-16.bemta-3.messagelabs.com id 5C/BD-07451-39486C65; Fri, 19 Feb 2016 02:57:23 +0000 X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-3.tower-31.messagelabs.com!1455850642!23506954!1 X-Originating-IP: [209.85.160.169] 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 14537 invoked from network); 19 Feb 2016 02:57:23 -0000 Received: from mail-yk0-f169.google.com (HELO mail-yk0-f169.google.com) (209.85.160.169) by server-3.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 19 Feb 2016 02:57:23 -0000 Received: by mail-yk0-f169.google.com with SMTP id z7so29844120yka.3 for ; Thu, 18 Feb 2016 18:57:23 -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=uDO4AnJGsvSZTAukA0zYv7RVKTQsqx/g6jAV69VFt5M=; b=S3yqKc98qNp8qYHO5vFHWZNYuMAI61SV8HO3+HJN4Db9Etz67E4x1cWoXGc9ZPJsUI 6K3uerkp65To0IFcFsHlIsWpsXCNMgJdHZ63vbjG5FA/gn3ZFw711+E53mdFPa3p+Hum ppilVYci/1QgCtG77wro+xx6e6fdsqzbel/O8= 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=uDO4AnJGsvSZTAukA0zYv7RVKTQsqx/g6jAV69VFt5M=; b=FDmTne/aTfqRdrTJI9N//Ga+olzmMjTTJ5dKUgP2lW/ChB89W19Y2zhYNIUoKfRTWd WIlHdhRJBhXslNPqLg/fHHO2Y3hAzmTq54vZfrPWnmB7KvjRLX7W61KsEm+EMhwK3haA jnXdFaALzcrZ04Lnhs1xDwJFECG7dNqHQn8d7wHz9p2cZj3l+x/FOTiWmV6cRkWkhhPC LZPd83jq2TegOg7KmUAJzRGeSiolgeoWc8CtCRu/c5kBy0SueJ4FySfEW9oVWNH1nkv7 R+TDGDb/BJxcUl92uKKuuGN0WtTfkdeAeAqTlqNgxgCEI4LDx1HkFM/sCJoGMJ1QqHrp E5Cg== X-Gm-Message-State: AG10YOTOjEec3wGP/NB3PUEtcZuqez4r4m6ANKOIAaI+qxSHhnRkqX9Qc/XR32rXN4NMSA== X-Received: by 10.37.99.84 with SMTP id x81mr6717534ybb.8.1455850642268; Thu, 18 Feb 2016 18:57:22 -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 h131sm7083124ywb.25.2016.02.18.18.57.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Feb 2016 18:57:21 -0800 (PST) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Thu, 18 Feb 2016 20:57:04 -0600 Message-Id: <1455850625-9624-3-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1455850625-9624-1-git-send-email-cardoe@cardoe.com> References: <1455850625-9624-1-git-send-email-cardoe@cardoe.com> Cc: Ian Jackson , Wei Liu , Doug Goldstein , Ian Campbell , Stefano Stabellini Subject: [Xen-devel] [PATCH v2 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 Acked-by: Ian Jackson --- CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu change since v1: - don't screw up the white space --- 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..05ea4ef 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 ])