diff --git a/configure b/configure --- a/configure +++ b/configure @@ -2957,7 +2957,7 @@ { $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 - for interp in python$PACKAGE_VERSION python3 python; do + for interp in "$HOSTPYTHON" python$PACKAGE_VERSION python3 python; do which $interp >/dev/null 2>&1 || continue if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then break diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -56,7 +56,7 @@ if test "$cross_compiling" = yes; then AC_MSG_CHECKING([for python interpreter for cross build]) if test -z "$PYTHON_FOR_BUILD"; then - for interp in python$PACKAGE_VERSION python3 python; do + for interp in "$HOSTPYTHON" python$PACKAGE_VERSION python3 python; do which $interp >/dev/null 2>&1 || continue if $interp -c 'import sys;sys.exit(not sys.version_info@<:@:2@:>@ >= (3,3))'; then break