Changing the way drivers find DRI headers

Ian Romanick idr at
Mon Apr 24 15:45:34 PDT 2006

Hash: SHA1

I've spent an entire week (not an exaggeration) trying to get the
stack to cross-compile.  I don't have anything nice to say about the
build system, so I won't say anything.

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

What I've done just to get things building is modify 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.

So, what is the right way to test for the existence of a file on the
build system?
Version: GnuPG v1.4.2.1 (GNU/Linux)


More information about the xorg mailing list