Hello, On Sun, Jul 01, 2007 at 05:18:18PM +0200, Hans Ulrich Niedermann wrote: > [...] The user expectation is that running a program with "--help" or > "--version" just prints the help text or version and then exits without > causing *any* side effects.
right. If I remember correctly, configure --help and --version just prints a fixed text, which is known at the time the script is built. Consequently, the following code might be added near the top of the script: case $1 in --help | --help=* ) # Print the help. exit;; --version ) # Print the info. exit;; esac Of course, we need a hook to place this code before most of the m4sh initialization, but that can be done without compromising the backward compatibility. > (6) Get rid of the write requirements. Does "--help=recursive" really > require PATH_SEPARATOR and the other things determined via writing to disk? This would be a variant of the above. Near the top of m4sh initialization, we'd do: case $1 in --help | --help=* | --version ) as_skip_wr_tests=yes ;; esac And then put the test which write to cwd inside an if test -z "$as_skip_wr_tests" Would it be too crazy to hardwire this into the AS_INIT code? The --help and --version option are special: they are defined in the GCS. Comments welcome. (Consequently, until the above is proved to be too naive, I do not support the fix proposed by Ralf.) Stepan