Changing the way drivers find DRI headers

Ian Romanick idr at us.ibm.com
Mon Apr 24 15:45:34 PDT 2006


-----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.

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.

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

iD8DBQFETVUOX1gOwKyEAw8RAijuAJ9VuJGXK3KlJ+Q+RildjprVwhVKXACffdPL
lPZJhJI6Gs/J7NaNpPEVj5E=
=xPrW
-----END PGP SIGNATURE-----



More information about the xorg mailing list