aboutsummaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh
index 364a6bd287..4850c94f3f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -37,7 +37,12 @@ AUTOCONF=autoconf
# Check for python. Python did not support --version before version 2.5.
# Until we require a version > 2.5, we should use -V.
-PYVER=`python -V 2>&1 | sed 's/Python *//'`
+PYVER=`exec python -V 2>&1 | sed 's/Python *//'`
+# If "python" isn't found, try "python3"
+if test "$PYVER" = "exec: python: not found"
+then
+ PYVER=`exec python3 -V 2>&1 | sed 's/Python *//'`
+fi
case "$PYVER" in
2*|3*)
;;
@@ -51,7 +56,6 @@ _EOF_
DIE="exit 1"
esac
-
ACVER=`$AUTOCONF --version | grep '^autoconf' | sed 's/.*) *//'`
case "$ACVER" in
'' | 0.* | 1.* | 2.[0-5]* )