On 12/13/2012 05:58 AM, Stefano Lattarini wrote:
> Hi Eduardo.
> 
> On 12/11/2012 12:57 AM, Eduardo Costa wrote:
>> Hi,
>>
>> Is it possible at all to have a configure option whose help message can 
>> expand a
>> variable, or can otherwise accept the output of a command at configure-time?
>>
>> For example, imagine this as part of the output of `./configure':
>>
>> --with-user=user        Who to complain to (default X)
>>
>> Where X could be, say, the output of the command `whoami'.
>>
>> This might be done by usual means (couldn't do it) or just with some
>> trickery to to inject the string manually at the end of some section
>> (say HELP_CANON or other), and giving the output of the command on a
>> new line, so it doesn't get inside the `cat << LABEL ... LABEL'
>> constructs that seem to be used to output options and help messages.

Unfortunately, it looks like the current setup of autoconf is pretty
hard-coded to constant strings determined at m4-time; making it use
shell variables for dynamic output would require quite a bit of patching
(maybe by introducing new macros such as AC_ARG_WITH_UNQUOTED, to take
care of the tweaks needed to close the quoted heredoc, open an unquoted
heredoc to do the substitution, then reopen the quoted heredoc for the
rest of the script).  It sounds like a useful request, though.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
https://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to