summaryrefslogtreecommitdiff
path: root/gnulib-tool
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-12-13 02:43:21 +0100
committerBruno Haible <bruno@clisp.org>2021-12-13 02:51:09 +0100
commit4e7b4cc6fb3e3b659c98baf6db26d8a06099fbee (patch)
treeee19b79790b5c91d431b8f31dbd7441ab60a24fc /gnulib-tool
parentd1981cd15b0f9b1e22582afd31fcbeab9910bb9d (diff)
downloadgnulib-4e7b4cc6fb3e3b659c98baf6db26d8a06099fbee.tar.gz
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.
Diffstat (limited to 'gnulib-tool')
-rwxr-xr-xgnulib-tool16
1 files changed, 16 insertions, 0 deletions
diff --git a/gnulib-tool b/gnulib-tool
index eb10436b11..878b9588f2 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -5837,6 +5837,22 @@ s,//*$,/,'
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"