OSDN Git Service

Merge commit 'fe7bc1f16abaefe66d8a20f734ca3eb8a4ce4d43'
authorJames Almer <jamrial@gmail.com>
Fri, 31 Mar 2017 17:29:22 +0000 (14:29 -0300)
committerJames Almer <jamrial@gmail.com>
Fri, 31 Mar 2017 17:29:22 +0000 (14:29 -0300)
* commit 'fe7bc1f16abaefe66d8a20f734ca3eb8a4ce4d43':
  configure: Do not unconditionally check for (and enable) xlib

Merged-by: James Almer <jamrial@gmail.com>
1  2 
configure

diff --cc configure
+++ b/configure
@@@ -6026,50 -4778,26 +6026,47 @@@ if enabled libcdio; the
      die "ERROR: No usable libcdio/cdparanoia found"
  fi
  
- enabled xlib &&
-     check_lib X11/Xlib.h XOpenDisplay -lX11 || disable xlib
 -if enabled libxcb; then
 -    check_pkg_config xcb-shape xcb/shape.h xcb_shape_rectangles || {
 -        enabled libxcb && die "ERROR: libxcb not found";
 +if ! disabled libxcb; then
 +    check_pkg_config "xcb >= 1.4" xcb/xcb.h xcb_connect || {
 +        enabled libxcb && die "ERROR: libxcb >= 1.4 not found";
      } && enable libxcb
  
 -    disabled libxcb_shm ||
 +if enabled libxcb; then
 +    disabled libxcb_shm || {
          check_pkg_config xcb-shm xcb/shm.h xcb_shm_attach || {
              enabled libxcb_shm && die "ERROR: libxcb_shm not found";
 -        } && check_header sys/shm.h && enable libxcb_shm
 +        } && check_header sys/shm.h && enable libxcb_shm; }
  
 -    disabled libxcb_xfixes ||
 +    disabled libxcb_xfixes || {
          check_pkg_config xcb-xfixes xcb/xfixes.h xcb_xfixes_get_cursor_image || {
              enabled libxcb_xfixes && die "ERROR: libxcb_xfixes not found";
 -        } && enable libxcb_xfixes
 +        } && enable libxcb_xfixes; }
  
 -    add_cflags "$xcb_shape_cflags $xcb_event_cflags $xcb_shm_cflags $xcb_xfixes_cflags"
 -    add_extralibs "$xcb_shape_libs $xcb_event_libs $xcb_shm_libs $xcb_xfixes_libs"
 +    disabled libxcb_shape || {
 +        check_pkg_config xcb-shape xcb/shape.h xcb_shape_get_rectangles || {
 +            enabled libxcb_shape && die "ERROR: libxcb_shape not found";
 +        } && enable libxcb_shape; }
 +
 +    add_cflags $xcb_cflags $xcb_shm_cflags $xcb_xfixes_cflags $xcb_shape_cflags
 +    add_extralibs $xcb_libs $xcb_shm_libs $xcb_xfixes_libs $xcb_shape_libs
 +fi
  fi
  
 -enabled vaapi && require vaapi va/va.h vaInitialize -lva
 +check_func_headers "windows.h" CreateDIBSection "$gdigrab_indev_extralibs"
 +
 +enabled dxva2api_h &&
 +    check_cc <<EOF && enable dxva2api_cobj
 +#define _WIN32_WINNT 0x0600
 +#define COBJMACROS
 +#include <windows.h>
 +#include <d3d9.h>
 +#include <dxva2api.h>
 +int main(void) { IDirectXVideoDecoder *o = NULL; IDirectXVideoDecoder_Release(o); return 0; }
 +EOF
 +
 +enabled vaapi &&
 +    check_lib va/va.h vaInitialize -lva ||
 +    disable vaapi
  
  enabled vaapi &&
      check_code cc "va/va.h" "vaCreateSurfaces(0, 0, 0, 0, 0, 0, 0, 0)" ||