From: Evgeny Grin (Karlson2k) Date: Sat, 12 Jul 2025 15:11:05 +0000 (+0200) Subject: configure: Move AC_ARG_ENABLE. It cannot be conditional. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08ec7536e48577214f61239e53c2e9685aee79f2;p=thirdparty%2Fshadow.git configure: Move AC_ARG_ENABLE. It cannot be conditional. AC_ARG_ENABLE() expands to nothing where it is used, but adds arguments parsing, help message and other related things. It does not make any sense to put this macro into if branch. It may also confuse the reader. Signed-off-by: Evgeny Grin (Karlson2k) --- diff --git a/configure.ac b/configure.ac index 9dfe6c225..d0c1fd437 100644 --- a/configure.ac +++ b/configure.ac @@ -254,13 +254,13 @@ PKG_CHECK_MODULES([CMOCKA], [cmocka], [have_cmocka="yes"], [AC_MSG_WARN([libcmocka not found, cmocka tests will not be built])]) AM_CONDITIONAL([HAVE_CMOCKA], [test x$have_cmocka = xyes]) +AC_ARG_ENABLE([vendordir], + [AS_HELP_STRING([--enable-vendordir=DIR], [Directory for distribution provided configuration files])],[],[]) AC_CHECK_LIB([econf],[econf_readDirs],[LIBECONF="-leconf"],[LIBECONF=""]) if test -n "$LIBECONF"; then AC_DEFINE_UNQUOTED([VENDORDIR], ["$enable_vendordir"], [Directory for distribution provided configuration files]) ECONF_CPPFLAGS="-DUSE_ECONF=1" - AC_ARG_ENABLE([vendordir], - [AS_HELP_STRING([--enable-vendordir=DIR], [Directory for distribution provided configuration files])],[],[]) fi AC_SUBST([ECONF_CPPFLAGS]) AC_SUBST([LIBECONF])