]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/c.m4 (_AC_PROG_PREPROC_WORKS_IFELSE): Remove
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 6 Oct 2006 17:43:55 +0000 (17:43 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 6 Oct 2006 17:43:55 +0000 (17:43 +0000)
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'.

ChangeLog
lib/autoconf/c.m4
lib/autoconf/general.m4
lib/autoconf/lang.m4

index 83febf4a9cf3c69eaa76cf5e7de2ece76ba27c09..f68f9b867cf7a6d4498c4186ce7784d1bb257ec0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * 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'.
+
 2006-10-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE):
index 50e8d7bf6b64e9d434dab06106524d3b98d1e7d8..2f9c8fc883fc26b460e420ce100c1053f0ee48ac 100644 (file)
@@ -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 7a5bc3aff6b64c9de44d53affe4df26d2745ade5..eeb77485df84b9728792d2d80dec70fa5cd7c352 100644 (file)
@@ -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 c0b2505d645bee905782b99f2cfde87a53126c90..98166339ee992d4dfc5f5247d4950064137a2eee 100644 (file)
@@ -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