configure.in
changeset 8062 4fc5f66d63cc
parent 8056 abd9434c5d3e
child 8082 5b83ad3f01ac
     1.1 --- a/configure.in	Fri Dec 13 09:48:12 2013 -0300
     1.2 +++ b/configure.in	Sat Dec 14 20:18:43 2013 -0300
     1.3 @@ -1115,6 +1115,36 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Check for Wayland
     1.8 +CheckWayland()
     1.9 +{
    1.10 +    AC_ARG_ENABLE(video-wayland,
    1.11 +AC_HELP_STRING([--enable-video-wayland], [use Wayland video driver [[default=yes]]]),
    1.12 +                  ,enable_video_wayland=yes)
    1.13 +
    1.14 +    if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then
    1.15 +        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
    1.16 +        AC_MSG_CHECKING(for Wayland support)
    1.17 +        video_wayland=no
    1.18 +        if test x$PKG_CONFIG != xno; then
    1.19 +            if $PKG_CONFIG --exists wayland-client wayland-egl wayland-cursor egl xkbcommon ; then
    1.20 +                WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor egl xkbcommon`
    1.21 +                WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor egl xkbcommon`
    1.22 +                video_wayland=yes
    1.23 +            fi
    1.24 +        fi
    1.25 +        AC_MSG_RESULT($video_wayland)
    1.26 +
    1.27 +        if test x$video_wayland = xyes; then
    1.28 +            AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND, 1, [ ])
    1.29 +            SOURCES="$SOURCES $srcdir/src/video/wayland/*.c"
    1.30 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS"
    1.31 +            dnl FIXME do dynamic loading code here.
    1.32 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $WAYLAND_LIBS"
    1.33 +            have_video=yes
    1.34 +        fi
    1.35 +    fi
    1.36 +}
    1.37  
    1.38  dnl Find the X11 include and library directories
    1.39  CheckX11()
    1.40 @@ -2449,6 +2479,7 @@
    1.41          CheckNAS
    1.42          CheckSNDIO
    1.43          CheckX11
    1.44 +        CheckWayland
    1.45          CheckDirectFB
    1.46          CheckFusionSound
    1.47          CheckOpenGLX11