7.5.1.2 Program Configuration

Programs may be “pre-configured” before normal command line options
are processed (See see section Immediate Action Attributes).
How configuration files and environment variables are handled get
specified with these attributes.

‘disable-load’

‘disable-save’

Indicates that the command line usage of ‘--load-opts’ and/or
‘--save-opts’ are disallowed.

‘environrc’

Indicates looking in the environment for values of variables named,
PROGRAM_OPTNAME or PROGRAM, where PROGRAM is the
upper cased C-name of the program and ‘OPTNAME’ is the
upper cased C-name of a specific option. The contents of
the PROGRAM variable, if found, are tokenized and processed.
The contents of PROGRAM_OPTNAME environment variables are taken
as the option argument to the option nameed ‘--optname’.

‘homerc’

Specifies that option settings may be loaded from and stored into
configuration files. Each instance of this attribute is either a directory
or a file using a specific path, a path based on an environment variable or
a path relative to installation directories. The method used depends on
the name. If the one entry is empty, it enables the loading and storing of
settings, but no specific files are searched for. Otherwise, a series of
configuration files are hunted down and, if found, loaded.

If the first character of the ‘homerc’ value is not the dollar
character ($), then it is presumed to be a path name based on the
current directory. Otherwise, the method depends on the second character:

$

The path is relative to the directory where the executable was found.

@

The path is relative to the package data directory, e.g.
‘/usr/local/share/autogen’.

[a-zA-Z]

The path is derived from the named environment variable.

Use as many as you like. The presence of this attribute
activates the ‘--save-opts’ and ‘--load-opts’ options.
However, saving into a file may be disabled with the ‘disable-save’.
See section configuration file presets.
See the optionMakePath(3AGEN) man page for excruciating details.

‘rcfile’

Specifies the configuration file name. This is only useful if you
have provided at least one homerc attribute.

default: .<prog-name>rc

‘vendor-opt’

This option implements the ‘-W’ vendor option command line option.

For POSIX specified utilities, the options are constrained to the options
that are specified by POSIX. Extensions should be handled with ‘-W’
command line options, the short flag form. Long option name processing
must be disabled. In fact, the long-opts attribute must not be
provided, and some options must be specified without flag values.

The ‘-W long-name’ is processed by looking up the long option
name that follows it. It cannot be a short flag because that would
conflict with the POSIX flag name space. It will be processed as if
long options were accepted and ‘--long-name’ were found on the
command line.