diff options
author | Stephen Fisher <sfisher@sdf.org> | 2014-12-04 13:15:41 -0700 |
---|---|---|
committer | Stephen Fisher <sfisher@sdf.org> | 2014-12-04 23:54:47 +0000 |
commit | d5a4cc34ecb95b851323680883d28ec154cf58bb (patch) | |
tree | 5bd319a6cb4ba441936cc40e848de0e91573d12d /autogen.sh | |
parent | 3b7c165e20b2b9a031b12a96aeb5baf870e08143 (diff) |
Make autogen.sh look for "python3" if "python" isn't found before
giving up.
Change-Id: Id109c78f90da71c54c7b4fd6df20cc153248f46f
Reviewed-on: https://code.wireshark.org/review/5623
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 8 |
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]* ) |