summaryrefslogtreecommitdiffstats
path: root/patches/SDL2_test-2.0.8/0001-sdl-2.0.8-tests-configure-opengl.patch
blob: 8be0b1a89074589c59e4af0d2eb2e084e091d783 (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
From: Jaret Cantu <jaret.cantu@timesys.com>
Date: Tue, 16 Jan 2018 12:16:16 -0500
Subject: [PATCH] sdl-2.0.8: tests: configure opengl

    Allow OpenGL to be configured manually

    The autodetection uses the presence of a header file which
    SDL2 always installs, regardless of whether or not OpenGL was
    enabled.  This causes the SDL2 tests to use OpenGL when SDL2
    itself was not configured for it.

    Configure certain tests not to build, depending on the
    configuration.  Tests which require OpenGL development files
    will fail when no OpenGL is detected (which should be obvious,
    but it apparently wasn't for whoever designed this).
---
 test/configure.in | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/test/configure.in b/test/configure.in
index fd3f3022bc2e..8ae15159b8f8 100644
--- a/test/configure.in
+++ b/test/configure.in
@@ -115,6 +115,12 @@ if test x$have_x = xyes; then
     fi
 fi
 
+dnl Check to see if OpenGL support is desired
+AC_ARG_ENABLE(opengl,
+AC_HELP_STRING([--enable-opengl], [include OpenGL support [[default=yes]]]),
+              , enable_opengl=yes)
+
+if test x$enable_opengl = xyes; then
 dnl Check for OpenGL
 AC_MSG_CHECKING(for OpenGL support)
 have_opengl=no
@@ -125,6 +131,7 @@ AC_TRY_COMPILE([
 have_opengl=yes
 ])
 AC_MSG_RESULT($have_opengl)
+fi
 
 dnl Check for OpenGL ES
 AC_MSG_CHECKING(for OpenGL ES support)