[MPlayer-dev-eng] [PATCH] FreeBSD DVD Fix

jb13 at gomerbud.com jb13 at gomerbud.com
Sat Aug 21 11:28:47 CEST 2004


On Fri, Aug 20, 2004 at 11:17:54AM +0200, Diego Biurrun wrote:
> jb13 at gomerbud.com writes:
> > On Thu, Aug 19, 2004 at 06:34:19PM +0200, Diego Biurrun wrote:
> > > jb13 at gomerbud.com writes:
[...]
> > 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 ;-)

here you go
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.902
diff -u -r1.902 configure
--- configure	20 Aug 2004 18:29:25 -0000	1.902
+++ configure	21 Aug 2004 09:12:31 -0000
@@ -382,8 +382,11 @@
     _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'`
+    if [ $(uname -s) = "NetBSD" ]; then
+      _ld_extra=`echo $ac_option | cut -d '=' -f 2 | sed -e 's,[a-zA-Z0-9/\\]*, -L& -Wl\,-R&  ,g' -e 's/ : //g'`
+    else
+      _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
+    fi
     ;;
   --enable-runtime-cpudetection)
     _runtime_cpudetection=yes
@@ -3196,7 +3199,11 @@
 if test -z "$_ld_x11" ; then
   for I in /usr/X11R6/lib /usr/lib/X11R6 /usr/X11/lib /usr/lib32 /usr/openwin/lib /usr/X11R6/lib64 ; do
     if test -d "$I" && ( test -f "$I/libX11.so" || test -f "$I/libX11.a" || test -f "$I/libX11.dll.a" ) ; then
-      _ld_x11="-L$I"
+      if netbsd; then
+        _ld_x11="-L$I -Wl,-R$I"
+      else
+	_ld_x11="-L$I"
+      fi
       echores "yes (using $I)"
       break;
     fi


More information about the MPlayer-dev-eng mailing list