aclocal buglet? Was: Re: more cvs problems

Soren Harward <> writes:

> Problem 2: I compiled/installed glib just fine, but now gtk+ aborts
> with a "./configure: syntax error near unexpected token
> 'AM_INIT_AUTOMAKE' What version of automake do I need to be running?
> I'm running 1.3-2 that came with my RedHat 5.1. (this also is off my
> 980715 snapshots)

Don't know whether this applies to you as well, but I ran into this
error yesterday and was able to track it down to an aclocal
deficiency.  aclocal scans all *.m4 files it finds in
<aclocal-install-prefix>/share/aclocal and concatenates all those
whose macros are used in your into an aclocal.m4.

I had to instruct aclocal to as well look in my personal
$HOME/share/aclocal using ACLOCAL_FLAGS="-I $HOME/share/aclocal"
because I have some things installed in private.  Now, if aclocal
finds a duplicate macro definition, it won't write aclocal.m4 in the
end.  Thus, things like AM_INIT_AUTOMAKE are unknown to autoconf
afterwards and result in an invalid ./configure.

Personally, I do consider this an aclocal buglet because sometimes one
would want to overwrite `system wide' aclocal macro definitions woth
`private' ones.  I think this should be supported as an option to
aclocal, something like `aclocal --allow-duplicate-macros' or some
such.  What do others think?

For the time being, I patched up a private copy of aclocal like thus:
--- /usr/local/bin/aclocal	Tue Apr 14 12:37:19 1998
+++ ./aclocal	Fri Jul 17 14:13:25 1998
@@ -380,11 +380,6 @@
 		$map{$1} = $file;
 	    # Allow acinclude.m4 to override other macro files.
-	    elsif ($map{$1} ne 'acinclude.m4' || $file eq 'acinclude.m4')
-	    {
-		warn "aclocal: $file: $.: duplicated macro \`$1'\n";
-		$exit_status = 1;
-	    }
 	    print STDERR "Found macro $1 in $file: $.\n" if $verbosity;

I would welcome comments on whether this is an aclocal bug or not, and


Alexander Jolk * * +49-721-608-3572

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]