Commit c0f3c75e authored by Allison Karlitskaya's avatar Allison Karlitskaya
Browse files

Makefile: work around AX_REQUIRE_DEFINED problem

We check to make sure that we properly include all needed .m4 files that
are used from other .m4 files we install by building a list of all
references and checking to make sure those are all actually defined.

This has been tripped up by this macro definition in
ax_compiler_flags.m4:

  m4_defun([_AX_COMPILER_FLAGS_LANG],
  [m4_ifdef([_AX_COMPILER_FLAGS_LANG_]$1[_enabled], [],
            [m4_define([_AX_COMPILER_FLAGS_LANG_]$1[_enabled], [])dnl
             AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS_]$1[FLAGS])])dnl
  ])

which tries to depend on a macro with a name calculated from its
argument.

Our simple regexp matching decides that AX_COMPILER_FLAGS_ is the name
of the required macro here, and that is not defined anywhere, so the
build fails.

Update the regexp not to match macro names ending with an underscore in
order to work around the issue for now.

I tried to use m4 to expand the file, but it seems that it doesn't work
because the invocations are protected by the [quoting] used in AC_-style
macro invocations.  Maybe we can find a better way to fix this in the
future, but this approach works for now.
parent 1522f1f5
......@@ -15,7 +15,7 @@ dist_aclocal_DATA = \
$(NULL)
all-local: $(dist_aclocal_DATA)
cat $^ | grep -v '^#' | sed -e 's/\<dnl\>.*//' | grep -o '\<AX_[A-Z0-9_]*\>' | sort | uniq > used
cat $^ | grep -v '^#' | sed -e 's/\<dnl\>.*//' | grep -o '\<AX_[A-Z0-9_]*[A-Z0-9]\>' | sort | uniq > used
cat $^ | grep ^AC_DEFUN | grep -o '\<AX_[A-Z0-9_]*\>' | sort | uniq > defined
diff -u used defined
rm -f used defined
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment