* 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'.
This commit is contained in:
Paul Eggert 2006-10-06 17:43:55 +00:00
parent ee62b2bba5
commit b98231106c
4 changed files with 34 additions and 29 deletions

View File

@ -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):

View 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

View 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])

View 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