autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /lib/cpp again


From: Peter Eisentraut
Subject: Re: /lib/cpp again
Date: Thu, 5 Jul 2001 21:18:49 +0200 (CEST)

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   address@hidden   http://funkturm.homeip.net/~peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]