summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/drm/libdrm/detect.patch
blob: 6397a5954e831e0f18b7c3962fba8d5bd627b140 (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
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>

commit 798022b61c58d945f9027c823a188dcedecd3d06
Author: Marcin Ślusarz <marcin.slusarz@gmail.com>
Date:   Sun Jan 24 13:17:34 2016 +0100

    configure.ac: don't detect disabled options dependencies
    
    Currently with --disable-amdgpu --disable-valgrind --disable-cairo-tests
    cunit, valgrind and cairo are still detected.
    
    Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

diff --git a/configure.ac b/configure.ac
index 057a846..a09be61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -363,12 +363,14 @@ fi
-# Detect cunit library
-PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
-# If pkg-config does not find cunit, check it using AC_CHECK_LIB.  We
-# do this because Debian (Ubuntu) lacks pkg-config file for cunit.
-# fixed in 2.1-2.dfsg-3: http://anonscm.debian.org/cgit/collab-maint/cunit.git/commit/?h=debian
-if test "x${have_cunit}" = "xno"; then
-	AC_CHECK_LIB([cunit], [CU_initialize_registry], [have_cunit=yes], [have_cunit=no])
-	if test "x${have_cunit}" = "xyes"; then
-		CUNIT_LIBS="-lcunit"
-		CUNIT_CFLAGS=""
-		AC_SUBST([CUNIT_LIBS])
-		AC_SUBST([CUNIT_CFLAGS])
+if test "x$AMDGPU" != xno; then
+	# Detect cunit library
+	PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
+	# If pkg-config does not find cunit, check it using AC_CHECK_LIB.  We
+	# do this because Debian (Ubuntu) lacks pkg-config file for cunit.
+	# fixed in 2.1-2.dfsg-3: http://anonscm.debian.org/cgit/collab-maint/cunit.git/commit/?h=debian
+	if test "x${have_cunit}" = "xno"; then
+		AC_CHECK_LIB([cunit], [CU_initialize_registry], [have_cunit=yes], [have_cunit=no])
+		if test "x${have_cunit}" = "xyes"; then
+			CUNIT_LIBS="-lcunit"
+			CUNIT_CFLAGS=""
+			AC_SUBST([CUNIT_LIBS])
+			AC_SUBST([CUNIT_CFLAGS])
+		fi
@@ -375,0 +378,2 @@ if test "x${have_cunit}" = "xno"; then
+else
+	have_cunit=no
@@ -404 +408,3 @@ AC_ARG_ENABLE([cairo-tests],
-PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
+if test "x$CAIRO" != xno; then
+	PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
+fi
@@ -449 +455,3 @@ AC_ARG_ENABLE(valgrind,
-PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
+if test "x$VALGRIND" != xno; then
+	PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
+fi