4

I am trying to compile mate-desktop but when I run ./autogen.sh the script terminates with these errors

Checking for required M4 macros...
  libtool.m4 not found
  glib-gettext.m4 not found
  intltool.m4 not found
  pkg.m4 not found
  gtk-doc.m4 not found
  yelp.m4 not found
***Error***: some autoconf macros required to build mate-desktop
  were not found in your aclocal path, or some forbidden
  macros were found.  Perhaps you need to adjust your
  ACLOCAL_FLAGS?

What do I need to do to get rid of these errors? I tired installing the latest versions of inittool, glib, gtk, yelp, etc... but I still get the macros errors.

Zanna
  • 69,223
  • 56
  • 216
  • 327
j0h
  • 14,548
  • 28
  • 104
  • 178
  • Do the listed macros exist (in /usr/share/aclocal by default, I think) and the autogen script is simply not finding them - or are they actually missing? – steeldriver Sep 13 '15 at 00:55
  • @steeldriver yes, the macros are in that directory, what should I do? – j0h Sep 13 '15 at 01:08
  • 1
    I don't know why it wouldn't be finding macros in (what I believe is) the *standard* directory, however you could try `ACLOCAL_FLAGS="-I /usr/share/aclocal" ./autogen.sh`. If you installed mate-common in /usr/local you may need to add that as well i.e. `ACLOCAL_FLAGS="-I /usr/share/aclocal -I /usr/local/share/aclocal" ./autogen.sh` – steeldriver Sep 13 '15 at 01:32
  • 1
    You are missing the development packages for some of the dependencies. You'll need to install the appropriate -dev packages that provide those files. – dobey Sep 13 '15 at 02:12
  • @steeldriver That did it! Thanks! If you want to mark that in as answer I'll give it to you and this question can be solved! – j0h Sep 13 '15 at 02:39

1 Answers1

8

By default, aclocal should search the /usr/share/aclocal directory for macros - as indicated by the --print-ac-dir option:

$ aclocal --print-ac-dir 
/usr/share/aclocal

However, if for some reason yours is failing to search there, you can add an explicit search path via the ACLOCAL_FLAGS environment variable e.g.

ACLOCAL_FLAGS="-I /usr/share/aclocal" ./autogen.sh

Note that both the mate-common and gtk-doc installations from github default to installing their m4 macros into /usr/local/share/aclocal which isn't searched by default even with a "working" aclocal; you can add this path the same way i.e.

ACLOCAL_FLAGS="-I /usr/share/aclocal -I /usr/local/share/aclocal" ./autogen.sh
steeldriver
  • 131,985
  • 21
  • 239
  • 326