GNU Autoconf, Automake, and Libtool
by Gary V. Vaughan, Ben Elliston, Tom Tromey, Ian Lance Taylor
22.3.4. Naming Macros
Just like functions in a C program, it is important to choose a good name for your Autoconf macros. A well-chosen name helps to unambiguously describe the purpose of the macro. Macros in M4 are all named within a single namespace and, therefore, it is necessary to follow a convention to ensure that names retain uniqueness. This reasoning goes beyond just avoiding collisions with other macros—if you happen to choose a name already known to M4 as a definition of any kind, your macro's name could be rewritten by the prior definition during macro processing.
One naming convention has emerged: prefixing each macro name with the name of the package that the macro originated in or the initials of the macro's author. Macros are ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access