This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [review] Simplify Python checks in configure.ac
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