Hi Bruno,
On 7/8/11 5:24 PM, Bruno Haible wrote:
+If you are using GNU @code{automake} 1.10 or newer, it is even easier:
+Add the line
+
+@example
+ACLOCAL_AMFLAGS = --install -I m4
+@end example
+
+@noindent
+to your top level @file{Makefile.am}, and run @samp{aclocal --install -I m4}.
+This will copy the needed files to the @file{m4/} subdirectory automatically,
+before updating @file{aclocal.m4}.
+
I used to do this as it is an easy way to stay up to date with 3rd party
m4 files. I stopped doing this, however, after Ralf Wildenhues made me
aware there is a risk doing so. The risk is that aclocal will copy 3rd
party m4 files into m4 not only for you but also for your users if they
happen to run aclocal. Say, e.g., that a user want to build a somewhat
old version of your package from git; he bootstraps and as he has newer
versions of the m4 files available on his system aclocal copies them
into m4, which may cause problems as they are not necessarily compatible
with your configure.ac. To avoid this from happen, I've removed the
--install flag from my packages and calls aclocal --install -I m4
frequently instead.
There is, obviously, a risk doing this way, as mentioned above in this
thread, because if I'm not careful I may release a tarball with missing
m4 files. Would distcheck detect a missing m4 file, or would it be
possible to modify distcheck so it could warn about this case?
Cheers,
Peter