>> Hmm, you were right: we are still buggy. M4sh should be the one
>> guaranteeing
>> that we do SHELL=${CONFIG_SHELL-/bin/sh}, and not autoconf/general.m4.
>> Otherwise, AS_INIT_GENERATED is broken when using m4sh but not autoconf, and
>> when CONFIG_SHELL is not set.
I fail to understand this. It is AS_INIT_GENERATED that writes
SHELL=\${CONFIG_SHELL-$SHELL}
to config.status.
>> We probably ought to document that restriction
>> as part of AS_INIT_GENERATED. It also makes me wonder if it is possible to
>> check whether the user is executing a script under a different shell than
>> the
>> #! line, in the case where they had not set CONFIG_SHELL.
>
> AFAIK it is not easy to portably find out which shell we're under.
Throwing this in the air: what about the entry value of $_ at the top of
the script?
Paolo