Skip to content

Commit

Permalink
Update so that it uses the `-V' command line option and supports Pyth…
Browse files Browse the repository at this point in the history
…on 3.x.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192527 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
isanbard committed Oct 12, 2013
1 parent 017d8a3 commit d36e644
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions autoconf/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
7 changes: 4 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d36e644

Please sign in to comment.