Gary V. Vaughan wrote: > I don't think many users will find this before they are already bitten. > > IMHO, the two main places in gnulib that people see instructions are in > the output of gnulib-tool itself: > > ... > Don't forget to > ... > - invoke gl_EARLY in ./configure.ac, right after AC_PROG_CC, > ... > > Or the comment at the start of gnulib-comp.m4: > > # This macro should be invoked from ./configure.ac, in the section > # "Checks for programs", right after AC_PROG_CC, and certainly before > # any checks for libraries, header files, types and library functions. > AC_DEFUN([gl_EARLY], > ...
I agree about the first one. gnulib-comp.m4 is rarely looked at, I would say. Fixing the recommendation like this: 2011-09-30 Bruno Haible <br...@clisp.org> gnulib-tool: Improve suggestion where to put gl_EARLY invocation. * gnulib-tool (func_import): If the configure.ac has an AC_PROG_CC_STDC invocation, say "right after AC_PROG_CC_STDC", not "right after AC_PROG_CC". Reported by Gary V. Vaughan <g...@gnu.org>. --- gnulib-tool.orig Fri Sep 30 12:07:59 2011 +++ gnulib-tool Fri Sep 30 12:05:23 2011 @@ -5460,7 +5460,16 @@ echo " - mention \"${val}\" in ${var} in ${dir}Makefile.am," fi done - echo " - invoke ${macro_prefix}_EARLY in $configure_ac, right after AC_PROG_CC," + if grep '^ *AC_PROG_CC_STDC' "$configure_ac" > /dev/null; then + position_early_after=AC_PROG_CC_STDC + else + if grep '^ *AC_PROG_CC_C99' "$configure_ac" > /dev/null; then + position_early_after=AC_PROG_CC_C99 + else + position_early_after=AC_PROG_CC + fi + fi + echo " - invoke ${macro_prefix}_EARLY in $configure_ac, right after $position_early_after," echo " - invoke ${macro_prefix}_INIT in $configure_ac." } -- In memoriam Kelsang Namtso <http://en.wikipedia.org/wiki/Nangpa_La_shooting_incident>