AC_MSG_RESULT([$enable_server])
AM_CONDITIONAL([BUILD_SERVER], [test x$enable_server = xyes])
-# ------- check for python --------
-AM_COND_IF([BUILD_SERVER],
- [AC_CHECK_PROGS([PYTHON], [python3.6], [])
- if test "x$PYTHON" = "x"; then
- AC_MSG_ERROR([Python is needed for tests. Install python please.])
- fi])
+# ------- check for python >= 3.6 --------
+AC_CHECK_PROGS([PYTHON], [python3], [])
+if test "x$PYTHON" = "x"; then
+ AC_MSG_ERROR([Python >= 3.6 is needed for lipe. Install python please.])
+fi
+
+ac_supports_python_ver=`$PYTHON -c "import sys; \
+ print (sys.hexversion >= 0x3060000)"`
+if test "$ac_supports_python_ver" != "True"; then
+ AC_MSG_ERROR([Python >= 3.6 is needed for lipe. Upgrade python please.])
+fi
# ------- check for pylint --------
-AM_COND_IF([BUILD_SERVER],
- [AC_CHECK_PROGS([PYLINT], [pylint-3.6], [])
- if test "x$PYLINT" = "x"; then
- AC_MSG_ERROR([pylint-3.6 is needed to check python coding style. Install pylint please.])
- fi])
+AC_CHECK_PROGS([PYLINT], [pylint-3], [])
+if test "x$PYLINT" = "x"; then
+ AC_MSG_ERROR([pylint-3 is needed to check python coding style. Install pylint please.])
+fi
# ------- check for libssh --------
AC_CHECK_LIB([ssh], [ssh_new], [