aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure29
1 files changed, 20 insertions, 9 deletions
diff --git a/configure b/configure
index f30c31a..535e2f6 100755
--- a/configure
+++ b/configure
@@ -5344,19 +5344,30 @@ fi
test -n "$PYTHON_PROG" && break
done
-test -n "$PYTHON_PROG" || PYTHON_PROG="no"
-case "x$PYTHON_PROG" in
-xno|x|x:) PYTHON_PROG=no ;;
-*) ;;
-esac
-
-if test "x$PYTHON_PROG" = xno; then
- aux_missing="$aux_missing python"
+if test -z "$PYTHON_PROG"; then
+ ac_verc_fail=yes
else
- PYTHON="$PYTHON_PROG -B"
+ # Found it, now check the version.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $PYTHON_PROG" >&5
+$as_echo_n "checking version of $PYTHON_PROG... " >&6; }
+ ac_prog_version=`$PYTHON_PROG --version 2>&1 | sed -n 's/^.*Python \([0-9][0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 3.[4-9]*|3.[1-9][0-9]*|[4-9].*|[1-9][0-9]*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
+$as_echo "$ac_prog_version" >&6; }
fi
+if test $ac_verc_fail = yes; then
+ critic_missing="$critic_missing python"
+fi
+
+PYTHON="$PYTHON_PROG -B"
+
test -n "$critic_missing" && as_fn_error $? "
*** These critical programs are missing or too old:$critic_missing