X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=766f9c2f267c48a087a6605cf0c8944a7b226672;hb=a9179b5bd6f143b4a7ff48bb0d00c8f0a7cafb4b;hp=a82bef712f161be688a27ded75d96e6a35ffc4ff;hpb=73ea3ffcd55b0b1d23ba4769d65996a8d58ffa11;p=ffmpeg diff --git a/configure b/configure index a82bef712f1..766f9c2f267 100755 --- a/configure +++ b/configure @@ -210,10 +210,13 @@ External library support: --enable-libx264 enable H.264 encoding via x264 [no] --enable-libx265 enable HEVC encoding via x265 [no] --enable-libxavs enable AVS encoding via xavs [no] + --enable-libxcb enable X11 grabbing using XCB [no] + --enable-libxcb-shm enable X11 grabbing shm communication [auto] + --enable-libxcb-xfixes enable X11 grabbing mouse rendering [auto] --enable-libxvid enable Xvid encoding via xvidcore, native MPEG-4/Xvid encoder exists [no] --enable-openssl enable openssl [no] - --enable-x11grab enable X11 grabbing [no] + --enable-x11grab enable X11 grabbing (legacy) [no] --enable-zlib enable zlib [autodetect] Toolchain options: @@ -1170,6 +1173,9 @@ EXTERNAL_LIBRARY_LIST=" libx264 libx265 libxavs + libxcb + libxcb_shm + libxcb_xfixes libxvid openssl x11grab @@ -1453,6 +1459,7 @@ SYSTEM_FUNCS=" getservbyport GetSystemTimeAsFileTime gettimeofday + gmtime_r inet_aton isatty jack_port_get_latency_range @@ -2101,7 +2108,8 @@ sndio_outdev_deps="sndio_h" v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h" vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines" vfwcap_indev_extralibs="-lavicap32" -x11grab_indev_deps="x11grab XShmCreateImage" +x11grab_indev_deps="x11grab" +x11grab_xcb_indev_deps="libxcb" # protocols ffrtmpcrypt_protocol_deps="!librtmp_protocol" @@ -4062,6 +4070,7 @@ check_func gethrtime check_func getopt check_func getrusage check_func gettimeofday +check_func gmtime_r check_func isatty check_func localtime_r check_func mach_absolute_time @@ -4271,10 +4280,30 @@ fi check_lib X11/Xlib.h XOpenDisplay -lX11 && enable xlib -enabled x11grab && -require Xext X11/extensions/XShm.h XShmCreateImage -lXext && -require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes && -{ enabled xlib || die "ERROR: Xlib not found"; } +if enabled libxcb || enabled x11grab && ! disabled libxcb; then + check_pkg_config xcb xcb/xcb.h xcb_connect || { + enabled libxcb && die "ERROR: libxcb not found"; + } && disable x11grab && enable libxcb + + 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 + + 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 + + add_cflags "$xcb_event_cflags $xcb_shm_cflags $xcb_xfixes_cflags" + add_extralibs "$xcb_event_libs $xcb_shm_libs $xcb_xfixes_libs" +fi + +if enabled x11grab; then + enabled xlib || die "ERROR: Xlib not found" + require Xext X11/extensions/XShm.h XShmCreateImage -lXext + require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes +fi enabled vdpau && check_cpp_condition vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" ||