Parcourir la source

ask for version and platform, and check version of given python binary
(rest of ticket 103)


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1499 e5f2f494-b856-4b98-b285-d166d9295462

Jelte Jansen il y a 15 ans
Parent
commit
ffd58debfc
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 5 2
      configure.ac

+ 5 - 2
configure.ac

@@ -18,7 +18,7 @@ AC_LANG_CPLUSPLUS
 m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3 python3.1])
 AC_ARG_WITH([pythonpath],
 AC_HELP_STRING([--with-pythonpath=PATH],
-  [specify an absolute path to python executable when automatic version check (incorreclty) fails]),
+  [specify an absolute path to python executable when automatic version check (incorrectly) fails]),
   [python_path="$withval"], [python_path="auto"])
 if test "$python_path" = auto; then
 	AM_PATH_PYTHON([3.1])
@@ -29,7 +29,10 @@ else
 	AC_SUBST(PYTHON_PREFIX)
 	PYTHON_EXEC_PREFIX='$(exec_prefix)'
 	AC_SUBST(PYTHON_EXEC_PREFIX)
-	PYTHON_PLATFORM="todo"
+	PYTHON_VERSION=[`$PYTHON -c "import sys; print(sys.version[:3])"`]
+	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'
 	AC_SUBST(pythondir)