autoconf-patches
[Top][All Lists]
Advanced

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

Re: coreutils 6.3 on Tru64 - just plain broken, or...?


From: Paul Eggert
Subject: Re: coreutils 6.3 on Tru64 - just plain broken, or...?
Date: Fri, 06 Oct 2006 10:46:31 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

> The second change causes config.log output to be less readable,
> as now the test spans multiple lines.  I think that's actually a
> regression.  Can we undo that part?

Better yet, let's not log that gorp at all.  All the user normally
cares about is that the compile or link succeeded or failed.  They
want to see the command that failed, but they don't want to see
the awful machinery we use to detect this.

Also, there's a bug in the werror_flag setting; someone sets it
to "no" who should set it to the empty string.  And the code
to check the preprocessor should be more consistent with the
code that checks the compiler and linker.

I installed this:

2006-10-06  Paul Eggert  <address@hidden>

        * lib/autoconf/c.m4 (_AC_PROG_PREPROC_WORKS_IFELSE): Remove
        comment about ac_cpp_err; it was incorrect, and anyway
        ac_cpp_err is being removed below.
        * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE): Don't
        set ac_cpp_err to 'yesyes' if preproc_warn_flag and werror_flag
        are both 'yes'.  In fact, don't bother setting ac_cpp_err at all;
        nobody uses it.
        (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Don't log our funky tests
        with werror_flag and conftest.err and so forth.  This is more
        compatible with how _AC_PROG_PREPROC_WORKS_IFELSE behaves,
        and anyway the user shouldn't normally want to see this gorp logged.
        Problem reported by Ralf Wildenhues.
        * lib/autoconf/lang.m4 (AC_LANG_WERROR): werror_flag's default is
        empty, not 'no', since the rest of the code uses 'test -z'.

Index: lib/autoconf/c.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v
retrieving revision 1.235
diff -p -u -r1.235 c.m4
--- lib/autoconf/c.m4   20 Sep 2006 18:07:47 -0000      1.235
+++ lib/autoconf/c.m4   6 Oct 2006 17:40:26 -0000
@@ -416,7 +416,6 @@ AC_DEFUN([AC_LANG_PREPROC(C)],
 # -----------------------------------------------
 # Check if $ac_cpp is a working preprocessor that can flag absent
 # includes either by the exit status or by warnings.
-# Set ac_cpp_err to a non-empty value if the preprocessor failed.
 # This macro is for all languages, not only C.
 AC_DEFUN([_AC_PROG_PREPROC_WORKS_IFELSE],
 [ac_preproc_ok=false
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.932
diff -p -u -r1.932 general.m4
--- lib/autoconf/general.m4     4 Oct 2006 19:10:49 -0000       1.932
+++ lib/autoconf/general.m4     6 Oct 2006 17:40:26 -0000
@@ -2272,23 +2272,15 @@ AC_DEFUN([AC_RUN_LOG],
 # Try to preprocess PROGRAM.
 #
 # This macro can be used during the selection of a preprocessor.
-# Run cpp and set ac_cpp_err to "yes" for an error, to
-# "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
-# neither warnings nor errors have been detected.  eval is necessary
-# to expand ac_cpp.
+# eval is necessary to expand ac_cpp.
 AC_DEFUN([_AC_PREPROC_IFELSE],
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
-if _AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_[]_AC_LANG_ABBREV[]_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-AS_IF([test -z "$ac_cpp_err"], [$2], [_AC_MSG_LOG_CONFTEST
+AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null && {
+        test -z 
"$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" 
||
+        test ! -s conftest.err
+       }],
+  [$2],
+  [_AC_MSG_LOG_CONFTEST
   $3])
 rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
 ])# _AC_PREPROC_IFELSE
@@ -2357,11 +2349,10 @@ 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_DO_STDERR($ac_compile) &&
-        _AC_DO_TOKENS([{
-             test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
-             test ! -s conftest.err
-           } && test -s conftest.$ac_objext])],
+AS_IF([_AC_DO_STDERR($ac_compile) && {
+        test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext],
       [$2],
       [_AC_MSG_LOG_CONFTEST
        $3])
@@ -2399,13 +2390,11 @@ AU_DEFUN([AC_TRY_COMPILE],
 m4_define([_AC_LINK_IFELSE],
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 rm -f conftest.$ac_objext conftest$ac_exeext
-AS_IF([_AC_DO_STDERR($ac_link) &&
-       _AC_DO_TOKENS([{
-          test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
-          test ! -s conftest.err
-        } &&
-        test -s conftest$ac_exeext &&
-        AS_EXECUTABLE_P([conftest$ac_exeext])])],
+AS_IF([_AC_DO_STDERR($ac_link) && {
+        test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       AS_EXECUTABLE_P([conftest$ac_exeext])],
       [$2],
       [_AC_MSG_LOG_CONFTEST
        $3])
Index: lib/autoconf/lang.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/lang.m4,v
retrieving revision 1.184
diff -p -u -r1.184 lang.m4
--- lib/autoconf/lang.m4        7 Aug 2006 07:10:24 -0000       1.184
+++ lib/autoconf/lang.m4        6 Oct 2006 17:40:26 -0000
@@ -667,5 +667,5 @@ ac_objext=$OBJEXT
 # Treat warnings from the current language's preprocessor, compiler, and
 # linker as fatal errors.
 AC_DEFUN([AC_LANG_WERROR],
-[m4_divert_text([DEFAULTS], [ac_[]_AC_LANG_ABBREV[]_werror_flag=no])
+[m4_divert_text([DEFAULTS], [ac_[]_AC_LANG_ABBREV[]_werror_flag=])
 ac_[]_AC_LANG_ABBREV[]_werror_flag=yes])# AC_LANG_WERROR




reply via email to

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