summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-07-15 15:44:05 -0300
committerJames Almer <jamrial@gmail.com>2021-07-15 15:44:46 -0300
commit395d9ad00a7fe9f3e5f4888429830c4e820616cc (patch)
tree8ae9c227974efea3fdd8c693a9b40bcc6dabd6a2
parent13ec6624b3507052d8a0e14cee39b49e3c99450f (diff)
configure: clean up and fix xlib checks
Split them into separate checks per library. Signed-off-by: James Almer <jamrial@gmail.com>
-rwxr-xr-xconfigure23
1 files changed, 17 insertions, 6 deletions
diff --git a/configure b/configure
index 5ef94e7ccd..0aa372f50a 100755
--- a/configure
+++ b/configure
@@ -2950,7 +2950,7 @@ d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext"
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32"
ffnvcodec_deps_any="libdl LoadLibrary"
nvdec_deps="ffnvcodec"
-vaapi_x11_deps="xlib"
+vaapi_x11_deps="xlib_x11"
videotoolbox_hwaccel_deps="videotoolbox pthreads"
videotoolbox_hwaccel_extralibs="-framework QuartzCore"
vulkan_deps_any="libdl LoadLibrary"
@@ -3471,7 +3471,7 @@ v4l2_outdev_suggest="libv4l2"
vfwcap_indev_deps="vfw32 vfwcap_defines"
xcbgrab_indev_deps="libxcb"
xcbgrab_indev_suggest="libxcb_shm libxcb_shape libxcb_xfixes"
-xv_outdev_deps="xlib"
+xv_outdev_deps="xlib_xv xlib_x11 xlib_xext"
# protocols
async_protocol_deps="threads"
@@ -6193,9 +6193,20 @@ check_func_headers windows.h SetDllDirectory
check_func_headers windows.h Sleep
check_func_headers windows.h VirtualAlloc
check_func_headers glob.h glob
-enabled xlib && {
- check_pkg_config xlib xv "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute ||
- check_lib xlib "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext; }
+
+if enabled xlib; then
+ check_pkg_config xlib_x11 x11 "X11/Xlib.h" XPending ||
+ check_lib xlib_x11 "X11/Xlib.h" XPending -lX11 ||
+ disable xlib
+
+ check_pkg_config xlib_xext xext "X11/Xlib.h X11/extensions/XShm.h" XShmAttach ||
+ check_lib xlib_xext "X11/Xlib.h X11/extensions/Xvlib.h" XShmAttach -lXext ||
+ disable xlib
+
+ check_pkg_config xlib_xv xv "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute ||
+ check_lib xlib_xv "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv ||
+ disable xlib
+fi
check_headers direct.h
check_headers dirent.h
@@ -6752,7 +6763,7 @@ enabled vaapi &&
if enabled vaapi; then
check_pkg_config vaapi_drm "libva-drm" "va/va_drm.h" vaGetDisplayDRM
- if enabled xlib; then
+ if enabled xlib_x11; then
check_pkg_config vaapi_x11 "libva-x11" "va/va_x11.h" vaGetDisplay
fi