Description: detect Python 2.7 and honor PYTHON
Author: Sebastian Ramacher <s.ramacher@gmx.at>
Last-Update: 2011-10-17

--- pythonmagick-0.9.1.orig/m4/ax_python.m4
+++ pythonmagick-0.9.1/m4/ax_python.m4
@@ -58,7 +58,9 @@
 AC_DEFUN([AX_PYTHON],
 [AC_MSG_CHECKING(for python build information)
 AC_MSG_RESULT([])
-for python in python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
+echo $PYTHON $python
+for python in python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
+if test x$PYTHON != x && test $PYTHON != $python; then continue; fi
 AC_CHECK_PROGS(PYTHON_BIN, [$python])
 ax_python_bin=$PYTHON_BIN
 if test x$ax_python_bin != x; then
