build: fix cross-compilation of python bindings
authorBartosz Golaszewski <bartekgola@gmail.com>
Fri, 20 Apr 2018 09:54:51 +0000 (11:54 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Fri, 20 Apr 2018 12:10:09 +0000 (14:10 +0200)
commit696de1b973647a871a22e2b8d4eeb0649c64de59
tree5c7fbf68f4a78f7249b590b9f588b91b4748dae0
parentbdc8e6bfd5efa8fd949f7fd29dee19f7ade990a1
build: fix cross-compilation of python bindings

AX_PYTHON_DEVEL macro from the autoconf-archive collection doesn't work
when we're trying to cross-compile python bindings in environments such
as buildroot or yocto. It can't properly detect the location of python
headers.

Let's use AM_PATH_PYTHON to detect the python3 interpreter and then
either take the PYTHON_CPPFLAGS and PYTHON_LIBS variables from the
environment (so that cross-compiling build systems can pass their
custom locations to autotools) or try to detect them ourselves using
the python3-config tool.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
bindings/python/Makefile.am
configure.ac