However, after trying the above ACLOCAL_FLAGS trick, you might run into further problems, as shown below:
./autogen.sh
[...snip...]
aclocal: /usr/local/share/aclocal/glib.m4: 8: duplicated macro
`AM_PATH_GLIB'
[...snip...]
aclocal: configure.in: 13: macro `AM_PROG_LIBTOOL' not found in library
aclocal: configure.in: 19: macro `AM_PATH_GTK' not found in library
aclocal: configure.in: 19: macro `AM_PATH_GTK' not found in library
[...snip...]
This is caused when there is something wrong with the m4 macros. In this case, the "duplicated macro" is the first warning that something has gone awry. If we look at the /usr/share/aclocal directory, we find the files:
% ls /usr/share/aclocal
ccstdc.m4 gimp.m4 lcmessage.m4 missing.m4 protos.m4 strtod.m4
cond.m4 glib.m4 lex.m4 mktime.m4 ptrdiff.m4 termios.m4
dmalloc.m4 guile.m4 libmikmod.m4 multi.m4 qthreads.m4 winsz.m4
error.m4 header.m4 lispdir.m4 obstack.m4 regex.m4
gettext.m4 init.m4 maintainer.m4 progtest.m4 sanity.m4
while in /usr/local/share/aclocal we find:
% ls /usr/local/share/aclocal
audiofile.m4 glib.m4 gtk.m4 libIDL.m4 libglade.m4 sigc++.m4
esd.m4 gtk--.m4 imlib.m4 libart.m4 libtool.m4
Clearly, the glib.m4 file is duplicated. We must get rid of the duplication, in favor of the new(er) libraries installed in /usr/local. So a simple:
mv /usr/share/aclocal/glib.m4 /usr/share/aclocal/glib.m4.old |
and rerun the autogen.sh leads to a successful build.
Thanks to Michael Meeks, Morten Welinder, and Miguel Icaza for the hints, tips, tricks, and suggestions described in the above FAQ.
The problems described above are not a dramatization or re-enactment of events. The problems were real. The solutions are real. Really.