[svn] commit: r1622 - /trunk/configure.ac

BIND 10 source code commits bind10-changes at lists.isc.org
Sun Mar 21 02:36:04 UTC 2010


Author: jinmei
Date: Sun Mar 21 02:36:03 2010
New Revision: 1622

Log:
made --with-pythonpath more friendly with older versions of automake: don't
use AM_PYTHON_CHECK_VERSION.
with additional cleanup: stop hardcoding a particular version number in
configuration variables.

Modified:
    trunk/configure.ac

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sun Mar 21 02:36:03 2010
@@ -23,22 +23,26 @@
 if test "$python_path" = auto; then
 	AM_PATH_PYTHON([3.1])
 else
+	# Older versions of automake can't handle python3 well.  This is an
+	# in-house workaround for them.
 	PYTHON=$python_path
 	AC_SUBST(PYTHON)
 	PYTHON_PREFIX='${prefix}'
 	AC_SUBST(PYTHON_PREFIX)
 	PYTHON_EXEC_PREFIX='$(exec_prefix)'
 	AC_SUBST(PYTHON_EXEC_PREFIX)
-	PYTHON_VERSION=[`$PYTHON -c "import sys; print(sys.version[:3])"`]
+	PYTHON_VERSION=[`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`]
+	if test `echo "$PYTHON_VERSION >= 3.1" | bc` != 1 ; then
+		AC_MSG_ERROR(["Python version too old: $PYTHON_VERSION, need 3.1 or higher"])
+	fi
 	AC_SUBST(PYTHON_VERSION)
-	AM_PYTHON_CHECK_VERSION([$PYTHON], [3.1], [], [AC_MSG_ERROR(["Python version too old: $PYTHON_VERSION, need 3.1 or higher"])])
 	PYTHON_PLATFORM=`$PYTHON -c "import sys; print(sys.platform)"`
 	AC_SUBST(PYTHON_PLATFORM)
-	pythondir='${prefix}/lib/python3.1/site-packages'
+	pythondir='${prefix}/lib/python'$PYTHON_VERSION'/site-packages'
 	AC_SUBST(pythondir)
 	pkgpythondir='${pythondir}/'$PACKAGE
 	AC_SUBST(pkgpythondir)
-	pyexecdir='${exec_prefix}/lib/python3.1/site-packages'
+	pyexecdir='${exec_prefix}/lib/python'$PYTHON_VERSION'/site-packages'
 	AC_SUBST(pyexecdir)
 	pkgpyexecdir='${pyexecdir}/'$PACKAGE
 	AC_SUBST(pkgpyexecdir)




More information about the bind10-changes mailing list