llvm.org GIT mirror llvm / d36e644
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 Bill Wendling 7 years ago
2 changed file(s) with 8 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
13761376 fi
13771377
13781378 AC_MSG_CHECKING([for python >= 2.5])
1379 ac_python_version=`$PYTHON -c 'import sys; print sys.version.split()[[0]]'`
1379 ac_python_version=`$PYTHON -V 2>&1 | cut -d' ' -f2`
13801380 ac_python_version_major=`echo $ac_python_version | cut -d'.' -f1`
13811381 ac_python_version_minor=`echo $ac_python_version | cut -d'.' -f2`
13821382 ac_python_version_patch=`echo $ac_python_version | cut -d'.' -f3`
1383 if test "$ac_python_version_major" -eq "2" \
1384 && test "$ac_python_version_minor" -ge "5" ; then
1383 if test "$ac_python_version_major" -gt "2" || \
1384 (test "$ac_python_version_major" -eq "2" && \
1385 test "$ac_python_version_minor" -ge "5") ; then
13851386 AC_MSG_RESULT([$PYTHON ($ac_python_version)])
13861387 else
13871388 AC_MSG_RESULT([not found])
1181411814
1181511815 { echo "$as_me:$LINENO: checking for python >= 2.5" >&5
1181611816 echo $ECHO_N "checking for python >= 2.5... $ECHO_C" >&6; }
11817 ac_python_version=`$PYTHON -c 'import sys; print sys.version.split()[0]'`
11817 ac_python_version=`$PYTHON -V 2>&1 | cut -d' ' -f2`
1181811818 ac_python_version_major=`echo $ac_python_version | cut -d'.' -f1`
1181911819 ac_python_version_minor=`echo $ac_python_version | cut -d'.' -f2`
1182011820 ac_python_version_patch=`echo $ac_python_version | cut -d'.' -f3`
11821 if test "$ac_python_version_major" -eq "2" \
11822 && test "$ac_python_version_minor" -ge "5" ; then
11821 if test "$ac_python_version_major" -gt "2" || \
11822 (test "$ac_python_version_major" -eq "2" && \
11823 test "$ac_python_version_minor" -ge "5") ; then
1182311824 { echo "$as_me:$LINENO: result: $PYTHON ($ac_python_version)" >&5
1182411825 echo "${ECHO_T}$PYTHON ($ac_python_version)" >&6; }
1182511826 else