configure.in
changeset 10304 ee83e0b4a36f
parent 10303 b326f93e1bc5
child 10305 a289f7ea213b
     1.1 --- a/configure.in	Thu Jun 23 18:39:05 2016 +0800
     1.2 +++ b/configure.in	Thu Sep 01 01:26:56 2016 -0700
     1.3 @@ -1201,11 +1201,12 @@
     1.4          if  test x$PKG_CONFIG != xno && \
     1.5              test x$video_opengl_egl = xyes && \
     1.6              test x$video_opengles_v2 = xyes; then
     1.7 -            if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon ; then
     1.8 +            if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
     1.9                  WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
    1.10                  WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
    1.11                  WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
    1.12                  WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
    1.13 +                WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
    1.14                  video_wayland=yes
    1.15              fi
    1.16          fi
    1.17 @@ -1216,6 +1217,9 @@
    1.18              if test x$enable_video_wayland_qt_touch = xyes; then
    1.19                  AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH, 1, [ ])
    1.20              fi
    1.21 +
    1.22 +            WAYLAND_PROTOCOLS_UNSTABLE="relative-pointer-unstable-v1 pointer-constraints-unstable-v1"
    1.23 +
    1.24              SOURCES="$SOURCES $srcdir/src/video/wayland/*.c"
    1.25              EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)"
    1.26              AC_ARG_ENABLE(wayland-shared,
    1.27 @@ -3486,8 +3490,12 @@
    1.28  if test x$video_wayland = xyes; then
    1.29      WAYLAND_CORE_PROTOCOL_SOURCE='$(gen)/wayland-protocol.c'
    1.30      WAYLAND_CORE_PROTOCOL_HEADER='$(gen)/wayland-client-protocol.h'
    1.31 -    GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE"
    1.32 -    GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER"
    1.33 +    WAYLAND_PROTOCOLS_UNSTABLE_SOURCES=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
    1.34 +        sed 's,[[^ ]]\+,\\$(gen)/&-protocol.c,g'`
    1.35 +    WAYLAND_PROTOCOLS_UNSTABLE_HEADERS=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
    1.36 +        sed 's,[[^ ]]\+,\\$(gen)/&-client-protocol.h,g'`
    1.37 +    GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE $WAYLAND_PROTOCOLS_UNSTABLE_SOURCES"
    1.38 +    GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER $WAYLAND_PROTOCOLS_UNSTABLE_HEADERS"
    1.39  
    1.40      WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS="
    1.41  $WAYLAND_CORE_PROTOCOL_SOURCE: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
    1.42 @@ -3503,10 +3511,30 @@
    1.43  \$(objects)/`echo $WAYLAND_CORE_PROTOCOL_SOURCE | sed 's/\$(gen)\/\(.*\).c$/\1.lo/'`: $WAYLAND_CORE_PROTOCOL_SOURCE
    1.44  	\$(RUN_CMD_CC)\$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \$< -o \$@"
    1.45  
    1.46 +    WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
    1.47 +        do echo ; echo \$p | sed\
    1.48 +        "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\$(gen)/&-client-protocol.h: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
    1.49 +	\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
    1.50 +	\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@," ; done`
    1.51 +
    1.52 +    WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
    1.53 +        do echo ; echo \$p | sed\
    1.54 +        "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\$(gen)/&-protocol.c: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
    1.55 +	\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
    1.56 +	\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@," ; done`
    1.57 +
    1.58 +    WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
    1.59 +        do echo ; echo \$p | sed\
    1.60 +        "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\\$(objects)/&-protocol.lo: \\$(gen)/&-protocol.c \\$(gen)/&-client-protocol.h\\\\
    1.61 +	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@," ; done`
    1.62 +
    1.63      WAYLAND_PROTOCOLS_DEPENDS="
    1.64  $WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS
    1.65  $WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS
    1.66  $WAYLAND_CORE_PROTOCOL_OBJECT
    1.67 +$WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS
    1.68 +$WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS
    1.69 +$WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE
    1.70  "
    1.71  fi
    1.72