configure.in
changeset 8153 3e43c73ac79b
parent 8147 9802c269104f
child 8158 429513cb6707
     1.1 --- a/configure.in	Sun Feb 02 21:38:16 2014 -0500
     1.2 +++ b/configure.in	Sun Feb 02 23:41:46 2014 -0500
     1.3 @@ -1124,6 +1124,42 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +CheckMir()
     1.8 +{
     1.9 +    AC_ARG_ENABLE(video-mir,
    1.10 +    AC_HELP_STRING([--enable-video-mir], [use Mir video driver [[default=yes]]]),
    1.11 +                   , enable_video_mir=yes)
    1.12 +
    1.13 +    if test x$enable_video = xyes -a x$enable_video_mir = xyes; then
    1.14 +        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
    1.15 +
    1.16 +        if test x$PKG_CONFIG != xno; then
    1.17 +            AC_MSG_CHECKING(for Mir support)
    1.18 +            video_mir=no
    1.19 +            tmp_CFLAGS="$CFLAGS"
    1.20 +            CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags egl mirclient xkbcommon`"
    1.21 +
    1.22 +            AC_TRY_COMPILE([
    1.23 +             #include <EGL/egl.h>
    1.24 +             #include <xkbcommon/xkbcommon.h>
    1.25 +             #include <mir_toolkit/mir_client_library.h>
    1.26 +            ],[
    1.27 +            ],[
    1.28 +            video_mir=yes
    1.29 +            ])
    1.30 +            CFLAGS="$tmp_CFLAGS"
    1.31 +            AC_MSG_RESULT($video_mir)
    1.32 +
    1.33 +            if test x$video_mir = xyes; then
    1.34 +                  AC_DEFINE(SDL_VIDEO_DRIVER_MIR)
    1.35 +                  SOURCES="$SOURCES $srcdir/src/video/mir/*.c"
    1.36 +                  EXTRA_CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags egl mirclient xkbcommon`"
    1.37 +                  EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$PKG_CONFIG --libs egl mirclient xkbcommon`"
    1.38 +                  have_video=yes
    1.39 +            fi
    1.40 +        fi
    1.41 +    fi
    1.42 +}
    1.43  
    1.44  dnl See if GCC's -Wall is supported.
    1.45  CheckWarnAll()
    1.46 @@ -2612,6 +2648,7 @@
    1.47          CheckSNDIO
    1.48          CheckX11
    1.49          CheckWayland
    1.50 +        CheckMir
    1.51          CheckDirectFB
    1.52          CheckFusionSound
    1.53          CheckOpenGLX11