Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




17.6.2 New Macros

While Autoconf was relatively dormant in the late 1990s, Automake provided Autoconf-like macros for a while. Starting with Autoconf 2.50 in 2001, Autoconf provided versions of these macros, integrated in the AC_ namespace, instead of AM_. But in order to ease the upgrading via autoupdate, bindings to such AM_ macros are provided.

Unfortunately older versions of Automake (e.g., Automake 1.4) did not quote the names of these macros. Therefore, when m4 finds something like ‘AC_DEFUN(AM_TYPE_PTRDIFF_T, ...)’ in aclocal.m4, AM_TYPE_PTRDIFF_T is expanded, replaced with its Autoconf definition.

Fortunately Autoconf catches pre-AC_INIT expansions, and complains, in its own words:

     $ cat
     AC_INIT([Example], [1.0], [[email protected]])
     $ aclocal-1.4
     $ autoconf
     aclocal.m4:17: error: m4_defn: undefined macro: _m4_divert_diversion
     aclocal.m4:17: the top level
     autom4te: m4 failed with exit status: 1

Modern versions of Automake no longer define most of these macros, and properly quote the names of the remaining macros. If you must use an old Automake, do not depend upon macros from Automake as it is simply not its job to provide macros (but the one it requires itself):

     $ cat
     AC_INIT([Example], [1.0], [[email protected]])
     $ rm aclocal.m4
     $ autoupdate
     autoupdate: `' is updated
     $ cat
     AC_INIT([Example], [1.0], [[email protected]])
     $ aclocal-1.4
     $ autoconf

  Published under the terms of the GNU General Public License Design by Interspire