itchconfig Documentation
Macros: Substitution


Substitutes the identifier id with the given value as defined by the behavior. The id should only consist of upper-case letters, numbers and underscore characters, and the first character should be a letter. IC_SUBSTITUTE has an immediate effect, so executing it twice with the same id in the same execution path probably won't do what you want because the effect of the first execution isn't undone.

The behavior is a number which is interpreted as a bitwise-or combination of the following:


Executes the command and substitutes id with the resulting output string. You can execute "normal" programs like echo or sed, but you can also e.g. run a config.guess script (with a command like "./config.guess") if you add one to the software package.

If flags & 1, the output of stdout is considered. If flags & 2, the output of stderr is considered. If flags & 4, an extra identifier exitcode_id will be created and contain the exit code of the command; you can use this e.g. to find out whether the output was valid. The name of the exitcode_id is constructed by appending "_E" to id; e.g. if id is "FOO", exitcode_id will be named "FOO_E".


If you have a series of substitution commands in your configure.base file, you can put them into an IC_SUBSTITUTE_BEGIN ... IC_SUBSTITUTE_END block. This causes a little optimization of the generated shell script code in the configure script. - The block may only contain IC_SUBSTITUTE, IC_OPTION_ENABLE and IC_OPTION_SET commands, anything else could result in a buggy script.




Changes the standard identifier substitution behavior (the value which was initialized with IC_BEGIN).


This is a special command for packages which need more flexible auto-constructed substitution identifiers. By default, some commands use standard identifier prefix and suffix values; for example, IC_OPTION_ENABLE uses the prefix "OPTION_", IC_C_HEADERS uses the prefix "HAVE_", and IC_C_RUN uses the suffix "_O" for extra output identifiers. In rare cases, this might lead to name-space clashes; e.g. if IC_C_FUNCTIONS and IC_C_LIBRARY test for a function/library with the same name foo, they create the same test-result identifier HAVE_FOO. To solve this unlikely problem, this command allows you to change any standard prefix and suffix values; the following list shows "kind - standard value - information":

This documentation file is part of version 0.0.4 of itchconfig, a configuration tool created by Arne Thomaßen. itchconfig is basically released under certain versions of the GNU General Public License and WITHOUT ANY WARRANTY. Copyright (C) 2002 Arne Thomaßen.