Changing the way drivers find DRI headers

Egbert Eich eich at
Wed Apr 26 01:24:51 PDT 2006

Tilman Sauerbeck writes:
 > Ian Romanick [2006-04-24 15:45]:
 > > 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.
 > Why are these checks even needed?
 > I think it should be enough to call
 > PKG_CHECK_MODULES(DRI, xf86driproto libdrm, have_dri=yes, have_dri=no)
 > If the respective .pc file is installed, all of the included headers
 > should be installed, too, otherwise the system is broken anyway.
 > Is this approach considered too radical?

I've run into the same problem when doing cross build tests.
It seems to be feasable to replace some of the AC_CHECK_FILE()
 tests with PKG_CHECK_MOUDLES() tests - but not all of them.
AC_CHECK_FILE() is really the wrong test - it is ment to be a
test of the runtime system. The autoconf docs even suggest to
replace it with runtime tests.
What is needed in some cases is to check for the presence of
files on the build system. autoconf doesn't seem to have such a
test. Therefore I've written a replacement of the AC_CHECK_FILE()
test that does exactly the same - but without the test for 
cross compiling.


More information about the xorg mailing list