On 12 January 2016 at 12:28, Gavin Smith <gavinsmith0...@gmail.com> wrote: > func_gl_gnulib_m4code_nl_langinfo () > { > if ! $gl_gnulib_enabled_nl_langinfo; then > gl_FUNC_NL_LANGINFO > if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then > AC_LIBOBJ([nl_langinfo]) > fi > gl_LANGINFO_MODULE_INDICATOR([nl_langinfo]) > gl_gnulib_enabled_nl_langinfo=true > func_gl_gnulib_m4code_langinfo > if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then > func_gl_gnulib_m4code_localeconv > fi > fi > if test $ac_use_included_regex = yes; then > func_gl_gnulib_m4code_nl_langinfo > fi > > I think because gl_LANGINFO_H is used earlier in the file, in the body > of func_gl_gnulib_m4code_langinfo, the macro that is AC_REQUIRE'd is > expanded there, and not later in gl_FUNC_NL_LANGINFO.
I wonder if the code should instead be > func_gl_gnulib_m4code_nl_langinfo () > { > if ! $gl_gnulib_enabled_nl_langinfo; then > func_gl_gnulib_m4code_langinfo > if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then > func_gl_gnulib_m4code_localeconv > fi > gl_FUNC_NL_LANGINFO > if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then > AC_LIBOBJ([nl_langinfo]) > fi > gl_LANGINFO_MODULE_INDICATOR([nl_langinfo]) > gl_gnulib_enabled_nl_langinfo=true > fi > } It could be because nl_langinfo is a conditional module (in my import) (on the "regex" module), so nl_langinfo's dependencies shouldn't be run unconditionally. That's why the call to the code for nl_langinfo's dependencies is inside func_gl_gnulib_m4code_nl_langinfo: my guess is that the dependency code should come first. Maybe this hasn't been a problem before because the combination of conditional module dependencies and AC_REQUIRE isn't that common? If the langinfo module had been unconditional, I'd guess its code would have been executed first. The code for this output is in func_emit_autoconf_snippets; it shouldn't be hard to swap them around. I can try to post a patch if others agree this is the reason for the problem.