configure: Allow building of the "offscreen" video target. It was CMake-only before this.
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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
diff --git a/configure b/configure
index 268def1..3f5880e 100755
--- a/configure
+++ b/configure
@@ -888,6 +888,7 @@ enable_directfb_shared
enable_video_kmsdrm
enable_kmsdrm_shared
enable_video_dummy
+enable_video_offscreen
enable_video_opengl
enable_video_opengles
enable_video_opengles1
@@ -1681,6 +1682,8 @@ Optional Features:
--enable-video-kmsdrm use KMSDRM video driver [default=yes]
--enable-kmsdrm-shared dynamically load kmsdrm support [default=yes]
--enable-video-dummy use dummy video driver [default=yes]
+ --enable-video-offscreen
+ use offscreen video driver [default=no]
--enable-video-opengl include OpenGL support [default=yes]
--enable-video-opengles include OpenGL ES support [default=yes]
--enable-video-opengles1
@@ -22452,6 +22455,25 @@ $as_echo "#define SDL_VIDEO_DRIVER_DUMMY 1" >>confdefs.h
fi
}
+CheckOffscreenVideo()
+{
+ # Check whether --enable-video-offscreen was given.
+if test "${enable_video_offscreen+set}" = set; then :
+ enableval=$enable_video_offscreen;
+else
+ enable_video_offscreen=no
+fi
+
+ if test x$enable_video_offscreen = xyes; then
+
+$as_echo "#define SDL_VIDEO_DRIVER_OFFSCREEN 1" >>confdefs.h
+
+ SOURCES="$SOURCES $srcdir/src/video/offscreen/*.c"
+ have_video=yes
+ SUMMARY_video="${SUMMARY_video} offscreen"
+ fi
+}
+
CheckQNXVideo()
{
if test x$enable_video = xyes; then
@@ -25028,6 +25050,7 @@ $as_echo "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
@@ -25287,6 +25310,7 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
fi
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckWINDOWS
@@ -25533,6 +25557,7 @@ fi
ARCH=haiku
ac_default_prefix=/boot/system
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
@@ -25599,6 +25624,7 @@ $as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
@@ -25724,6 +25750,7 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
@@ -25820,6 +25847,7 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
CheckNativeClient
CheckDummyAudio
CheckDummyVideo
+ CheckOffscreenVideo
CheckInputEvents
CheckPTHREAD
@@ -25862,6 +25890,7 @@ $as_echo "#define SDL_AUDIO_DRIVER_EMSCRIPTEN 1" >>confdefs.h
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckPTHREAD
@@ -25912,6 +25941,7 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
diff --git a/configure.ac b/configure.ac
index d40d129..43df929 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2344,6 +2344,19 @@ CheckDummyVideo()
fi
}
+CheckOffscreenVideo()
+{
+ AC_ARG_ENABLE(video-offscreen,
+[AS_HELP_STRING([--enable-video-offscreen], [use offscreen video driver [default=no]])],
+ , enable_video_offscreen=no)
+ if test x$enable_video_offscreen = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_OFFSCREEN, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/offscreen/*.c"
+ have_video=yes
+ SUMMARY_video="${SUMMARY_video} offscreen"
+ fi
+}
+
dnl Set up the QNX video driver if enabled
CheckQNXVideo()
{
@@ -3612,6 +3625,7 @@ case "$host" in
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
@@ -3837,6 +3851,7 @@ case "$host" in
fi
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckWINDOWS
@@ -3998,6 +4013,7 @@ case "$host" in
ARCH=haiku
ac_default_prefix=/boot/system
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
@@ -4054,6 +4070,7 @@ case "$host" in
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
@@ -4157,6 +4174,7 @@ case "$host" in
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
@@ -4241,6 +4259,7 @@ case "$host" in
CheckNativeClient
CheckDummyAudio
CheckDummyVideo
+ CheckOffscreenVideo
CheckInputEvents
CheckPTHREAD
@@ -4275,6 +4294,7 @@ case "$host" in
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckPTHREAD
@@ -4317,6 +4337,7 @@ case "$host" in
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
+ CheckOffscreenVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index db67826..1005d5d 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -380,6 +380,7 @@
#undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM
#undef SDL_VIDEO_DRIVER_ANDROID
#undef SDL_VIDEO_DRIVER_EMSCRIPTEN
+#undef SDL_VIDEO_DRIVER_OFFSCREEN
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR