[FFmpeg-devel] [PATCH] configure: make it possible to disable xlib dependancy

Michael Niedermayer michaelni at gmx.at
Wed Feb 19 04:08:24 CET 2014


The unconditional dependancy was added in 7671dd7cd7d51bbd637cc46d8f104a141bc355ea

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 configure |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 0ad174c..8518410 100755
--- a/configure
+++ b/configure
@@ -257,6 +257,7 @@ External library support:
   --enable-openssl         enable openssl [no]
   --enable-x11grab         enable X11 grabbing [no]
   --disable-zlib           disable zlib [autodetect]
+  --disable-xlib           disable xlib [autodetect]
 
 Advanced options (experts only):
   --cross-prefix=PREFIX    use PREFIX for compilation tools [$cross_prefix]
@@ -1398,6 +1399,7 @@ CONFIG_LIST="
     swscale_alpha
     thumb
     version3
+    xlib
     xmm_clobber_test
 "
 
@@ -2500,6 +2502,7 @@ enable swscale_alpha
 
 # Enable hwaccels by default.
 enable dxva2 vaapi vdpau xvmc
+enable xlib
 
 # build settings
 SHFLAGS='-shared -Wl,-soname,$$(@F)'
@@ -4357,7 +4360,8 @@ check_func_headers windows.h SetConsoleTextAttribute
 check_func_headers windows.h Sleep
 check_func_headers windows.h VirtualAlloc
 check_func_headers glob.h glob
-check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext
+enabled xlib &&
+    check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext
 
 check_header cl/cl.h
 check_header direct.h
@@ -4620,7 +4624,8 @@ if enabled libcdio; then
     die "ERROR: libcdio-paranoia not found"
 fi
 
-check_lib X11/Xlib.h XOpenDisplay -lX11 && enable xlib
+enabled xlib &&
+    check_lib X11/Xlib.h XOpenDisplay -lX11 || disable xlib
 
 enabled x11grab                                           &&
 require Xext X11/extensions/XShm.h XShmCreateImage -lXext &&
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list