]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
configure: Move AC_ARG_ENABLE. It cannot be conditional.
authorEvgeny Grin (Karlson2k) <k2k@drgrin.dev>
Sat, 12 Jul 2025 15:11:05 +0000 (17:11 +0200)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Sat, 19 Jul 2025 04:42:33 +0000 (06:42 +0200)
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) <k2k@drgrin.dev>
configure.ac

index 9dfe6c225ec3d002d06becd8c15d8c18d1cfd12c..d0c1fd437bf308b89cf8ce0fdafb9c994565acc9 100644 (file)
@@ -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])