From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13086 invoked by alias); 21 Dec 2012 17:31:00 -0000 Received: (qmail 12998 invoked by uid 22791); 21 Dec 2012 17:30:58 -0000 X-SWARE-Spam-Status: No, hits=-5.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-ob0-f180.google.com (HELO mail-ob0-f180.google.com) (209.85.214.180) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Dec 2012 17:30:48 +0000 Received: by mail-ob0-f180.google.com with SMTP id wd20so4700799obb.25 for ; Fri, 21 Dec 2012 09:30:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=oClHNZ9DG41dBSEg0lTyO+cGoxOgX68WkjRfgcKCEio=; b=iAjcoEM2N0bcfaMY8ZcAR9BndMpP27qfCgRMrV/9nXyn5i7fYRCKYRmfRXAWkD8pcc WiGJnQ82JoUq+MxaIJBJAWwcXYlLT8l5kjCx46tWU+K+TUDxzgIMzFya0b6V2S2QR1ru KHsfVbsQikjvfCgGe+az0FNnHT8A2kBOu8smW5zivtf2e3lOU5k2bhKbjCx1uMbkm0Lz 9KHz9b4MKbhPTbeB5t/JDuN9d/x6Lab4g+5plOwr/po1IlersQ/U1YNg8hUxBUoy50Hk w5EqhrFlwt+3a3NWgHfn3R4xgVTfSicQRkZ5jSlzFXz5jbtTqk0mCbErKConNohCUuL6 AIkA== MIME-Version: 1.0 Received: by 10.182.192.106 with SMTP id hf10mr11792369obc.22.1356111047743; Fri, 21 Dec 2012 09:30:47 -0800 (PST) Received: by 10.76.169.202 with HTTP; Fri, 21 Dec 2012 09:30:47 -0800 (PST) In-Reply-To: <20121221075721.GE5370@adacore.com> References: <50D331A6.5070102@ubuntu.com> <50D3321C.5030902@ubuntu.com> <20121220155906.GB5370@adacore.com> <50D3391A.4000506@ubuntu.com> <20121221075721.GE5370@adacore.com> Date: Fri, 21 Dec 2012 17:31:00 -0000 Message-ID: Subject: Re: [patch] use python-config if available From: Doug Evans To: Joel Brobecker Cc: Matthias Klose , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQla4QyMWX2ON5KABNgARgIQxc0mogKJZ/59H27tX4AI7hmt+1xdrbSq94iEs4KQAZRWZKY3eTHB6z8VbEoiWJvq4IHk3yqR1yMkFbq5DolHFsW+tOtyB6QJupGt0wHLeXiyra1gWQtoeyeyYnkqs/iL1hx/KcYCEFSChQ+rNw1osVlZHnAupumDnyU1lAOFr4gPRXEk/k4/GX0V+m0D0Pt9Gs/hoA== X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00771.txt.bz2 On Thu, Dec 20, 2012 at 11:57 PM, Joel Brobecker wrote: >> cross building in a multiarch environment, where the host libraries >> are installed, and a -python-config is shipped as part of the >> system python. This -python-config is a backport of >> http://bugs.python.org/issue16235 (not yet applied upstream). > > Ah, OK. Now I understand your problem. > >> so what is your recommendation? configure.ac reads: >> >> dnl /path/to/python/executable - >> dnl Run python-config.py with this version of python to fetch the >> dnl compilation parameters. >> dnl NOTE: This needn't be the real python executable. >> dnl In a cross-compilation scenario (build != host), this could be >> dnl a shell script that provides what python-config.py provides for >> dnl --ldflags, --includes, --exec-prefix. >> >> do I really have to provide a shell script, which shifts the first >> parameter, and then calls the real python-config? > > I think that this was the plan, yes; but Doug Evans would probably > know more, as he is the main author of this code (I only fiddled > with it). The patch is fine with me. [The plan wasn't to shift and call the "real" python-config ... at the time there was no real python-config for cross builds.] One typo: should be ${python_config} - AC_ERROR(failure running python-config --exec-prefix) + AC_ERROR(failure running ${python-config} --exec-prefix)