--- configure.ac~	2008-01-03 12:20:10.000000000 +0100
+++ configure.ac	2008-02-27 14:33:51.000000000 +0100
@@ -71,7 +71,11 @@
 
 AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h])
 py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+if test -x "$PYTHON-config"; then
+PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
+else
 PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+fi
 old_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="-Wall -Werror $PYTHON_INCLUDES"
 AC_TRY_COMPILE([#include <Python.h>],
