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
Description: OpenPGP digital signature
