autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_PROG_WERROR


From: Akim Demaille
Subject: Re: AC_PROG_WERROR
Date: Thu, 23 Oct 2003 10:01:14 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

 > @@ -2150,7 +2151,9 @@ AC_DEFUN([AC_EGREP_HEADER],
 >  m4_define([_AC_COMPILE_IFELSE],
 >  [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 >  rm -f conftest.$ac_objext
 > -AS_IF([AC_TRY_EVAL(ac_compile) &&
 > +AS_IF([_AC_EVAL_STDERR($ac_compile) &&
 > +     AC_TRY_COMMAND([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag"
 > +                     || test ! -s conftest.err]) &&
 >       AC_TRY_COMMAND([test -s conftest.$ac_objext])],
 >        [$2],
 >        [_AC_MSG_LOG_CONFTEST

Actually this patch was not complete: it creates conftest.err files,
and forgets to clean them.  Did you run the test suite?  It fails
here, because of this.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * lib/autoconf/general.m4 (_AC_LINK_IFELSE, _AC_COMPILE_IFELSE):
        Don't forget to remove conftest.err.

Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.821
diff -u -u -r1.821 general.m4
--- lib/autoconf/general.m4 23 Oct 2003 07:49:16 -0000 1.821
+++ lib/autoconf/general.m4 23 Oct 2003 07:55:18 -0000
@@ -1993,9 +1993,11 @@
 
 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
 # -----------------------------------------
-# Eval COMMAND, save its stderr into conftest.err, save the exit status
-# in ac_status, and log it.
+# Run COMMAND, save its stderr into conftest.err, save the exit status
+# in ac_status, and log it.  Don't forget to clean up conftest.err after
+# use.
 # Note that when tracing, most shells will leave the traces in stderr
+# starting with "+": that's what this macro tries to address.
 AC_DEFUN([_AC_RUN_LOG_STDERR],
 [{ ($2) >&AS_MESSAGE_LOG_FD
   ($1) 2>conftest.er1
@@ -2017,9 +2019,8 @@
 
 # _AC_EVAL_STDERR(COMMAND)
 # ------------------------
-# Eval COMMAND, save its stderr into conftest.err, save the exit status
-# in ac_status, and log it.
-# Note that when tracing, most shells will leave the traces in stderr
+# Same as _AC_RUN_LOG_STDERR, but evals  (instead of the running) the
+# COMMAND.
 AC_DEFUN([_AC_EVAL_STDERR],
 [_AC_RUN_LOG_STDERR([eval $1],
                    [eval echo "$as_me:$LINENO: \"$1\""])])
@@ -2158,7 +2159,7 @@
       [$2],
       [_AC_MSG_LOG_CONFTEST
 m4_ifvaln([$3],[$3])dnl])dnl
-rm -f conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
+rm -f conftest.err conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
 ])# _AC_COMPILE_IFELSE
 
 
@@ -2199,7 +2200,8 @@
       [$2],
       [_AC_MSG_LOG_CONFTEST
 m4_ifvaln([$3], [$3])dnl])[]dnl
-rm -f conftest.$ac_objext conftest$ac_exeext m4_ifval([$1], 
[conftest.$ac_ext])[]dnl
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
 ])# _AC_LINK_IFELSE
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]