Hi Eric, * Eric Blake wrote on Tue, Mar 14, 2006 at 06:08:02PM CET: > CVS findutils currently tickles a bug in its use of AC_HEADER_DIRENT. > Somehow, the combination of modules pulled in by findutils led to > the following macro chain (among others): > > gl_INIT > +-gl_FUNC_DIRFD > | +-AC_HEADER_DIRENT > +-gl_FUNC_FTS > | +-AC_REQUIRE([gl_FUNC_FTS_CORE]) > | +-AC_REQUIRE([AC_HEADER_DIRENT]) > +-gl_FUNC_GETCWD > | +-case > | +-gl_PREREQ_GETCWD > | +-AC_REQUIRE([AC_HEADER_DIRENT]) > | +-AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO]) > | +-AC_REQUIRE([AC_HEADER_DIRENT]) > +-gl_SAVEDIR > | +-AC_REQUIRE([AC_HEADER_DIRENT]) > | +-AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID]) > | +-AC_REQUIRE([AC_HEADER_DIRENT]) > +-gl_XGETCWD > +-AC_REQUIRE([gl_FUNC_GETCWD]) > > > Somehow this chain was evil enough to make autoconf not expand > AC_HEADER_DIRENT until after gl_CHECK_TYPE_STRUCT_DIRENT_D_INO > and AC_FUNC_CLOSEDIR_VOID,
Well, yes. > I'm not sure if there is an underlying autoconf bug that also > needs to be fixed, I think it works as designed: everything that is AC_REQUIREd ends up being expanded _before_ gl_INIT. But since you have explicitly called AC_HEADER_DIRENT in gl_FUNC_DIRFD, any requirement to AC_HEADER_DIRENT is already fulfilled at the time an AC_REQUIRE([AC_HEADER_DIRENT]) is encountered, it will not be expanded again. Whether this is useful or intuitive in all cases, is very much a different question of course. > but this patch solves the problem for > findutils by making sure that AC_HEADER_DIRENT is always > AC_REQUIRE'd, so that the dependency chain does not get > corrupted by mixing and matching AC_REQUIRE with straight > expansion. It is very wise to not mix direct calls of some macro with an AC_REQUIREment of the same macro. Cheers, Ralf _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib