[PATCH 3/3] Enable build for wayland egl
Alexander Preisinger
alexander.preisinger at gmail.com
Thu Aug 23 23:08:24 PDT 2012
This uses 2 defines
* CONFIG_WAYLAND
* CONFIG_GL_WAYLAND
CONFIG_WAYLAND is not used at the moment
---
Makefile | 1 +
configure | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index d1ce8dd..035606c 100644
--- a/Makefile
+++ b/Makefile
@@ -453,6 +453,7 @@ SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c \
SRCS_MPLAYER-$(GL_SDL) += libvo/sdl_common.c
SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c
SRCS_MPLAYER-$(GL_X11) += libvo/x11_common.c
+SRCS_MPLAYER-$(GL_WAYLAND) += libvo/wl_common.c
SRCS_MPLAYER-$(IVTV) += libao2/ao_ivtv.c libvo/vo_ivtv.c
SRCS_MPLAYER-$(JACK) += libao2/ao_jack.c
diff --git a/configure b/configure
index 5c1e288..d698031 100755
--- a/configure
+++ b/configure
@@ -416,6 +416,7 @@ Video output:
--enable-vm enable XF86VidMode support [autodetect]
--enable-xinerama enable Xinerama support [autodetect]
--enable-x11 enable X11 video output [autodetect]
+ --enable-wayland enable Wayland video output [autodetect]
--enable-xshape enable XShape support [autodetect]
--disable-xss disable screensaver support via xss [autodetect]
--enable-fbdev enable FBDev video output [autodetect]
@@ -560,6 +561,7 @@ ffmpeg=auto
ffmpeg_internals=no
_mplayer=yes
_x11=auto
+_wayland=auto
_xshape=auto
_xss=auto
_dga1=auto
@@ -839,6 +841,8 @@ for ac_option do
--disable-cross-compile) _cross_compile=no ;;
--enable-mplayer) _mplayer=yes ;;
--disable-mplayer) _mplayer=no ;;
+ --enable-wayland) _wayland=yes ;;
+ --disable-wayland) _wayland=no ;;
--enable-x11) _x11=yes ;;
--disable-x11) _x11=no ;;
--enable-xshape) _xshape=yes ;;
@@ -3833,6 +3837,34 @@ depends_on_application_services(){
fi #if darwin
+echocheck "Wayland headers presence"
+ _wayland_headers="no"
+ res_comment="check if the dev(el) packages are installed"
+ for I in $(echo $extra_cflags | sed s/-I//g) /usr/include ; do
+ if test -f "$I/wayland-client.h" ; then
+ _wayland_headers="yes"
+ res_comment=""
+ break
+ fi
+ done
+echores "$_wayland_headers"
+
+echocheck "Wayland"
+if test "$_wayland" = auto && test "$_wayland_headers" = yes ; then
+ pkg_config_add "wayland-client" && _wayland="yes"
+fi
+if test "$_wayland" = yes ; then
+ def_wayland='#define CONFIG_WAYLAND'
+ vomodules="wayland $vomodules"
+ libs_mplayer="$libs_mplayer -lwayland-client -lxkbcommon"
+ #pkg_config_add doesn't work
+else
+ _wayland="no"
+ def_wayland="#undef CONFIG_WAYLAND"
+ novomodules="wayland $novomodules"
+ res_comment="check if the dev(el) packages are installed"
+fi
+echores "$_wayland"
echocheck "X11 headers presence"
_x11_headers="no"
@@ -4475,7 +4507,7 @@ echores "$_sdl"
# conflicts between -lGL and -framework OpenGL
echocheck "OpenGL"
#Note: this test is run even with --enable-gl since we autodetect linker flags
-if (test "$_x11" = yes || test "$_sdl" = yes || test "$_cocoa" = yes || win32) && test "$_gl" != no ; then
+if (test "$_x11" = yes || test "$_wayland" = yes || test "$_sdl" = yes || test "$_cocoa" = yes || win32) && test "$_gl" != no ; then
cat > $TMPC << EOF
#ifdef GL_WIN32
#include <windows.h>
@@ -4520,6 +4552,11 @@ EOF
fi
done
fi
+ if test "$_wayland" = yes ; then
+ _gl=yes
+ _gl_wayland=yes
+ libs_mplayer="$libs_mplayer -lGL -lEGL -lwayland-egl"
+ fi
if win32 && cc_check -DGL_WIN32 -lopengl32 ; then
_gl=yes
_gl_win32=yes
@@ -4560,6 +4597,10 @@ if test "$_gl" = yes ; then
def_gl_x11='#define CONFIG_GL_X11 1'
res_comment="$res_comment x11"
fi
+ if test "$_gl_wayland" = yes ; then
+ def_gl_wayland='#define CONFIG_GL_WAYLAND'
+ res_comment="$res_comment wayland"
+ fi
if test "$_gl_sdl" = yes ; then
def_gl_sdl='#define CONFIG_GL_SDL 1'
res_comment="$res_comment sdl"
@@ -4570,6 +4611,7 @@ else
def_gl_cocoa='#undef CONFIG_GL_COCOA'
def_gl_win32='#undef CONFIG_GL_WIN32'
def_gl_x11='#undef CONFIG_GL_X11'
+ def_gl_wayland='#undef CONFIG_GL_WAYLAND'
def_gl_sdl='#undef CONFIG_GL_SDL'
novomodules="opengl $novomodules"
fi
@@ -6305,6 +6347,7 @@ GL = $_gl
GL_COCOA = $_gl_cocoa
GL_WIN32 = $_gl_win32
GL_X11 = $_gl_x11
+GL_WAYLAND = $_gl_wayland
GL_SDL = $_gl_sdl
HAVE_POSIX_SELECT = $_posix_select
HAVE_SYS_MMAN_H = $_mman
@@ -6380,6 +6423,7 @@ WIN32DLL = $_win32dll
WIN32WAVEOUT = $_win32waveout
WIN32_EMULATION = $_win32_emulation
X11 = $_x11
+WAYLAND = $_wayland
XANIM_CODECS = $_xanim
XMGA = $_xmga
XMMS_PLUGINS = $_xmms
@@ -6699,6 +6743,7 @@ $def_gl
$def_gl_cocoa
$def_gl_win32
$def_gl_x11
+$def_gl_wayland
$def_gl_sdl
$def_ivtv
$def_jpeg
@@ -6720,6 +6765,7 @@ $def_vesa
$def_vm
$def_wii
$def_x11
+$def_wayland
$def_xdpms
$def_xf86keysym
$def_xinerama
--
1.7.12
More information about the wayland-devel
mailing list