5 Commits

Author SHA1 Message Date
Chris Packham
40c7e23be8 m4/ctng_python.m4: Fix library check
Some checks failed
CI / crosstool (macos-13) (push) Has been cancelled
CI / crosstool (ubuntu-22.04) (push) Has been cancelled
CI / tarballs (ubuntu-22.04) (push) Has been cancelled
CI / toolchains (push) Has been cancelled
There is subtle difference between our CTNG_PYTHON and the AX_PYTHON on
which it is based. The latter uses AC_CHECK_PROGS() which sets
PYTHON_BIN to the name of the executable. We use AC_PATH_PROGS() which
sets PYTHON_BIN to the full path of the executable.

Because the name of the executable is the same as the library AX_PYTHON
uses this when looking for the library with AC_CHECK_LIB() which magics
itself into a linker flag like `-lpython3.11` but our version ends up
with a nonsensical `-l/usr/bin/python3.11` so the check fails and we
keep iterating repeating the same wrong check for every tested python
version.

We can't just switch to using AC_CHECK_PROGS() because we do want to use
the variable set by AC_PATH_PROGS() to set the full path in paths.sh.
Ultimately we could probably switch to using the upstream AX_PYTHON
macro (https://www.gnu.org/software/autoconf-archive/ax_python.html) and
figure out a better way of getting the full path of the exectuable but
for now add an extra AC_CHECK_PROGS() to set a different variable and
use that for AC_CHECK_LIB().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2025-01-23 13:06:22 +13:00
Chris Packham
93f5bc7ad3 m4/ctng_python.m4: Update for python3.13
Add python3.13 to the list of possible versions.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2025-01-23 13:06:22 +13:00
Chris Packham
4cbd409508 m4/ctng_python.m4: Use AC_PATH_PROGS for full path
We use the information from various configure time checks to populate
paths.sh. The paths used are all absolute except for the python binary.
In the switch to a more comprehensive check for python by commit
fa05153e ("Make checking for python more predictable.") we ended up
using AC_CHECK_PROGS which checks for the program on the path and sets
the variable to the name of the program. This makes python inconsistent
with the other programs and  seems to cause problems for MSYS2.  Use
AC_PATH_PROGS instead which does the same check but sets the variable to
the absolute name of the program

Fixes #2047
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-11-02 20:48:53 +13:00
Chris Packham
59cc1a172a m4/ctng_python.m4: Fix up URL
Seems to be the victim of an overzealous search and replace.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-11-02 20:48:53 +13:00
Bryan Hundven
fa05153eba Make checking for python more predictable.
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2023-03-16 16:54:05 +13:00