third-party m4 files, then exit
--verbose don't be silent
--version print version number, then exit
- -W, --warnings=CATEGORY report the warnings falling in CATEGORY
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY,
+ defaults to $WARNINGS
+
EOF
print Automake::ChannelDefs::usage (), "\n";
+ # This output depends on the current environment, and when generating the man
+ # pages during Automake compilation, the environment is set to local values.
+ # So don't include it in the installed man page.
+ if (!$ENV{AUTOMAKE_HELP2MAN}) {
+ print <<"EOF";
+
+Current m4 search paths (in order):
+ -I dirs: @user_includes
+ --automake-acdir: @automake_includes
+ \$ACLOCAL_AUTOMAKE_DIR: $ENV{"ACLOCAL_AUTOMAKE_DIR"}
+ \$ACLOCAL_PATH: $ENV{"ACLOCAL_PATH"}
+ --system-acdir: @system_includes
+EOF
+ }
+
print <<'EOF';
+
Report bugs to <@PACKAGE_BUGREPORT@>.
GNU Automake home page: <@PACKAGE_URL@>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
parse_WARNINGS; # Parse the WARNINGS environment variable.
parse_arguments;
-parse_ACLOCAL_PATH;
+parse_ACLOCAL_PATH; # Should come after parse arguments.
$configure_ac = require_configure_ac;
# We may have to rerun aclocal if some file have been installed, but