This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with bfd/aclocal.m4

On Sep  5, 2000, Nick Clifton <> wrote:

> : I could be wrong. But from bfd/Makefile, you should do
> : 
> : # aclocal
> : 
> : to update aclocal.m4.

> Well that should work, but it turns out that the real problem was a
> buggy/extraneous .m4 file in my share/aclocal directory.

Maybe they're not buggy nor erroneous.  Accompanying all `sinclude'
statements in acinclude.m4, there are a couple of AC_DEFUNs that are
ignored by m4, but that are there to satisfy aclocal, and prevent it
from bringing any further m4 macros into aclocal.m4, since we know
they're already defined in the included file.

I have attempted to provide all needed AC_DEFUNs, and tested with more
than one version of aclocal, but it may be that I missed some macro.
In this case, aclocal would pull the m4 file from .../share/aclocal
into aclocal.m4.  And then, since acinclude.m4 includes libtool.m4 and
gettext.m4, you may end up with macros being defined twice.

This would be ok if the macro names were properly quoted, i.e.:


but many people take a shortcut and write:


In this case, if NAME_OF_MACRO is already defined, it is expanded
in-place, before AC_DEFUN is processed, and all the hell breaks

The following patch to the aclocal perl-script helped me find out
which macros were causing m4 files to be brought into aclocal.m4.
Please take a copy of your aclocal script, apply the patch in the
copy, and let me know which macros cause gettext.m4, lcmessage.m4 or
libtool.m4 from .../share/aclocal to be brought into aclocal.m4.  Or,
even better, post patches to the corresponding acinclude.m4 :-)

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]