autoconf: Configuration Commands
1
1 4.10 Running Arbitrary Configuration Commands
1 =============================================
1
1 You can execute arbitrary commands before, during, and after
1 `config.status' is run. The three following macros accumulate the
1 commands to run when they are called multiple times.
1 `AC_CONFIG_COMMANDS' replaces the obsolete macro `AC_OUTPUT_COMMANDS';
1 see ⇒Obsolete Macros, for details.
1
1 -- Macro: AC_CONFIG_COMMANDS (TAG..., [CMDS], [INIT-CMDS])
1 Specify additional shell commands to run at the end of
1 `config.status', and shell commands to initialize any variables
1 from `configure'. Associate the commands with TAG. Since
1 typically the CMDS create a file, TAG should naturally be the name
1 of that file. If needed, the directory hosting TAG is created.
11 This macro is one of the instantiating macros; see ⇒
Configuration Actions.
1
1 Here is an unrealistic example:
1 fubar=42
1 AC_CONFIG_COMMANDS([fubar],
1 [echo this is extra $fubar, and so on.],
1 [fubar=$fubar])
1
1 Here is a better one:
1 AC_CONFIG_COMMANDS([timestamp], [date >timestamp])
1
1 The following two macros look similar, but in fact they are not of
1 the same breed: they are executed directly by `configure', so you
1 cannot use `config.status' to rerun them.
1
1 -- Macro: AC_CONFIG_COMMANDS_PRE (CMDS)
1 Execute the CMDS right before creating `config.status'.
1
1 This macro presents the last opportunity to call `AC_SUBST',
1 `AC_DEFINE', or `AC_CONFIG_ITEMS' macros.
1
1 -- Macro: AC_CONFIG_COMMANDS_POST (CMDS)
1 Execute the CMDS right after creating `config.status'.
1