From d5a4cc34ecb95b851323680883d28ec154cf58bb Mon Sep 17 00:00:00 2001 From: Stephen Fisher Date: Thu, 4 Dec 2014 13:15:41 -0700 Subject: 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 --- autogen.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'autogen.sh') 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]* ) -- cgit v1.2.3