It exists as python3.13-config (or whatever the minor version currently
is) in sysroot-cross directory.

Fixes the following error in libgpiod prepare stage:

  checking for python3-config... false
  configure: error: python3-config not found - needed for python bindings

However, python3-config isn't used at all to build the Python bindings
and ac_cv_prog_has_python_config could be set to any value except
"false" to fix the error.

Signed-off-by: Markus Heidelberg <[email protected]>
---

> So it would probably be better to just remove the python3-config check.
> I'll submit a patch upstream and when accepted submit it to PTXdist.

I submitted a patch upstream, but decided for the
ac_cv_prog_has_python_config solution for PTXdist.
It is less intrusive (no recreation of configure script necessary) and
avoids a new dependency HOST_AUTOTOOLS_AUTOCONF_ARCHIVE because of this
in configure.ac:

    # This needs autoconf-archive
    AX_CXX_COMPILE_STDCXX_17([ext], [mandatory])

 rules/libgpiod.make | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/rules/libgpiod.make b/rules/libgpiod.make
index a77acf146..6272333b5 100644
--- a/rules/libgpiod.make
+++ b/rules/libgpiod.make
@@ -51,7 +51,9 @@ LIBGPIOD_CONF_OPT     := \
 
 LIBGPIOD_CONF_ENV := \
        $(CROSS_ENV) \
-       $(if $(PTXCONF_LIBGPIOD_PYTHON3), ac_cv_path_PYTHON=$(CROSS_PYTHON3))
+       $(if $(PTXCONF_LIBGPIOD_PYTHON3), \
+               ac_cv_path_PYTHON=$(CROSS_PYTHON3) \
+               ac_cv_prog_has_python_config=python$(PYTHON3_MAJORMINOR)-config)
 
 LIBGPIOD_LDFLAGS:= -Wl,-rpath-link,$(LIBGPIOD_DIR)/lib/.libs
 
-- 
2.43.0


Reply via email to