[FFmpeg-devel] [PATCH] configure: x11grab + ld --as-needed

Pavlov Konstantin thresh
Wed May 2 15:18:54 CEST 2007


Hello.

While trying to enable x11grab, i found out a small error in configure
system checks:
check_cmd places -lfoo before object file, so it fails when you invoke ld
with --as-needed option.

Attached patch fixes it and also adds configure output whether x11grab is
enabled or not.

-- 
It's more than magnificent -- it's mediocre.
		-- Sam Goldwyn
-------------- next part --------------
diff --git a/configure b/configure
index 568e66a..2496df5 100755
--- a/configure
+++ b/configure
@@ -393,7 +393,7 @@ check_cpp(){
 check_ld(){
     log check_ld "$@"
     check_cc || return
-    check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
+    check_cmd $cc $LDFLAGS -o $TMPE $TMPO "$@" $extralibs
 }
 
 check_cflags(){
@@ -1729,7 +1729,8 @@ check_header X11/Xlib.h                 &&
 check_header X11/extensions/XShm.h      &&
 check_func XOpenDisplay -lX11           &&
 check_func XShmCreateImage -lX11 -lXext &&
-add_extralibs -lX11 -lXext              ||
+add_extralibs -lX11 -lXext              &&
+enable x11_grab                         ||
 disable x11_grab_device_demuxer
 
 enabled debug && add_cflags -g
@@ -1833,6 +1834,7 @@ echo "static                    $static"
 echo "shared                    $shared"
 echo "postprocessing support    $pp"
 echo "software scaler enabled   $swscaler"
+echo "x11 grabbing enabled      $x11_grab"
 echo "video hooking             $vhook"
 if enabled vhook; then
     echo "Imlib2 support            $imlib2"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070502/eb2e8bf9/attachment.pgp>



More information about the ffmpeg-devel mailing list