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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

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

  




 

 

9.5 Obsoleting Macros

Configuration and portability technology has evolved over the years. Often better ways of solving a particular problem are developed, or ad-hoc approaches are systematized. This process has occurred in many parts of Autoconf. One result is that some of the macros are now considered obsolete; they still work, but are no longer considered the best thing to do, hence they should be replaced with more modern macros. Ideally, autoupdate should replace the old macro calls with their modern implementation.

Autoconf provides a simple means to obsolete a macro.

— Macro: AU_DEFUN (old-macro, implementation, [message])

Define old-macro as implementation. The only difference with AC_DEFUN is that the user is warned that old-macro is now obsolete.

If she then uses autoupdate, the call to old-macro is replaced by the modern implementation. message should include information on what to do after running autoupdate; autoupdate prints it as a warning, and includes it in the updated configure.ac file.

The details of this macro are hairy: if autoconf encounters an AU_DEFUNed macro, all macros inside its second argument are expanded as usual. However, when autoupdate is run, only M4 and M4sugar macros are expanded here, while all other macros are disabled and appear literally in the updated configure.ac.

— Macro: AU_ALIAS (old-name, new-name)

Used if the old-name is to be replaced by a call to new-macro with the same parameters. This happens for example if the macro was renamed.


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