[MPlayer-dev-eng] [PATCH] FreeBSD DVD Fix
Diego Biurrun
diego at biurrun.de
Fri Aug 20 11:17:54 CEST 2004
jb13 at gomerbud.com writes:
> On Thu, Aug 19, 2004 at 06:34:19PM +0200, Diego Biurrun wrote:
> > jb13 at gomerbud.com writes:
> > >
> > > --- configure.orig 2004-07-15 00:04:42.000000000 +0200
> > > +++ configure
> > > @@ -380,8 +380,8 @@ for ac_option do
> > > _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
> > > ;;
> > > --with-extralibdir=*)
> > > - _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
> > > -# _ld_extra="${_ld_extra} -Wl,-R"`echo $ac_option | cut -d '=' -f 2 | sed 's
> > > ,:, -Wl\,-R,g'`" -L"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
> > > +# _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
> > > + _ld_extra="${_ld_extra} -Wl,-R"`echo $ac_option | cut -d '=' -f 2 | sed 's,
> > > :, -Wl\,-R,g'`" -L"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
> > >
> > > this is for proper linking on netbsd, for an explanation why see
> > >
> > > http://www.NetBSD.org/Documentation/elf.html
> >
> > OK, it seems like the commented out version comes from a NetBSD
> > portability patch. A real portable solution would have to choose
> > intelligently between the two at runtime, though.
>
> you can't, the -rpath,-R options embed the libraries paths in the elf binary,
> it has to be done at link time. note that it will probly work on all elf
> systems linux,freebsd,openbsd etc. you could make something at the end of
> configure like this
>
> if netbsd ; then
> for i in LDFLAGS; do
> LDFLAGS=`echo LDFLAGS | sed 's,-L\(.* \),-L\1 -W\,-R\1,g'`
> done
> fi
>
> not tested
Why not send in a tested patch then ;-)
Diego
More information about the MPlayer-dev-eng
mailing list