diff --git a/configure b/configure index b2455faf610fa0f5f4aae3978ea89eceb375cfca..fae9ca1ead232e07afa823a428fd112c9cf9f184 100755 --- a/configure +++ b/configure @@ -251,7 +251,7 @@ 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 enable X11 grabbing using XCB [auto] --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, @@ -5024,11 +5024,12 @@ fi enabled xlib && check_lib X11/Xlib.h XOpenDisplay -lX11 || disable xlib -if enabled libxcb || enabled x11grab && ! disabled libxcb; then +if ! disabled libxcb; then check_pkg_config xcb xcb/xcb.h xcb_connect || { enabled libxcb && die "ERROR: libxcb not found"; } && disable x11grab && enable libxcb +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"; @@ -5042,6 +5043,7 @@ if enabled libxcb || enabled x11grab && ! disabled libxcb; then add_cflags "$xcb_event_cflags $xcb_shm_cflags $xcb_xfixes_cflags" add_extralibs "$xcb_event_libs $xcb_shm_libs $xcb_xfixes_libs" fi +fi if enabled x11grab; then enabled xlib || die "ERROR: Xlib not found"