summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2019-05-04 21:03:28 +0200
committerFabrice Fontaine <fontaine.fabrice@gmail.com>2019-05-04 21:03:28 +0200
commit2ec88355123b1def99d8c79769f396ac97bc5008 (patch)
tree807d61d68a161f681cd56d896203d1b9d05a17b5
parent8579718352809c04809bc810c9c3f6207eaa06b5 (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-savage/0001-cross-compile.patch] Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-rw-r--r--configure.ac18
1 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 73cd199..fcf2475 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,12 +75,18 @@ sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
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 "$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])