configure
changeset 8153 3e43c73ac79b
parent 8147 9802c269104f
child 8158 429513cb6707
     1.1 --- a/configure	Sun Feb 02 21:38:16 2014 -0500
     1.2 +++ b/configure	Sun Feb 02 23:41:46 2014 -0500
     1.3 @@ -817,6 +817,7 @@
     1.4  enable_sndio_shared
     1.5  enable_diskaudio
     1.6  enable_dummyaudio
     1.7 +enable_video_mir
     1.8  enable_video_wayland
     1.9  enable_video_wayland_qt_touch
    1.10  enable_wayland_shared
    1.11 @@ -1534,6 +1535,7 @@
    1.12    --enable-sndio-shared   dynamically load sndio audio support [[default=yes]]
    1.13    --enable-diskaudio      support the disk writer audio driver [[default=yes]]
    1.14    --enable-dummyaudio     support the dummy audio driver [[default=yes]]
    1.15 +  --enable-video-mir      use Mir video driver [[default=yes]]
    1.16    --enable-video-wayland  use Wayland video driver [[default=yes]]
    1.17    --enable-video-wayland-qt-touch
    1.18                            QtWayland server support for Wayland video driver
    1.19 @@ -18627,6 +18629,103 @@
    1.20      fi
    1.21  }
    1.22  
    1.23 +CheckMir()
    1.24 +{
    1.25 +    # Check whether --enable-video-mir was given.
    1.26 +if test "${enable_video_mir+set}" = set; then :
    1.27 +  enableval=$enable_video_mir;
    1.28 +else
    1.29 +  enable_video_mir=yes
    1.30 +fi
    1.31 +
    1.32 +
    1.33 +    if test x$enable_video = xyes -a x$enable_video_mir = xyes; then
    1.34 +        # Extract the first word of "pkg-config", so it can be a program name with args.
    1.35 +set dummy pkg-config; ac_word=$2
    1.36 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    1.37 +$as_echo_n "checking for $ac_word... " >&6; }
    1.38 +if ${ac_cv_path_PKG_CONFIG+:} false; then :
    1.39 +  $as_echo_n "(cached) " >&6
    1.40 +else
    1.41 +  case $PKG_CONFIG in
    1.42 +  [\\/]* | ?:[\\/]*)
    1.43 +  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
    1.44 +  ;;
    1.45 +  *)
    1.46 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    1.47 +for as_dir in $PATH
    1.48 +do
    1.49 +  IFS=$as_save_IFS
    1.50 +  test -z "$as_dir" && as_dir=.
    1.51 +    for ac_exec_ext in '' $ac_executable_extensions; do
    1.52 +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    1.53 +    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    1.54 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    1.55 +    break 2
    1.56 +  fi
    1.57 +done
    1.58 +  done
    1.59 +IFS=$as_save_IFS
    1.60 +
    1.61 +  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
    1.62 +  ;;
    1.63 +esac
    1.64 +fi
    1.65 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
    1.66 +if test -n "$PKG_CONFIG"; then
    1.67 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
    1.68 +$as_echo "$PKG_CONFIG" >&6; }
    1.69 +else
    1.70 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    1.71 +$as_echo "no" >&6; }
    1.72 +fi
    1.73 +
    1.74 +
    1.75 +
    1.76 +        if test x$PKG_CONFIG != xno; then
    1.77 +            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mir support" >&5
    1.78 +$as_echo_n "checking for Mir support... " >&6; }
    1.79 +            video_mir=no
    1.80 +            tmp_CFLAGS="$CFLAGS"
    1.81 +            CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags egl mirclient xkbcommon`"
    1.82 +
    1.83 +            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.84 +/* end confdefs.h.  */
    1.85 +
    1.86 +             #include <EGL/egl.h>
    1.87 +             #include <xkbcommon/xkbcommon.h>
    1.88 +             #include <mir_toolkit/mir_client_library.h>
    1.89 +
    1.90 +int
    1.91 +main ()
    1.92 +{
    1.93 +
    1.94 +
    1.95 +  ;
    1.96 +  return 0;
    1.97 +}
    1.98 +_ACEOF
    1.99 +if ac_fn_c_try_compile "$LINENO"; then :
   1.100 +
   1.101 +            video_mir=yes
   1.102 +
   1.103 +fi
   1.104 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.105 +            CFLAGS="$tmp_CFLAGS"
   1.106 +            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_mir" >&5
   1.107 +$as_echo "$video_mir" >&6; }
   1.108 +
   1.109 +            if test x$video_mir = xyes; then
   1.110 +                  $as_echo "#define SDL_VIDEO_DRIVER_MIR 1" >>confdefs.h
   1.111 +
   1.112 +                  SOURCES="$SOURCES $srcdir/src/video/mir/*.c"
   1.113 +                  EXTRA_CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags egl mirclient xkbcommon`"
   1.114 +                  EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$PKG_CONFIG --libs egl mirclient xkbcommon`"
   1.115 +                  have_video=yes
   1.116 +            fi
   1.117 +        fi
   1.118 +    fi
   1.119 +}
   1.120  
   1.121  CheckWarnAll()
   1.122  {
   1.123 @@ -22451,6 +22550,7 @@
   1.124          CheckSNDIO
   1.125          CheckX11
   1.126          CheckWayland
   1.127 +        CheckMir
   1.128          CheckDirectFB
   1.129          CheckFusionSound
   1.130          CheckOpenGLX11