- for python in $PYTHON python python2 python2.4 python2.3 python2.2 python2.1 python2.0; do
- AC_MSG_RESULT([$python])
- if ! $python -V > /dev/null 2>&1 ; then
- #AC_MSG_WARN([cannot execute $python])
- PYTHON='echo no python'
+ python="python"
+ found="no"
+ for r in $PYTHON python python3 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0; do
+ exe=`STEPMAKE_GET_EXECUTABLE($r)`
+ if ! $exe -V > /dev/null 2>&1 ; then
+ continue
+ fi
+ ver=`STEPMAKE_GET_VERSION($exe)`
+ num=`STEPMAKE_NUMERIC_VERSION($ver)`
+ req=`STEPMAKE_NUMERIC_VERSION($2)`
+ sup=`STEPMAKE_NUMERIC_VERSION($3)`
+ if test -n "$2" && test "$num" -lt "$req"; then
+ python=["$r >= $2 (installed: $ver)"]
+ continue