aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics/xorg-driver/xf86-video-mga/checkfile.patch
blob: ceae6dfba20cdbec6aa699bb4b8608fa47dae0f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=57606]
Signed-off-by: Ross Burton <ross.burton@intel.com>

From c9014a8f3c9b691b5aa7b1f3ec66cf7c84b8211b Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Thu, 29 Nov 2012 11:00:43 +0000
Subject: [PATCH] build: dont use AC_CHECK_FILE when enabling DRI

Automatically enabling or disabling a feature based on installed files isn't
deterministic, and AC_CHECK_FILE returns an error when cross-compiling.

Fix this by enabling DRI by default, and removing the explicit file checks as
pkg-config is good enough.

(#57606)

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 configure.ac |   25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/configure.ac b/configure.ac
index fca1a9c..d2aa2ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,9 +55,9 @@ AC_ARG_WITH(xorg-module-dir,
             [moduledir="$libdir/xorg/modules"])
 
 AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri],
-                                  [Disable DRI support [[default=auto]]]),
+                                  [Disable DRI support [[default=enabled]]]),
               [DRI="$enableval"],
-              [DRI=auto])
+              [DRI=yes])
 AC_ARG_ENABLE(exa,
               AS_HELP_STRING([--disable-exa],
                              [Disable EXA support [[default=enabled]]]),
@@ -76,27 +76,6 @@ 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"])
-fi
-
-AC_MSG_CHECKING([whether to include DRI support])
-if test "x$DRI" = xauto; then
-        if test "x$have_dri_h" = xyes && \
-           test "x$have_sarea_h" = xyes && \
-           test "x$have_dristruct_h" = xyes; then
-                DRI="yes"
-        else
-                DRI="no"
-        fi
-fi
-AC_MSG_RESULT([$DRI])
-
 AM_CONDITIONAL(DRI, test "x$DRI" = xyes)
 if test "x$DRI" = xyes; then
         PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto])
-- 
1.7.10.4