diff options
author | Eric Leblond <eric@regit.org> | 2018-06-19 23:46:53 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-06-20 13:51:41 +0200 |
commit | bf9653667a39e32973466a202fdf9edcf881075a (patch) | |
tree | c8723359c0128230b8ced5fcdb7bbb8a2aa6f645 /configure.ac | |
parent | cafd5168ba1e234e8ed446bb0eeaf7eb253a66c2 (diff) |
python: installation of binding via make install
setup.py is used to build and install the python binding. Call
to setup.py are done in Makefile to proceed to build and
installation.
Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9f5d0f9a..b1a790d0 100644 --- a/configure.ac +++ b/configure.ac @@ -125,6 +125,22 @@ AC_DEFINE([HAVE_LIBJANSSON], [1], [Define if you have libjansson]) AC_SUBST(with_json) AM_CONDITIONAL([BUILD_JSON], [test "x$with_json" != xno]) +AC_ARG_ENABLE(python, + AS_HELP_STRING([--enable-python], [Enable python]),,[enable_python=check] + ) + +AC_ARG_WITH([python_bin], + [AS_HELP_STRING([--with-python-bin], [Specify Python binary to use])], + [PYTHON_BIN="$withval"], [AC_PATH_PROGS(PYTHON_BIN, python python2 python2.7)] + ) + +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])]) + ]) + +AM_CONDITIONAL([HAVE_PYTHON], [test "x$PYTHON_BIN" != "x"]) + AC_CONFIG_FILES([ \ Makefile \ libnftables.pc \ @@ -140,6 +156,7 @@ AC_CONFIG_FILES([ \ files/Makefile \ files/nftables/Makefile \ doc/Makefile \ + py/Makefile \ ]) AC_OUTPUT @@ -152,3 +169,10 @@ nft configuration: enable pdf documentation: ${enable_pdf_doc} libxtables support: ${with_libxtables} json output support: ${with_json}" + +AS_IF([test "x$PYTHON_BIN" != "x"], [ + echo " enable Python: yes (with $PYTHON_BIN)" + ], [ + echo " enable Python: no" + ] + ) |