From: Paul Eggert Date: Fri, 6 Oct 2006 17:43:55 +0000 (+0000) Subject: * lib/autoconf/c.m4 (_AC_PROG_PREPROC_WORKS_IFELSE): Remove X-Git-Tag: AUTOCONF-2.60b~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b98231106c989e1e184197bc44e9bda208c2f8fa;p=thirdparty%2Fautoconf.git * 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'. --- diff --git a/ChangeLog b/ChangeLog index 83febf4a9..f68f9b867 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2006-10-06 Paul Eggert + + * 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 * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE): diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 50e8d7bf6..2f9c8fc88 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -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 diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 7a5bc3aff..eeb77485d 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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]) diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index c0b2505d6..98166339e 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.m4 @@ -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