Akim Demaille writes:

> Peter> Because cpp is not a cross tool, it's supposed to be platform
> Peter> independent.
>
> Well, is it really not a cross tool?  I mean, it contains the path to
> include files, and that's a major concern for configure.

For gcc, it's the compiler driver that adds the target specific include
paths and defines (through the spec file).  The plain cpp only has the
"really" standard paths in it, AFAICT.  On other cross-compilers, it's
anyone's guess, but surely no one will use a broken cross-compiler that
doesn't support $CC -E.

I think the concern in this whole AC_PROG_CC vs AC_PROG_CPP discussion was
that some folks would like to be able to use a C preprocessor without
having to have a compiler.  In that case you wouldn't care about
cross-compiling anyway.

I think what would work is this:  If called

  AC_PROG_CC
  AC_PROG_CPP

check $CC -E, cpp, /lib/cpp, else if called

  AC_PROG_CPP
  AC_PROG_CC

raise error, else if called

  AC_PROG_CPP # only

check cpp, /lib/cpp.

-- 
Peter Eisentraut   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter


Reply via email to