aclocal: AC_CONFIG_MACRO_DIRS: work around autom4te option parsing bugs
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 15 Nov 2012 11:24:27 +0000 (12:24 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 15 Nov 2012 12:47:07 +0000 (13:47 +0100)
commitf0dd2dee9e4cebdc2ef1c5a9875728185bfd60eb
treece20ff9ee1a139b995d587332ca8d0d6d03c9956
parent326cd5f0797b32616a7a6caaa854b04c4ebd53f7
aclocal: AC_CONFIG_MACRO_DIRS: work around autom4te option parsing bugs

The autom4te program coming with autoconf 2.68 and earlier had a bug
which caused the "-" command line argument (with which we tell it to
read some input from from standard input) to aways be pushed at the
*end* of the command line, regardless of where the user specified it
(that bug was fixed by autoconf commit 'v2.68-120-gf4be358', "getopt:
new Autom4te::Getopt module").

This broken semantics conflict with our usage in aclocal, where we
need to pass some input to the invoked autom4te program early, and
have so far been using the stdin to do so.  Now we start using an
external file instead.

* m4/internal/ac-config-macro-dirs.m4: New file, contain a fallback
definition of the AC_CONFIG_MACRO_DIRS macro for older autoconf
releases.
* aclocal.in (trace_used_macros): When invoking autom4te, use that
file instead of "abusing" standard input.
* Makefile.am (dist_automake_ac_DATA): Rename ...
(nobase_dist_automake_ac_DATA): ... like this.
Add 'm4/internal/ac-config-macro-dirs.m4' to it.
* t/aclocal-acdir.sh: Adjust to avoid spurious failures.

Helped-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Makefile.am
aclocal.in
m4/internal/ac-config-macro-dirs.m4 [new file with mode: 0644]
t/aclocal-acdir.sh