Commit c1452fef authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

xcb: simplify build rules

parent 0637f216
......@@ -2971,6 +2971,7 @@ PKG_CHECK_MODULES([GL], [gl], [
have_gl="no"
])
])
AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])
dnl OpenGL ES 2: depends on EGL 1.1
PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled])
......@@ -2983,7 +2984,6 @@ AC_ARG_ENABLE(egl,
])
AS_IF([test "$enable_egl" != "no"], [
PKG_CHECK_MODULES([EGL], [egl], [
VLC_ADD_PLUGIN([gl])
VLC_ADD_PLUGIN([egl])
])
])
......@@ -3016,49 +3016,32 @@ AC_ARG_ENABLE(glx,
])
have_xcb="no"
have_xcb_keysyms="no"
have_xcb_randr="no"
have_xcb_xvideo="no"
AS_IF([test "${enable_xcb}" != "no"], [
dnl libxcb
PKG_CHECK_MODULES(XCB, [xcb >= 1.6])
have_xcb="yes"
PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
PKG_CHECK_MODULES(XCB_COMPOSITE, [xcb-composite])
PKG_CHECK_MODULES(XPROTO, [xproto])
AS_IF([test "${enable_xvideo}" != "no"], [
PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
VLC_ADD_PLUGIN([xcb_xv])
])
])
PKG_CHECK_MODULES(XCB_RANDR, [xcb-randr >= 1.3], [
have_xcb_randr="yes"
PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [have_xcb_xvideo="yes"])
])
PKG_CHECK_MODULES(XPROTO, [xproto], [
VLC_ADD_PLUGIN([xwd])
PKG_CHECK_MODULES(XCB_RANDR, [xcb-randr >= 1.3], [have_xcb_randr="yes"])
dnl xcb-utils
PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [
VLC_ADD_PLUGIN([xcb_hotkeys])
VLC_ADD_CFLAGS([xcb_window], [-DHAVE_XCB_KEYSYMS])
], [
AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Hotkeys will not work.])
])
], [
AC_MSG_WARN([${XPROTO_PKG_ERRORS}. Hotkeys and XWD will not work.])
])
AS_IF([test "${enable_glx}" != "no"], [
AS_IF([test "${have_gl}" != "yes"], [
AC_MSG_ERROR([${GL_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.])
])
VLC_ADD_PLUGIN([xcb_glx])
VLC_ADD_PLUGIN([glx])
VLC_ADD_PLUGIN([gl])
dnl xcb-utils
PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [have_xcb_keysyms="yes"], [
AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Hotkeys will not work.])
])
])
AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
AM_CONDITIONAL([HAVE_XCB_KEYSYMS], [test "${have_xcb_keysyms}" = "yes"])
AM_CONDITIONAL([HAVE_XCB_RANDR], [test "${have_xcb_randr}" = "yes"])
AM_CONDITIONAL([HAVE_XCB_XVIDEO], [test "${have_xcb_xvideo}" = "yes"])
dnl
......
......@@ -111,8 +111,9 @@ libxwd_plugin_la_SOURCES = codec/xwd.c
libxwd_plugin_la_CFLAGS = $(AM_CFLAGS) $(XPROTO_CFLAGS)
libxwd_plugin_la_LIBADD = $(XPROTO_LIBS)
libxwd_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)'
codec_LTLIBRARIES += $(LTLIBxwd)
EXTRA_LTLIBRARIES += libxwd_plugin.la
if HAVE_XCB
codec_LTLIBRARIES += libxwd_plugin.la
endif
### SPU ###
......
......@@ -46,9 +46,9 @@ libxcb_hotkeys_plugin_la_SOURCES = globalhotkeys/xcb.c
libxcb_hotkeys_plugin_la_CFLAGS = $(AM_CFLAGS) \
$(XCB_KEYSYMS_CFLAGS) $(XCB_CFLAGS)
libxcb_hotkeys_plugin_la_LIBADD = $(XCB_KEYSYMS_LIBS) $(XCB_LIBS)
libxcb_hotkeys_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(controldir)'
EXTRA_LTLIBRARIES += libxcb_hotkeys_plugin.la
control_LTLIBRARIES += $(LTLIBxcb_hotkeys)
if HAVE_XCB_KEYSYMS
control_LTLIBRARIES += libxcb_hotkeys_plugin.la
endif
libwin_hotkeys_plugin_la_SOURCES = globalhotkeys/win32.c
if HAVE_WIN32
......
......@@ -33,13 +33,15 @@ libgles1_plugin_la_CFLAGS = $(AM_CFLAGS) $(GLES1_CFLAGS) -DUSE_OPENGL_ES=1
libgles1_plugin_la_LIBADD = $(GLES1_LIBS)
libgles1_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
EXTRA_LTLIBRARIES += libgles2_plugin.la libgles1_plugin.la
vout_LTLIBRARIES += $(LTLIBgles2) $(LTLIBgles1)
libgl_plugin_la_SOURCES = opengl.c opengl.h gl.c
libgl_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
libgl_plugin_la_LIBADD = $(GL_LIBS)
libgl_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
EXTRA_LTLIBRARIES += libgles2_plugin.la libgles1_plugin.la libgl_plugin.la
vout_LTLIBRARIES += $(LTLIBgles2) $(LTLIBgles1) $(LTLIBgl)
if HAVE_GL
vout_LTLIBRARIES += libgl_plugin.la
endif
### XCB ###
......@@ -64,7 +66,6 @@ libxcb_xv_plugin_la_CFLAGS = $(AM_CFLAGS) \
$(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_XV_CFLAGS)
libxcb_xv_plugin_la_LIBADD = libvlc_xcb_events.la \
$(XCB_LIBS) $(XCB_SHM_LIBS) $(XCB_XV_LIBS)
libxcb_xv_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
libxcb_glx_plugin_la_SOURCES = \
opengl.c opengl.h \
......@@ -73,7 +74,6 @@ libxcb_glx_plugin_la_CFLAGS = $(AM_CFLAGS) \
$(XCB_CFLAGS) $(GL_CFLAGS)
libxcb_glx_plugin_la_LIBADD = libvlc_xcb_events.la \
$(XCB_LIBS) $(GL_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lX11
libxcb_glx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
libxcb_window_plugin_la_SOURCES = xcb/window.c xcb/keys.c xcb/keysym.h xcb/xcb_keysym.h
libxcb_window_plugin_la_CFLAGS = $(AM_CFLAGS) \
......@@ -83,12 +83,18 @@ libxcb_window_plugin_la_LIBADD = $(XPROTO_LIBS) $(XCB_LIBS) $(XCB_KEYSYMS_LIBS)
if HAVE_XCB
noinst_LTLIBRARIES += libvlc_xcb_events.la
vout_LTLIBRARIES += \
libxcb_x11_plugin.la \
libxcb_window_plugin.la
vout_LTLIBRARIES += libxcb_x11_plugin.la libxcb_window_plugin.la
if HAVE_XCB_KEYSYMS
libxcb_window_plugin_la_CFLAGS += -DHAVE_XCB_KEYSYMS
endif
EXTRA_LTLIBRARIES += libxcb_xv_plugin.la libxcb_glx_plugin.la
vout_LTLIBRARIES += $(LTLIBxcb_xv) $(LTLIBxcb_glx)
if HAVE_XCB_XVIDEO
vout_LTLIBRARIES += libxcb_xv_plugin.la
endif
if HAVE_GL
vout_LTLIBRARIES += libxcb_glx_plugin.la libglx_plugin.la
endif
endif
### Win32 ###
libdirect2d_plugin_la_SOURCES = msw/direct2d.c \
......@@ -169,9 +175,6 @@ vout_LTLIBRARIES += $(LTLIBegl)
libglx_plugin_la_SOURCES = glx.c
libglx_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
libglx_plugin_la_LIBADD = $(GL_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lX11
libglx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
EXTRA_LTLIBRARIES += libglx_plugin.la
vout_LTLIBRARIES += $(LTLIBglx)
### Coloured ASCII art ###
libcaca_plugin_la_SOURCES = caca.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment