From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74734 invoked by alias); 24 Oct 2019 13:44:23 -0000 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 Received: (qmail 74726 invoked by uid 89); 24 Oct 2019 13:44:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Oct 2019 13:44:20 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 116471E478; Thu, 24 Oct 2019 09:44:18 -0400 (EDT) Subject: Re: [review] Simplify Python checks in configure.ac To: cbiesinger@google.com, gdb-patches@sourceware.org, "Christian Biesinger (Code Review)" References: From: Simon Marchi Message-ID: <647f51cd-43d5-abb4-d23a-36e3760ffc63@simark.ca> Date: Thu, 24 Oct 2019 13:44:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-10/txt/msg00875.txt.bz2 On 2019-10-23 6:04 p.m., Christian Biesinger (Code Review) wrote: > Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/241 > ...................................................................... > > Simplify Python checks in configure.ac > > The version checking code is not necessary. It is only used to define > HAVE_LIBPYTHON2_6 or HAVE_LIBPYTHON2_7, which is not used anywhere. > > If a version check is desired, the PY_{MAJOR,MINOR}_VERSION macro from > the Python headers can be (and is) used, which does not require updating > configure.ac whenever a new Python version is released. This is a test comment in the commit message. > diff --git a/gdb/configure.ac b/gdb/configure.ac > index d929b89..f11dccd 100644 > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -691,19 +691,17 @@ > # --------------------- # > > dnl Utility to simplify finding libpython. > -dnl $1 = pythonX.Y > -dnl $2 = the shell variable to assign the result to > +dnl $1 = the shell variable to assign the result to > dnl If libpython is found we store $version here. > -dnl $3 = additional flags to add to CPPFLAGS > -dnl $4 = additional flags to add to LIBS > +dnl $2 = additional flags to add to CPPFLAGS > +dnl $3 = additional flags to add to LIBS > > AC_DEFUN([AC_TRY_LIBPYTHON], > [ > - version=$1 > - define([have_libpython_var],$2) > - new_CPPFLAGS=$3 > - new_LIBS=$4 > - AC_MSG_CHECKING([for ${version}]) > + define([have_libpython_var],$1) > + new_CPPFLAGS=$2 > + new_LIBS=$3 > + AC_MSG_CHECKING([for python]) This is a test comment in configure.ac. Simon