configure
changeset 10303 b326f93e1bc5
parent 10090 cd34aa8b624c
child 10304 ee83e0b4a36f
     1.1 --- a/configure	Thu Sep 01 01:22:58 2016 -0700
     1.2 +++ b/configure	Thu Jun 23 18:39:05 2016 +0800
     1.3 @@ -630,6 +630,7 @@
     1.4  #endif"
     1.5  
     1.6  ac_subst_vars='LTLIBOBJS
     1.7 +WAYLAND_SCANNER
     1.8  EXTRA_LDFLAGS
     1.9  BUILD_LDFLAGS
    1.10  EXTRA_CFLAGS
    1.11 @@ -637,6 +638,8 @@
    1.12  SDLTEST_OBJECTS
    1.13  SDLMAIN_OBJECTS
    1.14  VERSION_OBJECTS
    1.15 +GEN_OBJECTS
    1.16 +GEN_HEADERS
    1.17  OBJECTS
    1.18  INCLUDE
    1.19  ac_aux_dir
    1.20 @@ -18804,9 +18807,11 @@
    1.21          if  test x$PKG_CONFIG != xno && \
    1.22              test x$video_opengl_egl = xyes && \
    1.23              test x$video_opengles_v2 = xyes; then
    1.24 -            if $PKG_CONFIG --exists wayland-client wayland-egl wayland-cursor egl xkbcommon ; then
    1.25 +            if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon ; then
    1.26                  WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
    1.27                  WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
    1.28 +                WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
    1.29 +                WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
    1.30                  video_wayland=yes
    1.31              fi
    1.32          fi
    1.33 @@ -18823,7 +18828,7 @@
    1.34  
    1.35              fi
    1.36              SOURCES="$SOURCES $srcdir/src/video/wayland/*.c"
    1.37 -            EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS"
    1.38 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)"
    1.39              # Check whether --enable-wayland-shared was given.
    1.40  if test "${enable_wayland_shared+set}" = set; then :
    1.41    enableval=$enable_wayland_shared;
    1.42 @@ -23728,6 +23733,33 @@
    1.43  fi
    1.44  SDLTEST_SOURCES="$srcdir/src/test/*.c"
    1.45  
    1.46 +if test x$video_wayland = xyes; then
    1.47 +    WAYLAND_CORE_PROTOCOL_SOURCE='$(gen)/wayland-protocol.c'
    1.48 +    WAYLAND_CORE_PROTOCOL_HEADER='$(gen)/wayland-client-protocol.h'
    1.49 +    GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE"
    1.50 +    GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER"
    1.51 +
    1.52 +    WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS="
    1.53 +$WAYLAND_CORE_PROTOCOL_SOURCE: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
    1.54 +	\$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
    1.55 +	\$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) code \$< \$@"
    1.56 +
    1.57 +    WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS="
    1.58 +$WAYLAND_CORE_PROTOCOL_HEADER: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
    1.59 +	\$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
    1.60 +	\$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) client-header \$< \$@"
    1.61 +
    1.62 +    WAYLAND_CORE_PROTOCOL_OBJECT="
    1.63 +\$(objects)/`echo $WAYLAND_CORE_PROTOCOL_SOURCE | sed 's/\$(gen)\/\(.*\).c$/\1.lo/'`: $WAYLAND_CORE_PROTOCOL_SOURCE
    1.64 +	\$(RUN_CMD_CC)\$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \$< -o \$@"
    1.65 +
    1.66 +    WAYLAND_PROTOCOLS_DEPENDS="
    1.67 +$WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS
    1.68 +$WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS
    1.69 +$WAYLAND_CORE_PROTOCOL_OBJECT
    1.70 +"
    1.71 +fi
    1.72 +
    1.73  OBJECTS=`echo $SOURCES`
    1.74  DEPENDS=`echo $SOURCES | tr ' ' '\n'`
    1.75  for EXT in asm cc m c S; do
    1.76 @@ -23737,6 +23769,8 @@
    1.77  	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    1.78  done
    1.79  
    1.80 +GEN_OBJECTS=`echo "$GEN_SOURCES" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.lo,g'`
    1.81 +
    1.82  VERSION_OBJECTS=`echo $VERSION_SOURCES`
    1.83  VERSION_DEPENDS=`echo $VERSION_SOURCES`
    1.84  VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.rc,$(objects)/\1.o,g'`
    1.85 @@ -23838,6 +23872,9 @@
    1.86  
    1.87  
    1.88  
    1.89 +
    1.90 +
    1.91 +
    1.92  cat >Makefile.rules <<__EOF__
    1.93  
    1.94  # Build rules for objects
    1.95 @@ -23849,6 +23886,7 @@
    1.96  $VERSION_DEPENDS
    1.97  $SDLMAIN_DEPENDS
    1.98  $SDLTEST_DEPENDS
    1.99 +$WAYLAND_PROTOCOLS_DEPENDS
   1.100  __EOF__
   1.101  
   1.102  ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc"