Given the name AM_PATH_GTK_2_0, the following sequence of observations is made: 1) "AM_" is in the automake namespace, so the m4 macro must come from automake. 2) Hmmm, this is not in automake. 3) This probably comes from gtk, so the gtk developer made a mistake when naming their m4 macro in conflict with automake. This is a bug in gtk, but I will probably need to download the latest gtk to get the macro.
The problem is that you don't have the m4 macro, which you expect is gtk. You probably need to install libgtk-devel (or something like that). If I'm right, and libgtk does install the m4 macro with the name AM _..., report this as a bug for developers. They stomp in the automakes namespace (this is, unfortunately, an extremely common mistake.)
Since you mention downloading automake, I think the problem is that you are using aclocal, which is not looking for / usr / share / aclocal, but in a different place (i.e. you installed automake in / usr / local) When you installed libgtk -dev, he probably installed the * .m4 file in / usr / share / aclocal, but you need this file in / usr / local / share / aclocal (or $ prefix / share / aclocal, where the prefix is ββwhat you used automake to install.) The easiest solution is to copy this file to $ (aclocal -print). That is, run "aclocal -print" to see where aclocal is looking for m4 files, and then find the file that is installed by libgtk-dev that defines the unnamed macro m4 and copies this file to the appropriate location. Alternatively (and probably the best solution), you can put a file called dirlist in $ (aclocal -print) that contains one line of "/ usr / share / aclocal", so your manual installation of aclocal will always look for m4 files that installed in / usr / share.
source share