--- glade3-3.6.7.orig/configure	2009-06-29 21:51:09 +0200
+++ glade3-3.6.7/configure	2010-11-16 10:30:25 +0100
@@ -24707,9 +24707,11 @@ echo "${ECHO_T}$am_cv_python_pyexecdir"
 echo $ECHO_N "checking for headers required to compile python extensions... $ECHO_C" >&6; }
 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}"
+if test "x$PYTHON_LIBS" == x; then
+  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
 fi
 
 save_CPPFLAGS="$CPPFLAGS"
