]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
build: unbreak non-functionality of --disable-python
authorJan Engelhardt <jengelh@inai.de>
Tue, 25 Jun 2019 06:58:33 +0000 (08:58 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 25 Jun 2019 07:55:58 +0000 (09:55 +0200)
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
configure.ac

index 75cf91992bf1afd362c1ad869c5a3c6e310a02e2..b71268e8b0dc2b61bc0bb44e7c31e3600af906cc 100644 (file)
@@ -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"