On Sat, Oct 19, 2024 at 09:34:49AM +0200, Patrice Dumas wrote: > On Fri, Oct 18, 2024 at 10:10:03PM +0100, Gavin Smith wrote: > > tp/Texinfo/XS/gnulib/m4/gettext.m4 was added in commit 2cd1cfc788d207c, > > (Gavin Smith, 2019-03-17), as a result of running gettextize. Some of > > the confusion may come from the fact that gettextize places files in > > gnulib/m4 even though the files are not coming from gnulib. (Probably > > a result of having AC_CONFIG_MACRO_DIR([gnulib/m4]) in configure.ac.) > > Indeed, this is very confusing. Also something that probably confused > me is that there is no visible gettext.m4 below the main directory, but > still gettext.m4 is included in aclocal.m4. > > Is there a specific reason why AC_CONFIG_MACRO_DIR is gnulib/m4? I have > the feeling that it is at least partly wrong, and also that the same setup > should be in the main directory configure.ac.
When you run gnulib-tool it gives you a bunch of changes to make to your build system files: Don't forget to - add "gnulib/lib/Makefile" to AC_CONFIG_FILES in ./configure.ac, - add "gnulib/po/Makefile.in" to AC_CONFIG_FILES in ./configure.ac, - mention "lib" in SUBDIRS in gnulib/Makefile.am, - mention "po" in SUBDIRS in gnulib/Makefile.am, - mention "-I gnulib/m4" in ACLOCAL_AMFLAGS in Makefile.am or add an AC_CONFIG_MACRO_DIRS([gnulib/m4]) invocation in ./configure.ac, - mention "gnulib/m4/gnulib-cache.m4" in EXTRA_DIST in Makefile.am, - invoke gl_EARLY in ./configure.ac, right after AC_PROG_CC, - invoke gl_INIT in ./configure.ac. As you say, having other files added to the gnulib directories is potentially confusing (with files coming from gnulib, gettext, libtool, automake...).