summaryrefslogtreecommitdiff
path: root/package/python-gobject/0001-add-PYTHON_INCLUDES-override.patch
blob: d883f60ddf5033083bd4488c7d55e2b4bef80fa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[PATCH] m4/python.m4: add PYTHON_INCLUDES override for cross compilation

As the configure script mixes up host/target python. Equivalent to the
similar code in dbus-python.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 m4/python.m4 |    4 ++++
 1 file changed, 4 insertions(+)

Index: python-gobject-2.28.6/m4/python.m4
===================================================================
--- python-gobject-2.28.6.orig/m4/python.m4
+++ python-gobject-2.28.6/m4/python.m4
@@ -43,6 +43,9 @@
 [AC_REQUIRE([AM_PATH_PYTHON])
 AC_MSG_CHECKING(for headers required to compile python extensions)
 dnl deduce PYTHON_INCLUDES
+if test "${PYTHON_INCLUDES+set}" = set; then
+  AC_MSG_NOTICE([PYTHON_INCLUDES overridden to: $PYTHON_INCLUDES])
+else
 py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
 py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
 PYTHON_CONFIG=`which $PYTHON`-config
@@ -54,6 +57,7 @@
   PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
 fi
 fi
+fi
 AC_SUBST(PYTHON_INCLUDES)
 dnl check if the headers exist:
 save_CPPFLAGS="$CPPFLAGS"