mirror of
https://github.com/encounter/SDL.git
synced 2025-12-08 13:15:10 +00:00
wayland: Build own version of core protocol
Since we are loading shared objects dynamically, build our own version of the core protocol symbols, so that we in the future can include protocol extensions.
This commit is contained in:
42
configure
vendored
42
configure
vendored
@@ -630,6 +630,7 @@ ac_includes_default="\
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
WAYLAND_SCANNER
|
||||
EXTRA_LDFLAGS
|
||||
BUILD_LDFLAGS
|
||||
EXTRA_CFLAGS
|
||||
@@ -637,6 +638,8 @@ BUILD_CFLAGS
|
||||
SDLTEST_OBJECTS
|
||||
SDLMAIN_OBJECTS
|
||||
VERSION_OBJECTS
|
||||
GEN_OBJECTS
|
||||
GEN_HEADERS
|
||||
OBJECTS
|
||||
INCLUDE
|
||||
ac_aux_dir
|
||||
@@ -18804,9 +18807,11 @@ $as_echo_n "checking for Wayland support... " >&6; }
|
||||
if test x$PKG_CONFIG != xno && \
|
||||
test x$video_opengl_egl = xyes && \
|
||||
test x$video_opengles_v2 = xyes; then
|
||||
if $PKG_CONFIG --exists wayland-client wayland-egl wayland-cursor egl xkbcommon ; then
|
||||
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon ; then
|
||||
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
|
||||
WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
|
||||
video_wayland=yes
|
||||
fi
|
||||
fi
|
||||
@@ -18823,7 +18828,7 @@ $as_echo "#define SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/video/wayland/*.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)"
|
||||
# Check whether --enable-wayland-shared was given.
|
||||
if test "${enable_wayland_shared+set}" = set; then :
|
||||
enableval=$enable_wayland_shared;
|
||||
@@ -23728,6 +23733,33 @@ if test x$SDLMAIN_SOURCES = x; then
|
||||
fi
|
||||
SDLTEST_SOURCES="$srcdir/src/test/*.c"
|
||||
|
||||
if test x$video_wayland = xyes; then
|
||||
WAYLAND_CORE_PROTOCOL_SOURCE='$(gen)/wayland-protocol.c'
|
||||
WAYLAND_CORE_PROTOCOL_HEADER='$(gen)/wayland-client-protocol.h'
|
||||
GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE"
|
||||
GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER"
|
||||
|
||||
WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS="
|
||||
$WAYLAND_CORE_PROTOCOL_SOURCE: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
|
||||
\$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
|
||||
\$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) code \$< \$@"
|
||||
|
||||
WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS="
|
||||
$WAYLAND_CORE_PROTOCOL_HEADER: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
|
||||
\$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
|
||||
\$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) client-header \$< \$@"
|
||||
|
||||
WAYLAND_CORE_PROTOCOL_OBJECT="
|
||||
\$(objects)/`echo $WAYLAND_CORE_PROTOCOL_SOURCE | sed 's/\$(gen)\/\(.*\).c$/\1.lo/'`: $WAYLAND_CORE_PROTOCOL_SOURCE
|
||||
\$(RUN_CMD_CC)\$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \$< -o \$@"
|
||||
|
||||
WAYLAND_PROTOCOLS_DEPENDS="
|
||||
$WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS
|
||||
$WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS
|
||||
$WAYLAND_CORE_PROTOCOL_OBJECT
|
||||
"
|
||||
fi
|
||||
|
||||
OBJECTS=`echo $SOURCES`
|
||||
DEPENDS=`echo $SOURCES | tr ' ' '\n'`
|
||||
for EXT in asm cc m c S; do
|
||||
@@ -23737,6 +23769,8 @@ for EXT in asm cc m c S; do
|
||||
\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
|
||||
done
|
||||
|
||||
GEN_OBJECTS=`echo "$GEN_SOURCES" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.lo,g'`
|
||||
|
||||
VERSION_OBJECTS=`echo $VERSION_SOURCES`
|
||||
VERSION_DEPENDS=`echo $VERSION_SOURCES`
|
||||
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.rc,$(objects)/\1.o,g'`
|
||||
@@ -23838,6 +23872,9 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cat >Makefile.rules <<__EOF__
|
||||
|
||||
# Build rules for objects
|
||||
@@ -23849,6 +23886,7 @@ $DEPENDS
|
||||
$VERSION_DEPENDS
|
||||
$SDLMAIN_DEPENDS
|
||||
$SDLTEST_DEPENDS
|
||||
$WAYLAND_PROTOCOLS_DEPENDS
|
||||
__EOF__
|
||||
|
||||
ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc"
|
||||
|
||||
Reference in New Issue
Block a user