summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoel@teichroeb.net <none@none>2010-12-06 11:00:32 -0800
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-02-28 08:29:07 +0100
commit0e7745057873f23f842a1b7aac3b851279715fab (patch)
tree54621ec79ad7d75a9e434a8d581f57a5b73c651f
parenta7df2b521e786001c737ed44b4b667802237e450 (diff)
added some detection of wayland
-rw-r--r--configure.in14
-rw-r--r--include/SDL_config.h.in1
-rwxr-xr-xsrc/video/SDL_sysvideo.h3
-rwxr-xr-xsrc/video/SDL_video.c3
4 files changed, 21 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 9a8edd81..4c85e901 100644
--- a/configure.in
+++ b/configure.in
@@ -999,6 +999,19 @@ CheckWarnAll()
}
+dnl Find wayland stuff
+CheckWayland()
+{
+ AC_ARG_ENABLE(video-wayland,
+AC_HELP_STRING([--enable-video-wayland], [use Wayland video driver [[default=yes]]]),
+ , enable_video_wayland=yes)
+ if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND)
+ SOURCES="$SOURCES $srcdir/src/video/wayland/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L/home/joel/install/lib -lwayland-client -ldrm -lEGL -lcairo"
+ fi
+}
+
dnl Find the X11 include and library directories
CheckX11()
{
@@ -2105,6 +2118,7 @@ case "$host" in
CheckESD
CheckNAS
CheckX11
+ CheckWayland
CheckDirectFB
CheckFusionSound
CheckOpenGLX11
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index 0a9f4020..a85c5a64 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -252,6 +252,7 @@
#undef SDL_VIDEO_DRIVER_DUMMY
#undef SDL_VIDEO_DRIVER_NDS
#undef SDL_VIDEO_DRIVER_WINDOWS
+#undef SDL_VIDEO_DRIVER_WAYLAND
#undef SDL_VIDEO_DRIVER_X11
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h
index 679be4bf..2b54408b 100755
--- a/src/video/SDL_sysvideo.h
+++ b/src/video/SDL_sysvideo.h
@@ -335,6 +335,9 @@ extern VideoBootStrap Android_bootstrap;
#if SDL_VIDEO_DRIVER_DUMMY
extern VideoBootStrap DUMMY_bootstrap;
#endif
+#if SDL_VIDEO_DRIVER_WAYLAND
+extern VideoBootStrap Wayland_bootstrap;
+#endif
extern SDL_VideoDevice *SDL_GetVideoDevice(void);
extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 61941d3d..41999062 100755
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -81,6 +81,9 @@ static VideoBootStrap *bootstrap[] = {
#if SDL_VIDEO_DRIVER_DUMMY
&DUMMY_bootstrap,
#endif
+#if SDL_VIDEO_DRIVER_WAYLAND
+ &Wayland_bootstrap,
+#endif
NULL
};