+2021-12-12 Bruno Haible <bruno@clisp.org>
+
+ gnulib-tool: Support non-recursive-gnulib-prefix-hack with tests.
+ * gnulib-tool (func_import): Synthesize an AC_CONFIG_LIBOBJ_DIR
+ invocation.
+ * m4/non-recursive-gnulib-prefix-hack.m4
+ (gl_NON_RECURSIVE_GNULIB_PREFIX_HACK): Don't invoke
+ AC_CONFIG_LIBOBJ_DIR.
+
2021-12-12 Paul Eggert <eggert@cs.ucla.edu>
bootstrap: refactor for GNU tar
echo "# \"Check for header files, types and library functions\"."
echo "AC_DEFUN([${macro_prefix}_INIT],"
echo "["
+ # This AC_CONFIG_LIBOBJ_DIR invocation silences an error from the automake
+ # front end:
+ # error: required file './alloca.c' not found
+ # It is needed because of the last remaining use of AC_LIBSOURCES in
+ # _AC_LIBOBJ_ALLOCA, invoked from AC_FUNC_ALLOCA.
+ # All the m4_pushdef/m4_popdef logic in func_emit_initmacro_start/_end
+ # does not help to avoid this error.
+ if grep ' lib/alloca\.c$' "$tmp"/new-files; then
+ # alloca.c will be present in $sourcebase.
+ echo " AC_CONFIG_LIBOBJ_DIR([$sourcebase])"
+ else
+ if grep ' tests=lib/alloca\.c$' "$tmp"/new-files; then
+ # alloca.c will be present in $testsbase.
+ echo " AC_CONFIG_LIBOBJ_DIR([$testsbase])"
+ fi
+ fi
if test "$libtool" = true; then
echo " AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
echo " gl_cond_libtool=true"
dnl in the directory specified by LIB_DIR.
AC_DEFUN([gl_NON_RECURSIVE_GNULIB_PREFIX_HACK],
[
- # Tell AC_LIBSOURCES where to find source files like alloca.c.
- AC_CONFIG_LIBOBJ_DIR([$1])
-
# This hack originated in bison. It is required when using non-recursive
# automake rules to build from gnulib-provided lib/ sources. Hence, LIB_DIR
# is usually simply "lib". Those rules use the list of names like "fchdir.o"