autoconf: Obsoleting Macros

1 
1 10.5 Obsoleting Macros
1 ======================
1 
1 Configuration and portability technology has evolved over the years.
1 Often better ways of solving a particular problem are developed, or
1 ad-hoc approaches are systematized.  This process has occurred in many
1 parts of Autoconf.  One result is that some of the macros are now
1 considered "obsolete"; they still work, but are no longer considered
1 the best thing to do, hence they should be replaced with more modern
1 macros.  Ideally, `autoupdate' should replace the old macro calls with
1 their modern implementation.
1 
1    Autoconf provides a simple means to obsolete a macro.
1 
1  -- Macro: AU_DEFUN (OLD-MACRO, IMPLEMENTATION, [MESSAGE])
1      Define OLD-MACRO as IMPLEMENTATION.  The only difference with
1      `AC_DEFUN' is that the user is warned that OLD-MACRO is now
1      obsolete.
1 
1      If she then uses `autoupdate', the call to OLD-MACRO is replaced
1      by the modern IMPLEMENTATION.  MESSAGE should include information
1      on what to do after running `autoupdate'; `autoupdate' prints it
1      as a warning, and includes it in the updated `configure.ac' file.
1 
1      The details of this macro are hairy: if `autoconf' encounters an
1      `AU_DEFUN'ed macro, all macros inside its second argument are
1      expanded as usual.  However, when `autoupdate' is run, only M4 and
1      M4sugar macros are expanded here, while all other macros are
1      disabled and appear literally in the updated `configure.ac'.
1 
1  -- Macro: AU_ALIAS (OLD-NAME, NEW-NAME)
1      Used if the OLD-NAME is to be replaced by a call to NEW-MACRO with
1      the same parameters.  This happens for example if the macro was
1      renamed.
1