From d36e6444aa6ce155dcb8479609cc12c81c5fa166 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sat, 12 Oct 2013 08:42:59 +0000 Subject: 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 --- autoconf/configure.ac | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'autoconf') diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 85eee54bf3..d5f95cd0eb 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -1377,12 +1377,13 @@ else fi AC_MSG_CHECKING([for python >= 2.5]) -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 AC_MSG_RESULT([$PYTHON ($ac_python_version)]) else AC_MSG_RESULT([not found]) -- cgit v1.2.3