AC_TRY_CPP only looks at stderr of the result from the preprocessor,
not at stdout. Solaris' broken cc, aka /usr/ucb/cc, prints a message
to stdout to say that it's actually not installed, so you end up
trying to run that instead. The patch for looking at both stdout and
stderr is appended at end of this mail.
Next question is if it's really wise to fallback on `/lib/cpp' without
checking that it works?
/assar
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.543
diff -u -w -u -w -r1.543 acgeneral.m4
--- acgeneral.m4 2000/08/04 09:13:17 1.543
+++ acgeneral.m4 2000/08/06 21:59:05
@@ -3240,7 +3240,7 @@
# used to copy stderr to stdout and capture it in a variable, but that
# breaks under sh -x, which writes compile commands starting with ` +'
# to stderr in eval and subshells.
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_try="$ac_cpp conftest.$ac_ext >conftest.out 2>&1"
AC_TRY_EVAL(ac_try)
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then