[FFmpeg-devel] [PATCH] build: make sure probed tools don't wait for stdin input.

James Almer jamrial at gmail.com
Fri Feb 15 01:08:39 CET 2013


On 08/01/13 8:15 PM, Clément Bœsch wrote:
> a758c5e added probing for various tools, such as as. Unfortunately, GNU
> as is reading stdin with -v, and thus configure is stalled with
> configure arguments such as --as=as.
> 
> The --version calls are unchanged because it is supposed to -v + exit.
> 
> Fixes Ticket #1898.
> ---
>  configure | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/configure b/configure
> index 576905c..5dd27c9 100755
> --- a/configure
> +++ b/configure
> @@ -2545,14 +2545,14 @@ probe_cc(){
>      unset _depflags _DEPCMD _DEPFLAGS
>      _flags_filter=echo
>  
> -    if $_cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
> +    if $_cc -v 2>&1 < /dev/null | grep -q '^gcc.*LLVM'; then
>          _type=llvm_gcc
>          gcc_extra_ver=$(expr "$($_cc --version | head -n1)" : '.*\((.*)\)')
>          _ident="llvm-gcc $($_cc -dumpversion) $gcc_extra_ver"
>          _depflags='-MMD -MF $(@:.o=.d) -MT $@'
>          _cflags_speed='-O3'
>          _cflags_size='-Os'
> -    elif $_cc -v 2>&1 | grep -qi ^gcc; then
> +    elif $_cc -v 2>&1 < /dev/null | grep -qi ^gcc; then

The output of GNU as for example doesn't contain "GCC" anywhere. You should use 
grep -qi '^g\(cc\|nu\)' instead.

Regards.


More information about the ffmpeg-devel mailing list