Changing the way drivers find DRI headers

Erwin Rol mailinglists at erwinrol.com
Fri Jun 16 03:33:11 PDT 2006


On Mon, 2006-04-24 at 15:45 -0700, Ian Romanick wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I've spent an entire week (not an exaggeration) trying to get the X.org
> stack to cross-compile.  I don't have anything nice to say about the
> build system, so I won't say anything.

Same here, i needed to patch lot of autoconf stuff to get it to
compile. 

> I'm down to what should be the last roadblock.  Right now the way
> drivers check for DRI header files is completely broken for
> cross-builds.  Right now each driver has a series of
> 'AC_CHECK_FILE([${sdkdir}/dir.h], [...], [...])' statements.
> AC_CHECK_FILE always fails on cross-builds because it is trying to check
> for files on the host system instead of the build system.  Since
> configure is running on the build system it is impossible to check
> anything on the host system.
> 
> However, we don't really want to check for the file on the host system.
>  Since the test is trying to figure out if the files are available for
> the build, we want to check for it on the build system!  The logical
> choice is to use AC_CHECK_HEADER, but that explodes because it can't
> find all the various headers that are included by dri.h, sarea.h, and
> dristruct.h.
> 
> What I've done just to get things building is modify configure.ac to
> assume the tests will succeed if --enable-dri=yes is used.  That is, the
> only time the test will be done is if DRI is auto.  This is, obviously,
> no good either.


Same here, i just short circuited the autoconf stuff, and assume the
headers are correct (since i am building a complete system i know they
are correct)

> So, what is the right way to test for the existence of a file on the
> build system?

pkg-config with a version number should do the trick. 

- Erwin





More information about the xorg mailing list