configure
changeset 8159 427e8fdf6f69
parent 8158 429513cb6707
child 8161 6c5d35c8b3dd
     1.1 --- a/configure	Mon Feb 03 11:14:25 2014 -0500
     1.2 +++ b/configure	Mon Feb 03 11:52:54 2014 -0500
     1.3 @@ -817,10 +817,11 @@
     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 +enable_video_mir
    1.12 +enable_mir_shared
    1.13  enable_video_x11
    1.14  with_x
    1.15  enable_x11_shared
    1.16 @@ -1535,12 +1536,13 @@
    1.17    --enable-sndio-shared   dynamically load sndio audio support [[default=yes]]
    1.18    --enable-diskaudio      support the disk writer audio driver [[default=yes]]
    1.19    --enable-dummyaudio     support the dummy audio driver [[default=yes]]
    1.20 -  --enable-video-mir      use Mir video driver [[default=yes]]
    1.21    --enable-video-wayland  use Wayland video driver [[default=yes]]
    1.22    --enable-video-wayland-qt-touch
    1.23                            QtWayland server support for Wayland video driver
    1.24                            [[default=yes]]
    1.25    --enable-wayland-shared dynamically load Wayland support [[default=maybe]]
    1.26 +  --enable-video-mir      use Mir video driver [[default=yes]]
    1.27 +  --enable-mir-shared     dynamically load Mir support [[default=maybe]]
    1.28    --enable-video-x11      use X11 video driver [[default=yes]]
    1.29    --enable-x11-shared     dynamically load X11 support [[default=maybe]]
    1.30    --enable-video-x11-xcursor
    1.31 @@ -18629,105 +18631,6 @@
    1.32      fi
    1.33  }
    1.34  
    1.35 -CheckMir()
    1.36 -{
    1.37 -    # Check whether --enable-video-mir was given.
    1.38 -if test "${enable_video_mir+set}" = set; then :
    1.39 -  enableval=$enable_video_mir;
    1.40 -else
    1.41 -  enable_video_mir=yes
    1.42 -fi
    1.43 -
    1.44 -
    1.45 -    if test x$enable_video = xyes -a x$enable_video_mir = xyes; then
    1.46 -        # Extract the first word of "pkg-config", so it can be a program name with args.
    1.47 -set dummy pkg-config; ac_word=$2
    1.48 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    1.49 -$as_echo_n "checking for $ac_word... " >&6; }
    1.50 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
    1.51 -  $as_echo_n "(cached) " >&6
    1.52 -else
    1.53 -  case $PKG_CONFIG in
    1.54 -  [\\/]* | ?:[\\/]*)
    1.55 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
    1.56 -  ;;
    1.57 -  *)
    1.58 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    1.59 -for as_dir in $PATH
    1.60 -do
    1.61 -  IFS=$as_save_IFS
    1.62 -  test -z "$as_dir" && as_dir=.
    1.63 -    for ac_exec_ext in '' $ac_executable_extensions; do
    1.64 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    1.65 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    1.66 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    1.67 -    break 2
    1.68 -  fi
    1.69 -done
    1.70 -  done
    1.71 -IFS=$as_save_IFS
    1.72 -
    1.73 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
    1.74 -  ;;
    1.75 -esac
    1.76 -fi
    1.77 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
    1.78 -if test -n "$PKG_CONFIG"; then
    1.79 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
    1.80 -$as_echo "$PKG_CONFIG" >&6; }
    1.81 -else
    1.82 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    1.83 -$as_echo "no" >&6; }
    1.84 -fi
    1.85 -
    1.86 -
    1.87 -
    1.88 -        if test x$PKG_CONFIG != xno; then
    1.89 -            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mir support" >&5
    1.90 -$as_echo_n "checking for Mir support... " >&6; }
    1.91 -            video_mir=no
    1.92 -            tmp_CFLAGS="$CFLAGS"
    1.93 -            CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags egl mirclient xkbcommon`"
    1.94 -
    1.95 -            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.96 -/* end confdefs.h.  */
    1.97 -
    1.98 -             #include <EGL/egl.h>
    1.99 -             #include <xkbcommon/xkbcommon.h>
   1.100 -             #include <mir_toolkit/mir_client_library.h>
   1.101 -
   1.102 -int
   1.103 -main ()
   1.104 -{
   1.105 -
   1.106 -
   1.107 -  ;
   1.108 -  return 0;
   1.109 -}
   1.110 -_ACEOF
   1.111 -if ac_fn_c_try_compile "$LINENO"; then :
   1.112 -
   1.113 -            video_mir=yes
   1.114 -
   1.115 -fi
   1.116 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.117 -            CFLAGS="$tmp_CFLAGS"
   1.118 -            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_mir" >&5
   1.119 -$as_echo "$video_mir" >&6; }
   1.120 -
   1.121 -            if test x$video_mir = xyes; then
   1.122 -                  $as_echo "#define SDL_VIDEO_DRIVER_MIR 1" >>confdefs.h
   1.123 -
   1.124 -                  SOURCES="$SOURCES $srcdir/src/video/mir/*.c"
   1.125 -                  EXTRA_CFLAGS="$EXTRA_CFLAGS `$PKG_CONFIG --cflags egl mirclient xkbcommon`"
   1.126 -                  EXTRA_LDFLAGS="$EXTRA_LDFLAGS `$PKG_CONFIG --libs egl mirclient xkbcommon`"
   1.127 -                  have_video=yes
   1.128 -                  SUMMARY_video="${SUMMARY_video} mir"
   1.129 -            fi
   1.130 -        fi
   1.131 -    fi
   1.132 -}
   1.133 -
   1.134  CheckWarnAll()
   1.135  {
   1.136      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -Wall option" >&5
   1.137 @@ -18888,8 +18791,8 @@
   1.138              fi
   1.139              if test x$have_loadso != xyes && \
   1.140                 test x$enable_wayland_shared = xyes; then
   1.141 -                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic WAYLAND loading" >&5
   1.142 -$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic WAYLAND loading" >&2;}
   1.143 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic Wayland loading" >&5
   1.144 +$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic Wayland loading" >&2;}
   1.145                  enable_wayland_shared=no
   1.146              fi
   1.147              if test x$have_loadso = xyes && \
   1.148 @@ -18901,7 +18804,7 @@
   1.149                  echo "-- dynamic libwayland-client -> $wayland_client_lib"
   1.150                  echo "-- dynamic libwayland-egl -> $wayland_egl_lib"
   1.151                  echo "-- dynamic libwayland-cursor -> $wayland_cursor_lib"
   1.152 -                echo "-- dynamic xkbcommon -> $xkbcommon_lib"
   1.153 +                echo "-- dynamic libxkbcommon -> $xkbcommon_lib"
   1.154  
   1.155  cat >>confdefs.h <<_ACEOF
   1.156  #define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC "$wayland_client_lib"
   1.157 @@ -18933,6 +18836,129 @@
   1.158      fi
   1.159  }
   1.160  
   1.161 +CheckMir()
   1.162 +{
   1.163 +    # Check whether --enable-video-mir was given.
   1.164 +if test "${enable_video_mir+set}" = set; then :
   1.165 +  enableval=$enable_video_mir;
   1.166 +else
   1.167 +  enable_video_mir=yes
   1.168 +fi
   1.169 +
   1.170 +
   1.171 +    if test x$enable_video = xyes -a x$enable_video_mir = xyes; then
   1.172 +        # Extract the first word of "pkg-config", so it can be a program name with args.
   1.173 +set dummy pkg-config; ac_word=$2
   1.174 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.175 +$as_echo_n "checking for $ac_word... " >&6; }
   1.176 +if ${ac_cv_path_PKG_CONFIG+:} false; then :
   1.177 +  $as_echo_n "(cached) " >&6
   1.178 +else
   1.179 +  case $PKG_CONFIG in
   1.180 +  [\\/]* | ?:[\\/]*)
   1.181 +  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   1.182 +  ;;
   1.183 +  *)
   1.184 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.185 +for as_dir in $PATH
   1.186 +do
   1.187 +  IFS=$as_save_IFS
   1.188 +  test -z "$as_dir" && as_dir=.
   1.189 +    for ac_exec_ext in '' $ac_executable_extensions; do
   1.190 +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.191 +    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.192 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.193 +    break 2
   1.194 +  fi
   1.195 +done
   1.196 +  done
   1.197 +IFS=$as_save_IFS
   1.198 +
   1.199 +  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   1.200 +  ;;
   1.201 +esac
   1.202 +fi
   1.203 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   1.204 +if test -n "$PKG_CONFIG"; then
   1.205 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   1.206 +$as_echo "$PKG_CONFIG" >&6; }
   1.207 +else
   1.208 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.209 +$as_echo "no" >&6; }
   1.210 +fi
   1.211 +
   1.212 +
   1.213 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mir support" >&5
   1.214 +$as_echo_n "checking for Mir support... " >&6; }
   1.215 +        video_mir=no
   1.216 +        if test x$PKG_CONFIG != xno; then
   1.217 +            if $PKG_CONFIG --exists mirclient egl xkbcommon ; then
   1.218 +                MIR_CFLAGS=`$PKG_CONFIG --cflags mirclient egl xkbcommon`
   1.219 +                MIR_LIBS=`$PKG_CONFIG --libs mirclient egl xkbcommon`
   1.220 +                video_mir=yes
   1.221 +            fi
   1.222 +        fi
   1.223 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_mir" >&5
   1.224 +$as_echo "$video_mir" >&6; }
   1.225 +
   1.226 +        if test x$video_mir = xyes; then
   1.227 +
   1.228 +$as_echo "#define SDL_VIDEO_DRIVER_MIR 1" >>confdefs.h
   1.229 +
   1.230 +            SOURCES="$SOURCES $srcdir/src/video/mir/*.c"
   1.231 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $MIR_CFLAGS"
   1.232 +            # Check whether --enable-mir-shared was given.
   1.233 +if test "${enable_mir_shared+set}" = set; then :
   1.234 +  enableval=$enable_mir_shared;
   1.235 +else
   1.236 +  enable_mir_shared=maybe
   1.237 +fi
   1.238 +
   1.239 +
   1.240 +                        case "$host" in
   1.241 +                *)
   1.242 +                    mirclient_lib=`find_lib "libmirclient.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
   1.243 +                    xkbcommon_lib=`find_lib "libxkbcommon.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
   1.244 +                    ;;
   1.245 +            esac
   1.246 +
   1.247 +            if test x$enable_mir_shared = xmaybe; then
   1.248 +                enable_mir_shared=yes
   1.249 +            fi
   1.250 +            if test x$have_loadso != xyes && \
   1.251 +               test x$enable_mir_shared = xyes; then
   1.252 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic Mir loading" >&5
   1.253 +$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic Mir loading" >&2;}
   1.254 +                enable_mir_shared=no
   1.255 +            fi
   1.256 +            if test x$have_loadso = xyes && \
   1.257 +               test x$enable_mir_shared = xyes && \
   1.258 +               test x$mirclient_lib != x && \
   1.259 +               test x$xkbcommon_lib != x; then
   1.260 +                echo "-- dynamic libmirclient -> $mirclient_lib"
   1.261 +                echo "-- dynamic libxkbcommon -> $xkbcommon_lib"
   1.262 +
   1.263 +cat >>confdefs.h <<_ACEOF
   1.264 +#define SDL_VIDEO_DRIVER_MIR_DYNAMIC "$mirclient_lib"
   1.265 +_ACEOF
   1.266 +
   1.267 +
   1.268 +cat >>confdefs.h <<_ACEOF
   1.269 +#define SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON "$xkbcommon_lib"
   1.270 +_ACEOF
   1.271 +
   1.272 +                SUMMARY_video="${SUMMARY_video} mir(dynamic)"
   1.273 +            else
   1.274 +                enable_mir_shared=no
   1.275 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MIR_LIBS"
   1.276 +                SUMMARY_video="${SUMMARY_video} mir"
   1.277 +            fi
   1.278 +            have_video=yes
   1.279 +        fi
   1.280 +    fi
   1.281 +}
   1.282 +
   1.283 +
   1.284  CheckX11()
   1.285  {
   1.286