[oe] sysroot vs. finding header files

Stanislav Brabec utx at penguin.cz
Tue Mar 11 10:29:00 UTC 2008


Holger Freyther wrote:
> On Wednesday 05 March 2008 21:15:32 Richard Purdie wrote:
> > Hi Mickey,
> >
> > On Wed, 2008-03-05 at 19:42 +0100, Michael 'Mickey' Lauer wrote:
> > [...]
> >
> > > With pkgconfig now pointing to /usr (and friends), this no longer finds a
> > > keysymdef.h until you have X on your buildhost.
> > >
> 
> > b) I've not seen any other package do anything that insane
> 
> aeh? finding a certain header file is quite common.. let us see how things 
> work here. also I'm just slowly groking sysroot. It would be nice to know 
> when and where certain path's get mapped away from /usr/include to something 
> else...

Here is a small difference:
Most configure.in authors are happy with AC_CHECK_HEADER and
AC_CHECK_HEADERS. These works with sysroot out of the box, as the check
uses compiler flags.

But here it is searching for the exact location of keysymdef.h, not
supported by AC_CHECK*. It actually needs to process it by a different
tool than C compiler to generate custom header. So they need own check.

I see few clean fixes:

1) Do some cpp magic and preprocess the output. Such approach will not
need any notice about sysroot, but looks like an overkill.

2) Tell them that sysroot is a good feature and they should support it
in this check.

3) Introduce official support of sysroot in autotools. For example for
AC_CHECK_FILE it is the only solution. Ideally, all configure files
should have --sysroot option automatically and should be aware of
SYSROOT (or similar) variable in exactly the same way it is now aware of
CFLAGS et co.

-- 
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus






More information about the Openembedded-devel mailing list