* [PATCH nft 1/2] configure.ac: Fix a2x check @ 2019-03-17 17:19 Luis Ressel 2019-03-17 17:19 ` [PATCH nft 2/2] configure.ac: Clean up AC_ARG_{WITH,ENABLE} invocations Luis Ressel 2019-03-18 14:52 ` [PATCH nft 1/2] configure.ac: Fix a2x check Pablo Neira Ayuso 0 siblings, 2 replies; 5+ messages in thread From: Luis Ressel @ 2019-03-17 17:19 UTC (permalink / raw) To: netfilter-devel * If enable_man_doc is set, but a2x can't be found, configure should fail instead of silently disabling man page creation. * The AS_IF block checking $need_a2x is never active (need_a2x has been removed from configure.ac in 13e44a608 and a277479dc). * AC_CHECK_PROG(VAR, ...) is a noop if VAR is already set, allowing the user to explicitly specify the (path to the) binary in VAR. Adjust the AS_IF check to account for this. Signed-off-by: Luis Ressel <aranea@aixah.de> --- configure.ac | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 9bbd9d3..ccf8db0 100644 --- a/configure.ac +++ b/configure.ac @@ -48,12 +48,9 @@ fi AM_PROG_AR AM_PROG_LIBTOOL -AC_CHECK_PROG(A2X, [a2x], [a2x]) -AM_CONDITIONAL([BUILD_MAN], [test -n "$A2X"]) - -AS_IF([test "$need_a2x" = "yes"], [ - AC_CHECK_PROG(A2X, [a2x], [found], [no]) - AS_IF([test "$A2X" != "found"], +AS_IF([test "x$enable_man_doc" = "xyes"], [ + AC_CHECK_PROG(A2X, [a2x], [a2x], [no]) + AS_IF([test "$A2X" = "no"], [AC_MSG_ERROR([a2x not found, please install asciidoc])]) ]) -- 2.21.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH nft 2/2] configure.ac: Clean up AC_ARG_{WITH,ENABLE} invocations 2019-03-17 17:19 [PATCH nft 1/2] configure.ac: Fix a2x check Luis Ressel @ 2019-03-17 17:19 ` Luis Ressel 2019-03-17 17:56 ` Jan Engelhardt 2019-03-18 14:52 ` [PATCH nft 1/2] configure.ac: Fix a2x check Pablo Neira Ayuso 1 sibling, 1 reply; 5+ messages in thread From: Luis Ressel @ 2019-03-17 17:19 UTC (permalink / raw) To: netfilter-devel * AC_ARG_ENABLE implicitly defines enable_debug; there's no point in performing extra work just to define with_debug with an identical value. * The same applies to with_xtables and with_libxtables. * The AS_IF block in the `AC_ARG_ENABLE([man-doc], ...` invocation is essentially a noop. All it does is to set enable_man_doc to `yes` if has a value that matches neither `yes` nor `no`. (This could happen if a user calls `configure --enable-man-doc=foo`, but that'd be a user error which we don't need to handle.) --- configure.ac | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index ccf8db0..d28fba9 100644 --- a/configure.ac +++ b/configure.ac @@ -13,15 +13,12 @@ AC_CONFIG_HEADER([config.h]) AC_ARG_ENABLE([debug], AS_HELP_STRING([--disable-debug], [Disable debugging symbols]), - AS_IF([test "x$enable_debug" = "xno"], [with_debug=no], [with_debug=yes]), - [with_debug=yes]) -AC_SUBST(with_debug) -AM_CONDITIONAL([BUILD_DEBUG], [test "x$with_debug" != xno]) + [], [enable_debug=yes]) +AM_CONDITIONAL([BUILD_DEBUG], [test "x$enable_debug" != xno]) AC_ARG_ENABLE([man-doc], AS_HELP_STRING([--disable-man-doc], [Disable man page documentation]), - AS_IF([test "x$enable_man_doc" = "xno"], [enable_man_doc=no], - [enable_man_doc=yes]), [enable_man_doc=yes]) + [], [enable_man_doc=yes]) AM_CONDITIONAL([BUILD_MAN], [test "x$enable_man_doc" == "xyes" ]) # Checks for programs. @@ -58,8 +55,8 @@ PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3]) PKG_CHECK_MODULES([LIBNFTNL], [libnftnl >= 1.1.1]) AC_ARG_WITH([mini-gmp], [AS_HELP_STRING([--with-mini-gmp], - [Use builtin mini-gmp (for embedded builds)])], [], - [with_mini_gmp=no]) + [Use builtin mini-gmp (for embedded builds)])], + [], [with_mini_gmp=no]) AS_IF([test "x$with_mini_gmp" != xyes], [ AC_CHECK_LIB([gmp],[__gmpz_init], , AC_MSG_ERROR([No suitable version of libgmp found])) ]) @@ -78,13 +75,12 @@ AM_CONDITIONAL([BUILD_CLI], [test "x$with_cli" != xno]) AC_ARG_WITH([xtables], [AS_HELP_STRING([--with-xtables], [Use libxtables for iptables interaction])], - [with_libxtables=$withval], [with_libxtables=no]) -AS_IF([test "x$with_libxtables" != xno], [ + [], [with_xtables=no]) +AS_IF([test "x$with_xtables" != xno], [ PKG_CHECK_MODULES([XTABLES], [xtables >= 1.6.1]) AC_DEFINE([HAVE_LIBXTABLES], [1], [0]) ]) -AC_SUBST(with_libxtables) -AM_CONDITIONAL([BUILD_XTABLES], [test "x$with_libxtables" == xyes]) +AM_CONDITIONAL([BUILD_XTABLES], [test "x$with_xtables" == xyes]) AC_ARG_WITH([json], [AS_HELP_STRING([--with-json], [Enable JSON output support])], @@ -136,10 +132,10 @@ AC_OUTPUT echo " nft configuration: cli support: ${with_cli} - enable debugging symbols: ${with_debug} + enable debugging symbols: ${enable_debug} use mini-gmp: ${with_mini_gmp} enable man page: ${enable_man_doc} - libxtables support: ${with_libxtables} + libxtables support: ${with_xtables} json output support: ${with_json}" AS_IF([test "x$PYTHON_BIN" != "x"], [ -- 2.21.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH nft 2/2] configure.ac: Clean up AC_ARG_{WITH,ENABLE} invocations 2019-03-17 17:19 ` [PATCH nft 2/2] configure.ac: Clean up AC_ARG_{WITH,ENABLE} invocations Luis Ressel @ 2019-03-17 17:56 ` Jan Engelhardt 2019-03-17 18:18 ` Luis Ressel 0 siblings, 1 reply; 5+ messages in thread From: Jan Engelhardt @ 2019-03-17 17:56 UTC (permalink / raw) To: Luis Ressel; +Cc: netfilter-devel On Sunday 2019-03-17 18:19, Luis Ressel wrote: > ]) >-AC_SUBST(with_libxtables) >-AM_CONDITIONAL([BUILD_XTABLES], [test "x$with_libxtables" == xyes]) >+AM_CONDITIONAL([BUILD_XTABLES], [test "x$with_xtables" == xyes]) Not sure when this was introduced, by it needs to be a single = after all. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH nft 2/2] configure.ac: Clean up AC_ARG_{WITH,ENABLE} invocations 2019-03-17 17:56 ` Jan Engelhardt @ 2019-03-17 18:18 ` Luis Ressel 0 siblings, 0 replies; 5+ messages in thread From: Luis Ressel @ 2019-03-17 18:18 UTC (permalink / raw) To: Jan Engelhardt; +Cc: netfilter-devel On Sun, Mar 17, 2019 at 06:56:55PM +0100, Jan Engelhardt wrote: > > On Sunday 2019-03-17 18:19, Luis Ressel wrote: > > ]) > >-AC_SUBST(with_libxtables) > >-AM_CONDITIONAL([BUILD_XTABLES], [test "x$with_libxtables" == xyes]) > >+AM_CONDITIONAL([BUILD_XTABLES], [test "x$with_xtables" == xyes]) > > Not sure when this was introduced, by it needs to be a single = after all. Whoops, I missed that. Thanks for the catch! Regards, Luis ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH nft 1/2] configure.ac: Fix a2x check 2019-03-17 17:19 [PATCH nft 1/2] configure.ac: Fix a2x check Luis Ressel 2019-03-17 17:19 ` [PATCH nft 2/2] configure.ac: Clean up AC_ARG_{WITH,ENABLE} invocations Luis Ressel @ 2019-03-18 14:52 ` Pablo Neira Ayuso 1 sibling, 0 replies; 5+ messages in thread From: Pablo Neira Ayuso @ 2019-03-18 14:52 UTC (permalink / raw) To: Luis Ressel; +Cc: netfilter-devel On Sun, Mar 17, 2019 at 06:19:11PM +0100, Luis Ressel wrote: > * If enable_man_doc is set, but a2x can't be found, configure should > fail instead of silently disabling man page creation. > > * The AS_IF block checking $need_a2x is never active (need_a2x has been > removed from configure.ac in 13e44a608 and a277479dc). > > * AC_CHECK_PROG(VAR, ...) is a noop if VAR is already set, allowing the > user to explicitly specify the (path to the) binary in VAR. Adjust the > AS_IF check to account for this. Applied, thanks. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-03-18 15:04 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-03-17 17:19 [PATCH nft 1/2] configure.ac: Fix a2x check Luis Ressel 2019-03-17 17:19 ` [PATCH nft 2/2] configure.ac: Clean up AC_ARG_{WITH,ENABLE} invocations Luis Ressel 2019-03-17 17:56 ` Jan Engelhardt 2019-03-17 18:18 ` Luis Ressel 2019-03-18 14:52 ` [PATCH nft 1/2] configure.ac: Fix a2x check Pablo Neira Ayuso
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).