aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-10-12 08:42:59 +0000
committerBill Wendling <isanbard@gmail.com>2013-10-12 08:42:59 +0000
commitd36e6444aa6ce155dcb8479609cc12c81c5fa166 (patch)
treed88ce7b389275ebde0bbbf9a0883c544cc44dff0 /configure
parent017d8a3e23b719ece59f2498582db7f25d65c1b9 (diff)
downloadexternal_llvm-d36e6444aa6ce155dcb8479609cc12c81c5fa166.zip
external_llvm-d36e6444aa6ce155dcb8479609cc12c81c5fa166.tar.gz
external_llvm-d36e6444aa6ce155dcb8479609cc12c81c5fa166.tar.bz2
Update so that it uses the `-V' command line option and supports Python 3.x.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 4 insertions, 3 deletions
diff --git a/configure b/configure
index 6d061d4..2263bb4 100755
--- a/configure
+++ b/configure
@@ -11815,12 +11815,13 @@ fi
{ echo "$as_me:$LINENO: checking for python >= 2.5" >&5
echo $ECHO_N "checking for python >= 2.5... $ECHO_C" >&6; }
-ac_python_version=`$PYTHON -c 'import sys; print sys.version.split()[0]'`
+ac_python_version=`$PYTHON -V 2>&1 | cut -d' ' -f2`
ac_python_version_major=`echo $ac_python_version | cut -d'.' -f1`
ac_python_version_minor=`echo $ac_python_version | cut -d'.' -f2`
ac_python_version_patch=`echo $ac_python_version | cut -d'.' -f3`
-if test "$ac_python_version_major" -eq "2" \
- && test "$ac_python_version_minor" -ge "5" ; then
+if test "$ac_python_version_major" -gt "2" || \
+ (test "$ac_python_version_major" -eq "2" && \
+ test "$ac_python_version_minor" -ge "5") ; then
{ echo "$as_me:$LINENO: result: $PYTHON ($ac_python_version)" >&5
echo "${ECHO_T}$PYTHON ($ac_python_version)" >&6; }
else