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

Michael Niedermayer michaelni at gmx.at
Sat Oct 26 22:22:26 CEST 2013


On Thu, Feb 14, 2013 at 09:08:39PM -0300, James Almer wrote:
> 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.

this breaks the code:

as: unrecognized option '-dumpversion'
as: unrecognized option '-dumpversion'

and its not surprising, as is not gcc

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131026/d8975138/attachment.asc>


More information about the ffmpeg-devel mailing list