Re: problem with ./configure

Eric Blake <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Organization Red Hat, Inc.
Message-ID <[email protected]>
On 09/12/2013 10:05 AM, Zack Weinberg wrote:
> On 2013-09-12 11:25 AM, Eric Blake wrote:
>>
>> -for ac_option in --version -v -V -qversion; do
>> +for ac_option in --version -v -V -qversion -version; do
>>     _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
> 
> This isn't anything to do with your change, but -qversion should be
> moved to the second position in this list, because the AIX compiler's
> response to any unrecognized command-line option is to dump its _entire
> manpage_ to stdout, which is IIRC about 10,000 lines of text.  I see
> that _AC_DO_LIMIT clips to ten lines by default, so we're not gonna get
> a ridiculous amount of junk in config.log, but it would still be more
> efficient to have it closer to the beginning (I only suggest we put it
> second because it's far more likely that the user actually has a
> compiler that understands --version).

That could help if we had a 'break' statement to abort the loop once we
think a version had been scraped; but right now, the full loop is
executed to completion regardless of what option(s) the compiler
understands (and in the case of gcc, executing both --version AND -v is
useful, as they give different outputs, both of which are useful).

I'm okay if someone writes a patch to propose such an early exit (the
fewer times we execute 'gcc', the faster a configure script will run -
provided we aren't adding more forks in our decision for an early exit
in the first place), but am not sure I will tackle it myself.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc (application/pgp-signature, 621 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJSMeg3AAoJEKeha0olJ0Nq6e4H/3gAlAL3EJRse77s8mFzhgwV
oXg8mh1MK7i5xBX6qxV9kGubXdyUljwRH0So5y4WIlpj1tEzVMeB990O1wJDEX46
Ay7XNNSXWAs3hibpIOL1saoBRTeqItfi2JsmPAz8PgMQDoUbEfcAXFn5TQYiMOsy
cyrkLpvnocleX9uBN6LFhkv0TdPETQPTeA8RGl9jLIdptcMGzOK3jLhdA0Kc5hXJ
VfacQ5KEIJb1Becaxor7bZI88DZwOKYX9yN9bRzEUF1sWtE0FEgbr5FdVTx9MYpe
i5pL06mm+ujID6Yvb6dKTf+THtt5jnPz3DW+0o4RS/opAsiCvCOHw0n02DaOVaw=
=X9MD
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.