svn rev #23813: trunk/src/

ghudson@MIT.EDU ghudson at MIT.EDU
Wed Mar 17 15:34:48 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=23813
Commit By: ghudson
Log Message:
Fix the Python version check to use constructs available in older
versions of Python.  (python --version was added in 2.5.)



Changed Files:
U   trunk/src/configure.in
Modified: trunk/src/configure.in
===================================================================
--- trunk/src/configure.in	2010-03-17 19:11:09 UTC (rev 23812)
+++ trunk/src/configure.in	2010-03-17 19:34:48 UTC (rev 23813)
@@ -930,19 +930,13 @@
 
 # For Python tests.
 AC_CHECK_PROG(PYTHON,python,python)
+HAVE_PYTHON=no
 if test x"$PYTHON" != x; then
 	# k5test.py requires python 2.4 (for the subprocess module).
-	pyversion=$(python --version 2>&1 | awk '{print $2}')
-	case $pyversion in
-	1.*|2.0.*|2.1.*|2.2.*|2.3.*)
-		HAVE_PYTHON=no
-		;;
-	*)
+    	vercheck="import sys;sys.exit((sys.hexversion < 0x2040000) and 1 or 0)"
+	if python -c "$vercheck"; then
 		HAVE_PYTHON=yes
-		;;
-	esac
-else
-	HAVE_PYTHON=no
+	fi
 fi
 AC_SUBST(HAVE_PYTHON)
 




More information about the cvs-krb5 mailing list