Hi Werner, > I've invoked gnulib-tool as follows: > > gnulib-tool --import \ > --m4-base=gnulib/m4 \ > --source-base=gnulib/src \ > --aux-dir=gnulib getopt-gnu > > and the recommendations emitted say this: > > Don't forget to > - add "lib/Makefile" to AC_CONFIG_FILES in ./configure.ac, > - mention "lib" in SUBDIRS in Makefile.am, > - mention "-I m4" in ACLOCAL_AMFLAGS in Makefile.am, > - mention "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. > > However, this should rather be > > Don't forget to > - add "gnulib/src/Makefile" to AC_CONFIG_FILES in ./configure.ac, > - mention "gnulib/src" in SUBDIRS in Makefile.am, > - mention "-I gnulib/m4" in ACLOCAL_AMFLAGS in Makefile.am, > - 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.
Indeed, this is surprising. Maybe you had a gnulib-cache.m4 file in the package's directory, that specified different settings? In any case, it's worth looking really carefully at the changes that gnulib-tool made. Consider using the --dry-run option until you found the parameters and environmental circumstances that make gnulib-tool work as you like. > Actually, I suggest two additions so that we have > > - add "gnulib/m4" to AC_CONFIG_MACRO_DIR in ./configure.ac There is no need to recommend this, because - gnulib's parameters are cached in gnulib-cache.m4, a different file than configure.ac, - it does neither help nor hurt if the macro directories into which 'aclocal' and 'libtoolize' add their macros is the same or a different directory than the one you specified for gnulib. But you're right, it would make sense to coordinate with the autoconf project on the approaches for distributing .m4 files. > - mention "-I gnulib/m4" in ACLOCAL_AMFLAGS in Makefile.am > (use a single line for all include directives), Why "use a single line"? Continuing the line with backslash-newline does not work? Bruno