merge of '49118a4c6035353c0f8cf1aa30297dd36e43241f'
[vuplus_openembedded] / packages / python / python-pygobject / python-path.patch
1 Index: pygobject-2.14.2/m4/python.m4
2 ===================================================================
3 --- pygobject-2.14.2.orig/m4/python.m4
4 +++ pygobject-2.14.2/m4/python.m4
5 @@ -43,6 +43,11 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
6  [AC_REQUIRE([AM_PATH_PYTHON])
7  AC_MSG_CHECKING(for headers required to compile python extensions)
8  dnl deduce PYTHON_INCLUDES
9 +AC_ARG_WITH(python-includes,
10 +       [  --with-python-includes=DIR  path to Python includes], py_exec_prefix=$withval)
11 +if test x$py_exec_prefix != x; then
12 +PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
13 +else
14  py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
15  py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
16  if test -x "$PYTHON-config"; then
17 @@ -53,6 +58,7 @@ if test "$py_prefix" != "$py_exec_prefix
18    PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
19  fi
20  fi
21 +fi
22  AC_SUBST(PYTHON_INCLUDES)
23  dnl check if the headers exist:
24  save_CPPFLAGS="$CPPFLAGS"
25 Index: pygobject-2.14.2/configure.ac
26 ===================================================================
27 --- pygobject-2.14.2.orig/configure.ac
28 +++ pygobject-2.14.2/configure.ac
29 @@ -71,9 +71,6 @@ AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(c
30  
31  AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h])
32  py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
33 -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
34 -old_CPPFLAGS=$CPPFLAGS
35 -CPPFLAGS="-Wall -Werror $PYTHON_INCLUDES"
36  AC_TRY_COMPILE([#include <Python.h>],
37    [PySignal_SetWakeupFd(0);],
38    setwakeupfd_ok=yes,
39 @@ -83,7 +80,6 @@ if test "x$setwakeupfd_ok" != xno; then
40    AC_DEFINE(HAVE_PYSIGNAL_SETWAKEUPFD, 1,
41                  [Define to 1 if PySignal_SetWakeupFd is available])
42  fi
43 -CPPFLAGS=$old_CPPFLAGS
44  
45  PLATFORM=`$PYTHON -c "from distutils import util; print util.get_platform()"`
46  AC_SUBST(PLATFORM)