Hi Paolo,

* Paolo Bonzini wrote on Thu, Nov 06, 2008 at 11:28:29AM CET:
> --- a/lib/autoconf/general.m4
> +++ b/lib/autoconf/general.m4
> @@ -2253,11 +2253,13 @@ AC_DEFUN([_AC_RUN_LOG],
>  # in AS_IF constructs.
>  AC_DEFUN([_AC_RUN_LOG_STDERR],
>  [{ { $2; } >&AS_MESSAGE_LOG_FD
> -  ($1) 2>conftest.er1
> +  ($1) 2>conftest.err

Why not 2>conftest.er1 and ...

>    ac_status=$?
> -  grep -v '^ *+' conftest.er1 >conftest.err
> -  rm -f conftest.er1
> -  cat conftest.err >&AS_MESSAGE_LOG_FD
> +  if test -s conftest.err; then
> +    grep -v '^ *+' conftest.err >conftest.er1
> +    cat conftest.er1 >&AS_MESSAGE_LOG_FD

... putting an
  else
    : >conftest.err

here (and adjusting the rest of the code) and saving an added fork (the
mv) in the nonempty-warning case, at the expense of more file operations
in the empty case.  Otherwise, ...

> +    mv conftest.er1 conftest.err

... this needs to be 'mv -f'.

> +  fi
>    _AS_ECHO_LOG([\$? = $ac_status])
>    test $ac_status = 0; }])

Cheers,
Ralf


Reply via email to