From 7e4fd6fc5116d84e5dbc48a61fd566556d258cf8 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 10 Jan 2023 18:00:45 +0900 Subject: Update version detection for python 3. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michele Calgaro Signed-off-by: Slávek Banko --- acinclude.m4.in | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/acinclude.m4.in b/acinclude.m4.in index d5e9008..a311854 100644 --- a/acinclude.m4.in +++ b/acinclude.m4.in @@ -4463,7 +4463,7 @@ AC_REQUIRE([KDE_CHECK_LIBPTHREAD]) AC_REQUIRE([KDE_CHECK_PYTHON_DIR]) if test -z "$1"; then - version="1.5" + version="3.0" else version="$1" fi @@ -4551,22 +4551,12 @@ fi AC_DEFUN([KDE_CHECK_PYTHON], [ - KDE_CHECK_PYTHON_INTERN("2.7", - [KDE_CHECK_PYTHON_INTERN("2.6", - [KDE_CHECK_PYTHON_INTERN("2.5", - [KDE_CHECK_PYTHON_INTERN("2.4", - [KDE_CHECK_PYTHON_INTERN("2.3", - [KDE_CHECK_PYTHON_INTERN("2.2", - [KDE_CHECK_PYTHON_INTERN("2.1", - [KDE_CHECK_PYTHON_INTERN("2.0", - [KDE_CHECK_PYTHON_INTERN($1, $2) ]) - ]) - ]) - ]) - ]) - ]) - ]) - ]) + for PYTHON_VER_TEST in 3.{12,11,10,9,8,7,6,5,4,3,2,1,0}; do + KDE_CHECK_PYTHON_INTERN("$PYTHON_VER_TEST") + if test -n "$PYTHONLIB"; then + break + fi + done ]) AC_DEFUN([KDE_CHECK_STL], -- cgit v1.2.1