On 2019-09-20, at 12:19:01 +0200, Pablo Neira Ayuso wrote: > On Mon, Sep 16, 2019 at 01:42:03PM +0100, Jeremy Sowden wrote: > [...] > > diff --git a/configure.ac b/configure.ac > > index 68f97f090535..347f3b0cc772 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -68,14 +68,23 @@ AC_CHECK_LIB([gmp],[__gmpz_init], , AC_MSG_ERROR([No suitable version of libgmp > > AM_CONDITIONAL([BUILD_MINIGMP], [test "x$with_mini_gmp" = xyes]) > > > > AC_ARG_WITH([cli], [AS_HELP_STRING([--without-cli], > > - [disable interactive CLI (libreadline support)])], > > - [], [with_cli=yes]) > > -AS_IF([test "x$with_cli" != xno], [ > > + [disable interactive CLI (libreadline or linenoise support)])], > > + [], [with_cli=readline]) > > + > > +AS_IF([test "x$with_cli" = xreadline], [ > > AC_CHECK_LIB([readline], [readline], , > > - AC_MSG_ERROR([No suitable version of libreadline found])) > > + AC_MSG_ERROR([No suitable version of libreadline found])) > > AC_DEFINE([HAVE_LIBREADLINE], [1], []) > > +], > > + [test "x$with_cli" = xlinenoise], [ > > +AH_TEMPLATE([HAVE_LINENOISE], []) > > +AC_DEFINE([HAVE_LINENOISE], [1], []) > > +], > > + [test "x$with_cli" != xno], [ > > +AC_MSG_ERROR([unexpected CLI value: $with_cli]) > > ]) > > AM_CONDITIONAL([BUILD_CLI], [test "x$with_cli" != xno]) > > +AM_CONDITIONAL([BUILD_CLI_LINENOISE], [test "x$with_cli" = xlinenoise]) > > > > AC_ARG_WITH([xtables], [AS_HELP_STRING([--with-xtables], > > [Use libxtables for iptables interaction])], > > @@ -118,6 +127,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "$enable_python" != "no"]) > > AC_CONFIG_FILES([ \ > > Makefile \ > > libnftables.pc \ > > + linenoise/Makefile \ > > src/Makefile \ > > include/Makefile \ > > include/nftables/Makefile \ > > You also have to update this code after AC_OUTPUT in configure.in to > display libnoise, right? > > echo " > nft configuration: > cli support: ${with_cli} > enable debugging symbols: ${enable_debug} > use mini-gmp: ${with_mini_gmp} > enable man page: ${enable_man_doc} > libxtables support: ${with_xtables} > json output support: ${with_json}" ${with_cli} will be "readline", "linenoise" or "no": $ ./configure --with-cli=linenoise [...] nft configuration: cli support: linenoise enable debugging symbols: yes use mini-gmp: no enable man page: yes libxtables support: no json output support: no enable Python: yes (with /usr/bin/python) J.
Attachment:
signature.asc
Description: PGP signature