[MPlayer-dev-eng] [PATCH] configure: much faster configure --help

Erik Auerswald auerswal at unix-ag.uni-kl.de
Mon Feb 11 22:56:54 CET 2013


Hi Alexander,

On 02/11/2013 09:32 PM, Alexander Strasser wrote:
> Erik Auerswald wrote:
>> MPlayer's configure does a lot of work before checking command line
>> options. This includes updating of an ffmpeg git repository before
>> producing help output, even when only asked for help.
>>
>> The attached patch rearranges configure's help output code to be in
>> front of ffmpeg repo checks and updates and introduces a new check,
>> if the first command line option is --help or -h and prints the help
>> immediately.
>>
>> This drastically speeds up checking for available configure options,
>> if done the common way of "./configure --help". If the --help resp.
>> -h option is somewhere else on configure's command line, the (kept)
>> existing check will find this after doing all the initial setup
>> work, taking much longer overall.
>
>    sounds useful to me.

:-)

>> Index: configure
>> ===================================================================
>> --- configure	(revision 35910)
>> +++ configure	(working copy)
> [...]
>> +if test "( $1 = --help ) || ( $1 = -h )" ; then
>> +    show_help
>> +fi
>
>    You should also check for "-help" here. Else the option behaves
> differently when given as the first argument.

You're right, i missed "-help". Fixed in attached v2 patch.

>    BTW did it work for you in both cases? The if-condition looks fishy to me.

Yes, works for me (bash as /bin/sh). But you are right, the condition 
should use -o instead of ||.

> Instead of using the if-keyword it might be more practical to duplicate the
> case from the option parsing loop, just with the one entry looking for the
> help options only.

Did this in v2.

> [...]
>
>    Otherwise LGTM.
>
>    Alexander
>
> PS.
> Note that I am not the MPlayer configure maintainer.

I know...

Thanks for reviewing, maybe someone finds this useful.

Erik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-configure-short_circuit_--help_v2.patch
Type: text/x-diff
Size: 14202 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20130211/f2507f53/attachment-0001.bin>


More information about the MPlayer-dev-eng mailing list