automake: Options generalities

1 
1 17.1 Options generalities
1 =========================
1 
1 Various features of Automake can be controlled by options.  Except where
1 noted otherwise, options can be specified in one of several ways.  Most
1 options can be applied on a per-‘Makefile’ basis when listed in a
1 special ‘Makefile’ variable named ‘AUTOMAKE_OPTIONS’.  Some of these
1 options only make sense when specified in the toplevel ‘Makefile.am’
1 file.  Options are applied globally to all processed ‘Makefile’ files
1 when listed in the first argument of ‘AM_INIT_AUTOMAKE’ in
1 ‘configure.ac’, and some options which require changes to the
1 ‘configure’ script can only be specified there.  These are annotated
1 below.
1 
1    As a general rule, options specified in ‘AUTOMAKE_OPTIONS’ take
1 precedence over those specified in ‘AM_INIT_AUTOMAKE’, which in turn
1 take precedence over those specified on the command line.
1 
1    Also, some care must be taken about the interactions among strictness
1 level and warning categories.  As a general rule, strictness-implied
1 warnings are overridden by those specified by explicit options.  For
1 example, even if ‘portability’ warnings are disabled by default in
1 ‘foreign’ strictness, an usage like this will end up enabling them:
1 
1      AUTOMAKE_OPTIONS = -Wportability foreign
1 
1    However, a strictness level specified in a higher-priority context
1 will override all the explicit warnings specified in a lower-priority
1 context.  For example, if ‘configure.ac’ contains:
1 
1      AM_INIT_AUTOMAKE([-Wportability])
1 
1 and ‘Makefile.am’ contains:
1 
1      AUTOMAKE_OPTIONS = foreign
1 
1 then ‘portability’ warnings will be _disabled_ in ‘Makefile.am’.
1