summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2019-05-04 21:11:47 +0200
committerFabrice Fontaine <fontaine.fabrice@gmail.com>2019-05-04 21:19:28 +0200
commitaf8c7ddd4805c15dfe0443c3496ab2d9bda82405 (patch)
tree8057edf4879943e45aefb23ddb8a03c35d56faeb
parentaffd8b212f7ddeaf3ebfcbfca87ff4a9d4ef3d6a (diff)
configure.ac: fix cross-compilation
AC_CHECK_FILE can't be used when cross-compiling [Retrieved (and slightly updated) from: https://git.buildroot.net/buildroot/tree/package/x11r7/xdriver_xf86-video-tdfx/0001-cross.patch] Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-rw-r--r--configure.ac20
1 files changed, 13 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index ab703b9..4fe0d1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,13 +75,19 @@ AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
[#include "xorg-server.h"])
CPPFLAGS="$SAVE_CPPFLAGS"
-if test "$DRI" != no; then
- AC_CHECK_FILE([${sdkdir}/dri.h],
- [have_dri_h="yes"], [have_dri_h="no"])
- AC_CHECK_FILE([${sdkdir}/sarea.h],
- [have_sarea_h="yes"], [have_sarea_h="no"])
- AC_CHECK_FILE([${sdkdir}/dristruct.h],
- [have_dristruct_h="yes"], [have_dristruct_h="no"])
+if test "x$DRI" != xno; then
+ if test "$cross_compiling" = "no" ; then
+ AC_CHECK_FILE([${sdkdir}/dri.h],
+ [have_dri_h="yes"], [have_dri_h="no"])
+ AC_CHECK_FILE([${sdkdir}/sarea.h],
+ [have_sarea_h="yes"], [have_sarea_h="no"])
+ AC_CHECK_FILE([${sdkdir}/dristruct.h],
+ [have_dristruct_h="yes"], [have_dristruct_h="no"])
+ else
+ have_dri_h="yes"
+ have_sarea_h="yes"
+ have_dristruct_h="yes"
+ fi
fi
AC_MSG_CHECKING([whether to include DRI support])