Bug#888694: xserver-xorg-video-mga FTCBFS: abuses AC_CHECK_FILE for build system files
Source: xserver-xorg-video-mga
Version: 1:1.6.5-1
Tags: patch upstream
User: helmutg@debian.org
Usertags: rebootstrap
xserver-xorg-video-mga fails to cross build from source, because it
abuses AC_CHECK_FILE for finding headers. AC_CHECK_FILE is supposed to
find files on the host system. You cannot usually expect the host system
to have headers, so this use is incorrect. It happens to also break
cross compilation. To check for files on the build system, simply use
"test -f". The attached patch implements that. Please consider applying
Helmut
Index: xserver-xorg-video-mga-1.6.5/configure.ac
===================================================================
--- xserver-xorg-video-mga-1.6.5.orig/configure.ac
+++ xserver-xorg-video-mga-1.6.5/configure.ac
@@ -77,12 +77,21 @@
# 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 -f "${sdkdir}/dri.h"; then
+ have_dri_h="yes"
+ else
+ have_dri_h="no"
+ fi
+ if test -f "${sdkdir}/sarea.h"; then
+ have_sarea_h="yes"
+ else
+ have_sarea_h="no"
+ fi
+ if test -f "${sdkdir}/dristruct.h"; then
+ have_dristruct_h="yes"
+ else
+ have_dristruct_h="no"
+ fi
fi
AC_MSG_CHECKING([whether to include DRI support])
Reply to: