diff mbox series

[1/3] build: unbreak non-functionality of --disable-python

Message ID 20190625065835.31188-1-jengelh@inai.de
State Accepted
Delegated to: Pablo Neira
Headers show
Series [1/3] build: unbreak non-functionality of --disable-python | expand

Commit Message

Jan Engelhardt June 25, 2019, 6:58 a.m. UTC
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
 configure.ac | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

Pablo Neira Ayuso June 25, 2019, 8:05 a.m. UTC | #1
Applied, thanks.
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 75cf919..b71268e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,11 +103,14 @@  AC_ARG_WITH([python_bin],
 	   )
 
 AS_IF([test "x$PYTHON_BIN" = "x"], [
-	AS_IF([test "x$enable_python" = "xyes"], [AC_MSG_ERROR([Python asked but not found])])
-	AS_IF([test "x$enable_python" = "xcheck"], [AC_MSG_WARN([Python not found, continuing anyway])])
+	AS_IF([test "x$enable_python" = "xyes"], [AC_MSG_ERROR([Python asked but not found])],
+	[test "x$enable_python" = "xcheck"], [
+		AC_MSG_WARN([Python not found, continuing anyway])
+		enable_python=no
 	])
+])
 
-AM_CONDITIONAL([HAVE_PYTHON], [test "x$PYTHON_BIN" != "x"])
+AM_CONDITIONAL([HAVE_PYTHON], [test "$enable_python" != "no"])
 
 AC_CONFIG_FILES([					\
 		Makefile				\
@@ -138,7 +141,7 @@  nft configuration:
   libxtables support:		${with_xtables}
   json output support:          ${with_json}"
 
-AS_IF([test "x$PYTHON_BIN" != "x"], [
+AS_IF([test "$enable_python" != "no"], [
 	echo "  enable Python:		yes (with $PYTHON_BIN)"
 	], [
 	echo "  enable Python:		no"