--- configure
+++ configure
@@ -2952,6 +2952,9 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
 $as_echo_n "checking for python interpreter for cross build... " >&6; }
     if test -z "$PYTHON_FOR_BUILD"; then
+      if test -n "$PYTHON_INTERPRETER_FOR_BUILD"; then
+        interp="$PYTHON_INTERPRETER_FOR_BUILD"
+      else
         for interp in python$PACKAGE_VERSION python2 python; do
 	    which $interp >/dev/null 2>&1 || continue
 	    if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
@@ -2962,6 +2965,7 @@
         if test x$interp = x; then
 	    as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
 	fi
+      fi
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
 $as_echo "$interp" >&6; }
 	PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
