[autotools] possibly undefined macro: AC_MSG_ERROR

I just lost a few hours on this one. My conclusion:

  • Depending on version and whatever other local conditions, autoconf will spit out the message about AC_MSG_ERROR undefined when it encounters ANY undefined macro. The AC_MSG_ERROR is a red herring. The causes for an undefined macro can be:
    • A typo in a macro name in the file, or a local macro which has not been shipped with the tarball
    • Missing a package which would have come with a set of autoconf macros, one of which is used in the file. pkg-config is often the missing one (because of, e.g.,PKG_CHECK_MODULES), but this could be any other package supplying a needed but absent macro. The vicious thing of course, is that this happens before the still not existing configure script could check for the missing package...