[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About dynamic configure options.

From: Eric Blake
Subject: Re: About dynamic configure options.
Date: Thu, 13 Dec 2012 10:20:30 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

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

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]