Jim Meyering wrote: > While the dependency of AC_EGREP_CPP on AC_PROG_EGREP > is unavoidable, there are others that are indeed unnecessary, > since they serve only to work around a bug in autoconf-2.57, > which is no longer relevant, since we (gnulib-tool) now > requires 2.59 or newer. > ... > Now we require at least 2.59, and the work-around induced an > unwarranted circular dependency in grep's build process. > The following .m4 files pulled in the AC_PROG_EGREP requirement, > yet $EGREP was never used, and configuring grep on a system without > an existing grep program would thus fail unnecessarily. > * m4/alloca.m4 (gl_FUNC_ALLOCA): Remove work-around. > * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise. > * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise. > * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise. > * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise. > Prompted by the report, http://savannah.gnu.org/bugs/?31646 > by Florin Iucha.
There are three separate issues here: - The AC_REQUIRE([AC_PROG_EGREP]) in gnulib macros. These should not be needed any more since autoconf 2.54, because the definition of AC_EGREP_CPP includes this requirement already. It is possible that the bug that was observed back then (in 2002 or earlier) was due to wrong handling of AC_REQUIRE, but that was also fixed in autoconf by Eric about two years ago. - The AC_REQUIRE([AC_PROG_CPP]) in gnulib macros. This _probably_ can removed as well, because AC_EGREP_CPP does AC_LANG_PREPROC_REQUIRE() which should require AC_LANG_PREPROC(C), and the latter is defined as AC_DEFUN([AC_LANG_PREPROC(C)], [AC_REQUIRE([AC_PROG_CPP])]) - The issue of the bug reporter is unrelated. It is simply a consequence of how AC_PROG_EGREP is implemented. But any use of AC_EGREP_CPP needs AC_PROG_EGREP anyway. So, your patch is OK, but the ChangeLog entry and commit message should IMO be rewritten to not mention Florin Iucha's bug report. Bruno