On Fri, Dec 16, 2016 at 01:19:27PM +0100, Diego Biurrun wrote:
> On Fri, Dec 16, 2016 at 01:09:32PM +0100, Hendrik Leppkes wrote:
> > On Thu, Dec 15, 2016 at 6:59 PM, Diego Biurrun <di...@biurrun.de> wrote:
> > > Check for and link against user32 instead, which also fixes
> > > the missing dependency of dxva2 on user32 with MSVC.
> > > ---
> > >  configure | 5 ++---
> > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/configure b/configure
> > > index fb82fc4..5151c94 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -2387,7 +2387,6 @@ sndio_indev_deps="sndio"
> > >  sndio_outdev_deps="sndio"
> > >  v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
> > >  vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines"
> > > -vfwcap_indev_extralibs="-lavicap32"
> > >  xcbgrab_indev_deps="libxcb"
> > >
> > >  # protocols
> > > @@ -3046,7 +3045,6 @@ msvc_common_flags(){
> > >              -mthumb)              ;;
> > >              -march=*)             ;;
> > >              -lz)                  echo zlib.lib ;;
> > > -            -lavicap32)           echo vfw32.lib user32.lib ;;
> > >              -lx264)               echo libx264.lib ;;
> > >              -l*)                  echo ${flag#-l}.lib ;;
> > >              -L*)                  echo -libpath:${flag#-L} ;;
> > > @@ -4728,7 +4726,8 @@ check_header AVFoundation/AVFoundation.h
> > >
> > >  check_header sys/videoio.h
> > >
> > > -check_func_headers "windows.h vfw.h" capCreateCaptureWindow 
> > > "$vfwcap_indev_extralibs"
> > > +check_lib "windows.h winuser.h" GetShellWindow -luser32
> > > +check_lib "windows.h vfw.h" capCreateCaptureWindow -lvfw32
> > >  # check that WM_CAP_DRIVER_CONNECT is defined to the proper value
> > >  # w32api 3.12 had it defined wrong
> > >  check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable 
> > > vfwcap_defines
> > 
> > Doesn't this always link to vfw32 even if vfwcap is not enabled? That
> > seems like a step backwards, since that library is definitely not
> > needed otherwise.
> 
> Yes, it does. The corner case with the vfwcap indev disabled is overlinked.
> However, all of these cases of overlinking or underlinking are taken care
> of by my fine-grained linker dependency changes two patches down the chain.
> Before that patch, I need to clean up some odds and ends like this one.

Patch OKed on IRC after further discussion.

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to