1 [PATCH] m4/python.m4: add PYTHON_INCLUDES override for cross compilation
3 As the configure script mixes up host/target python. Equivalent to the
4 similar code in dbus-python.
6 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
9 1 file changed, 4 insertions(+)
11 Index: python-gobject-2.28.6/m4/python.m4
12 ===================================================================
13 --- python-gobject-2.28.6.orig/m4/python.m4
14 +++ python-gobject-2.28.6/m4/python.m4
16 [AC_REQUIRE([AM_PATH_PYTHON])
17 AC_MSG_CHECKING(for headers required to compile python extensions)
18 dnl deduce PYTHON_INCLUDES
19 +if test "${PYTHON_INCLUDES+set}" = set; then
20 + AC_MSG_NOTICE([PYTHON_INCLUDES overridden to: $PYTHON_INCLUDES])
22 py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
23 py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
24 PYTHON_CONFIG=`which $PYTHON`-config
26 PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
30 AC_SUBST(PYTHON_INCLUDES)
31 dnl check if the headers exist:
32 save_CPPFLAGS="$CPPFLAGS"