--- gtk2-build/acinclude.m4	2015-02-10 11:48:32.000000000 +0100
+++ gtk2-build/acinclude.m4	2015-10-20 00:18:15.784111110 +0200
@@ -6,20 +6,8 @@
   [AC_REQUIRE([AM_PATH_PYTHON])
     AC_MSG_CHECKING(for headers required to compile python extensions)
     dnl deduce PYTHON_INCLUDES
-    py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
-    py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
-    PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
-    if test "$py_prefix" != "$py_exec_prefix"; then
-       PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
-    fi
+    PYTHON_INCLUDES="-I${XBPS_CROSS_BASE}/include/python${PYTHON_VERSION}"
     AC_SUBST(PYTHON_INCLUDES)
+    have_python_headers=yes
-    dnl check if the headers exist:
-    save_CPPFLAGS="$CPPFLAGS"
-    CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
-    AC_TRY_CPP([#include <Python.h>],dnl
-    [AC_MSG_RESULT(found)
-       $1],dnl
-       [AC_MSG_RESULT(not found)
-       $2])
-    CPPFLAGS="$save_CPPFLAGS"
+    AC_MSG_RESULT(ok)
 ])
--- gtk3-build/acinclude.m4	2015-02-10 11:48:32.000000000 +0100
+++ gtk3-build/acinclude.m4	2015-10-20 00:18:15.784111110 +0200
@@ -6,20 +6,8 @@
   [AC_REQUIRE([AM_PATH_PYTHON])
     AC_MSG_CHECKING(for headers required to compile python extensions)
     dnl deduce PYTHON_INCLUDES
-    py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
-    py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
-    PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
-    if test "$py_prefix" != "$py_exec_prefix"; then
-       PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
-    fi
+    PYTHON_INCLUDES="-I${XBPS_CROSS_BASE}/include/python${PYTHON_VERSION}"
     AC_SUBST(PYTHON_INCLUDES)
+    have_python_headers=yes
-    dnl check if the headers exist:
-    save_CPPFLAGS="$CPPFLAGS"
-    CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
-    AC_TRY_CPP([#include <Python.h>],dnl
-    [AC_MSG_RESULT(found)
-       $1],dnl
-       [AC_MSG_RESULT(not found)
-       $2])
-    CPPFLAGS="$save_CPPFLAGS"
+    AC_MSG_RESULT(ok)
 ])
