Index: ChangeLog from Akim Demaille
* aclang.m4 (_AC_PROG_PREPROC_WORKS): Rename and extend as... (_AC_PROG_PREPROC_WORKS_IFELSE): this. Adjust to admit (AC_PROG_CPP, AC_PROG_CXXCPP): Use it. Reported by Daniel Carroll. Index: acgeneral.m4 =================================================================== RCS file: /cvs/autoconf/acgeneral.m4,v retrieving revision 1.720 diff -u -u -r1.720 acgeneral.m4 --- acgeneral.m4 2001/04/25 15:32:09 1.720 +++ acgeneral.m4 2001/04/25 17:23:52 @@ -2715,12 +2715,11 @@ # ---------------------------------------------------------------- # 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. -# -# This macro can be used during the selection of a preprocessor. AC_DEFUN([_AC_PREPROC_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl if _AC_EVAL_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null; then Index: aclang.m4 =================================================================== RCS file: /cvs/autoconf/aclang.m4,v retrieving revision 1.125 diff -u -u -r1.125 aclang.m4 --- aclang.m4 2001/04/15 16:20:30 1.125 +++ aclang.m4 2001/04/25 17:23:53 @@ -804,33 +804,36 @@ [AC_REQUIRE([AC_PROG_CPP])]) -# _AC_PROG_PREPROC_WORKS -# ---------------------- +# _AC_PROG_PREPROC_WORKS_IFELSE(IF-WORKS, IF-NOT) +# ----------------------------------------------- # 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], -[# Use a header file that comes with gcc, so configuring glibc +# 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], +[# We don't know yet if stderr is the criterion (vs exit status). +ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=maybe + +# Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. -ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=maybe _AC_PREPROC_IFELSE([AC_LANG_SOURCE(address@hidden:@include