summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2019-05-04 20:43:26 +0200
committerFabrice Fontaine <fontaine.fabrice@gmail.com>2019-05-04 20:47:14 +0200
commitf227f2f286123a9ca64b567783825a2c18b87971 (patch)
tree4b37b61c300dfec99488bdd93a0f3b7516648f89 /configure.ac
parent924c310dfecbfb916f0e81c03f1142a401bed056 (diff)
configure.ac: fix cross-compilation
AC_CHECK_FILE can't be used when cross-compiling [Retrieved from: https://git.buildroot.net/buildroot/tree/package/x11r7/xdriver_xf86-video-mga/0001-misc-fixes.patch] Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 76adf84..31b8bac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,12 +76,18 @@ sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
# Checks for libraries.
if test "x$DRI" != xno; 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 "$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])