From d8fc54456996a853fac75822988fb7c0d230247c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 2 Dec 2019 10:17:44 +1100 Subject: [PATCH 1/3] unset PYTHON on --without-python to prevent python still being used --- configure | 1 + configure.ac | 1 + 2 files changed, 2 insertions(+) diff --git a/configure b/configure index 49f92ae55a..578a6ead4a 100755 --- a/configure +++ b/configure @@ -12514,6 +12514,7 @@ fi if test "$with_python" = "no"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python support" >&5 $as_echo_n "checking for Python support... " >&6; } + unset PYTHON { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } else diff --git a/configure.ac b/configure.ac index 031206ca21..a0b778c270 100644 --- a/configure.ac +++ b/configure.ac @@ -221,6 +221,7 @@ AS_IF([test "$with_python" = "yes"], AS_IF([test "$with_python" = "no"], [AC_MSG_CHECKING([for Python support]) + unset PYTHON AC_MSG_RESULT([disabled])], [for p in $with_python do From 8cd3cf90b2355a9e262141392bcd6d6d1b215d60 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 2 Dec 2019 10:25:51 +1100 Subject: [PATCH 2/3] add CHANGES --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index c29546752d..cd3cc7231d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5330. [bug] 'configure --without-python' was ineffective if + PYTHON was set in the environment. [GL #1434] + 5329. [bug] Reconfiguring named caused memory to be leaked when any GeoIP2 database was in use. [GL #1445] From eed2aabc409a41dc311e4101c399e461d5f92f9f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 3 Dec 2019 08:38:50 +1100 Subject: [PATCH 3/3] add AC_ARG_VAR([PYTHON], [path to python executable]) --- configure | 4 ++++ configure.ac | 2 ++ 2 files changed, 6 insertions(+) diff --git a/configure b/configure index 578a6ead4a..0d6df8eea0 100755 --- a/configure +++ b/configure @@ -968,6 +968,7 @@ LT_SYS_LIBRARY_PATH PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR +PYTHON MAXMINDDB_CFLAGS MAXMINDDB_LIBS MAXMINDDB_PREFIX @@ -1726,6 +1727,7 @@ Some influential environment variables: directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path + PYTHON path to python executable MAXMINDDB_CFLAGS C compiler flags for MAXMINDDB, overriding pkg-config MAXMINDDB_LIBS @@ -12491,6 +12493,8 @@ except: exit(1)' default_with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7" + + # Check whether --with-python was given. if test "${with_python+set}" = set; then : withval=$with_python; diff --git a/configure.ac b/configure.ac index a0b778c270..623cb277d1 100644 --- a/configure.ac +++ b/configure.ac @@ -207,6 +207,8 @@ except: exit(1)' default_with_python="python python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python2 python2.7" +AC_ARG_VAR([PYTHON], [path to python executable]) + AC_ARG_WITH([python], AS_HELP_STRING([--with-python=PATH], [specify path to Python interpreter]),