[FFmpeg-devel,2/2,v2] configure: simplify checks for libxcb dependent features

Submitted by James Almer on Sept. 28, 2017, 10:56 p.m.

Details

Message ID 20170928225622.3580-2-jamrial@gmail.com
State New
Headers show

Commit Message

James Almer Sept. 28, 2017, 10:56 p.m.
Signed-off-by: James Almer <jamrial@gmail.com>
---
 configure | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/configure b/configure
index ebcf48de20..2750605e75 100755
--- a/configure
+++ b/configure
@@ -6206,15 +6206,12 @@  if enabled libcdio; then
     die "ERROR: No usable libcdio/cdparanoia found"
 fi
 
-enabled libxcb && check_pkg_config libxcb "xcb >= 1.4" xcb/xcb.h xcb_connect
+enabled libxcb && use_pkg_config libxcb "xcb >= 1.4" xcb/xcb.h xcb_connect
 
 if enabled libxcb; then
-    enabled libxcb_shm    && check_pkg_config libxcb_shm    xcb-shm    xcb/shm.h    xcb_shm_attach
-    enabled libxcb_shape  && check_pkg_config libxcb_shape  xcb-shape  xcb/shape.h  xcb_shape_get_rectangles
-    enabled libxcb_xfixes && check_pkg_config libxcb_xfixes xcb-xfixes xcb/xfixes.h xcb_xfixes_get_cursor_image
-
-    add_cflags $xcb_cflags $xcb_shm_cflags $xcb_xfixes_cflags $xcb_shape_cflags
-    add_extralibs $xcb_extralibs $xcb_shm_extralibs $xcb_xfixes_extralibs $xcb_shape_extralibs
+    enabled libxcb_shm    && use_pkg_config libxcb_shm    xcb-shm    xcb/shm.h    xcb_shm_attach
+    enabled libxcb_shape  && use_pkg_config libxcb_shape  xcb-shape  xcb/shape.h  xcb_shape_get_rectangles
+    enabled libxcb_xfixes && use_pkg_config libxcb_xfixes xcb-xfixes xcb/xfixes.h xcb_xfixes_get_cursor_image
 else
     disable libxcb_shm libxcb_shape libxcb_xfixes
 fi