]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix python version detection in configure.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 9 Jan 2023 14:10:00 +0000 (15:10 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 9 Jan 2023 14:10:00 +0000 (15:10 +0100)
configure
configure.ac
doc/Changelog

index 0694dce86606626b0750bd059f12bcb4b17ae82c..d89e4413a0daa5db263dd14b94b929ebcc45fe08 100755 (executable)
--- a/configure
+++ b/configure
@@ -17734,7 +17734,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
         #
 
    if test ! -z "$PYTHON_VERSION"; then
-       if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
+       badversion="no"
+       if test "$PYTHON_VERSION_MAJOR" -lt 2; then
+               badversion="yes"
+       fi
+       if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then
+               badversion="yes"
+       fi
+       if test "$badversion" = "yes"; then
                as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
        fi
 
index 2c7583310f205cc71d5e5c1a108dbbcbfda5e082..c7d3a08f1fded289d87f2483b7f3ea63db6a137d 100644 (file)
@@ -734,7 +734,14 @@ if test x_$ub_test_python != x_no; then
    ac_save_LIBS="$LIBS" dnl otherwise AC_PYTHON_DEVEL thrashes $LIBS
    AC_PYTHON_DEVEL
    if test ! -z "$PYTHON_VERSION"; then
-       if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
+       badversion="no"
+       if test "$PYTHON_VERSION_MAJOR" -lt 2; then
+               badversion="yes"
+       fi
+       if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then
+               badversion="yes"
+       fi
+       if test "$badversion" = "yes"; then
                AC_MSG_ERROR([Python version >= 2.4.0 is required])
        fi
 
index f8d5b566832d6487f5dfc4cf21ac58994b8c9523..d0db27d62504e0e5f1edec3ae07e4b802e75d28b 100644 (file)
@@ -1,5 +1,6 @@
 9 January 2023: Wouter
        - Fix python module install path detection.
+       - Fix python version detection in configure.
 
 6 January 2023: Wouter
        - Fix #823: Response change to NODATA for some ANY queries since