configure
changeset 8062 4fc5f66d63cc
parent 8056 abd9434c5d3e
child 8082 5b83ad3f01ac
     1.1 --- a/configure	Fri Dec 13 09:48:12 2013 -0300
     1.2 +++ b/configure	Sat Dec 14 20:18:43 2013 -0300
     1.3 @@ -817,6 +817,7 @@
     1.4  enable_sndio_shared
     1.5  enable_diskaudio
     1.6  enable_dummyaudio
     1.7 +enable_video_wayland
     1.8  enable_video_x11
     1.9  with_x
    1.10  enable_x11_shared
    1.11 @@ -1532,6 +1533,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-wayland  use Wayland video driver [[default=yes]]
    1.16    --enable-video-x11      use X11 video driver [[default=yes]]
    1.17    --enable-x11-shared     dynamically load X11 support [[default=maybe]]
    1.18    --enable-video-x11-xcursor
    1.19 @@ -18633,6 +18635,82 @@
    1.20      fi
    1.21  }
    1.22  
    1.23 +CheckWayland()
    1.24 +{
    1.25 +    # Check whether --enable-video-wayland was given.
    1.26 +if test "${enable_video_wayland+set}" = set; then :
    1.27 +  enableval=$enable_video_wayland;
    1.28 +else
    1.29 +  enable_video_wayland=yes
    1.30 +fi
    1.31 +
    1.32 +
    1.33 +    if test x$enable_video = xyes -a x$enable_video_wayland = 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 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Wayland support" >&5
    1.76 +$as_echo_n "checking for Wayland support... " >&6; }
    1.77 +        video_wayland=no
    1.78 +        if test x$PKG_CONFIG != xno; then
    1.79 +            if $PKG_CONFIG --exists wayland-client wayland-egl wayland-cursor egl xkbcommon ; then
    1.80 +                WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor egl xkbcommon`
    1.81 +                WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor egl xkbcommon`
    1.82 +                video_wayland=yes
    1.83 +            fi
    1.84 +        fi
    1.85 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_wayland" >&5
    1.86 +$as_echo "$video_wayland" >&6; }
    1.87 +
    1.88 +        if test x$video_wayland = xyes; then
    1.89 +
    1.90 +$as_echo "#define SDL_VIDEO_DRIVER_WAYLAND 1" >>confdefs.h
    1.91 +
    1.92 +            SOURCES="$SOURCES $srcdir/src/video/wayland/*.c"
    1.93 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS"
    1.94 +                        EXTRA_LDFLAGS="$EXTRA_LDFLAGS $WAYLAND_LIBS"
    1.95 +            have_video=yes
    1.96 +        fi
    1.97 +    fi
    1.98 +}
    1.99  
   1.100  CheckX11()
   1.101  {
   1.102 @@ -22220,6 +22298,7 @@
   1.103          CheckNAS
   1.104          CheckSNDIO
   1.105          CheckX11
   1.106 +        CheckWayland
   1.107          CheckDirectFB
   1.108          CheckFusionSound
   1.109          CheckOpenGLX11