[MPlayer-dev-eng] [PATCH] modify X11 lib path search for mixed 32/64 bit case
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Jun 1 22:51:56 CEST 2005
Hi,
next try...
On Wed, Jun 01, 2005 at 02:50:25PM +0300, Ivan Kalvachev wrote:
> 1. If user gives x11libdir and the autodetection fails then the we
> should keep the given by user dir. (it have the power of force, or it
> would have the power of force if x11=yes)
Huh? When a a list of possible X11 directories is specified,
autodetection is done on these, and if it fails it will use the last
one.
> I guess that adding _x11_paths and keeping _ld_x11 would do the trick, but
> actually handling _x11=no case could be better:
> + break
> + fi
> + done
> +else
> + I=$_x11_paths
Why setting I here? It is not used at all with --disable-x11, and even
in the other cases only for the status message...
> 2. I oppose of removing
> - if test -d "$I"
> and going with check dirrectly. Invoking build is very slow. I don't
> oppose removing the rest of lib test as they doesn't seem too
> universal...
Hardly a relevant speed difference IMHO, but okay...
> 3.I also wonder if your new version won't break netbsd build
> - if netbsd; then
> - _ld_x11="-L$I -Wl,-R$I"
> - else
> - _ld_x11="-L$I"
Overlooked that, fixed.
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.1013
diff -u -r1.1013 configure
--- configure 1 Jun 2005 09:20:45 -0000 1.1013
+++ configure 1 Jun 2005 20:42:45 -0000
@@ -1861,7 +1865,7 @@
_inc_x11=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
;;
--with-x11libdir=*)
- _ld_x11=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
+ _x11_paths=`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
;;
--with-dxr2incdir=*)
_inc_dxr2=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
@@ -3521,29 +3525,6 @@
fi
-echocheck "X11 libs presence"
-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 /usr/lib ; do
- if test -d "$I" && ( test -f "$I/libX11.so" || test -f "$I/libX11.a" || test -f "$I/libX11.dll.a" ) ; then
- if netbsd; then
- _ld_x11="-L$I -Wl,-R$I"
- else
- _ld_x11="-L$I"
- fi
- echores "yes (using $I)"
- break;
- fi
- done
- if test -z "$_ld_x11" ; then
- _x11=no
- echores "not found (check if the dev(el) packages are installed)"
- fi
-else
- echores "yes (using $_ld_x11)"
-fi
-_ld_x11="$_ld_x11 -lXext -lX11 $_ld_sock"
-
-
echocheck "X11"
if test "$_x11" != no ; then
cat > $TMPC <<EOF
@@ -3551,20 +3532,32 @@
#include <X11/Xutil.h>
int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
EOF
- _x11=no
- cc_check $_inc_x11 $_ld_x11 && _x11=yes
+ if test -z "$_x11_paths" ; then
+ _x11_paths="/usr/X11R6/lib /usr/lib/X11R6 /usr/X11/lib /usr/lib32 /usr/openwin/lib /usr/X11R6/lib64 /usr/lib"
+ fi
+ for I in $_x11_paths ; do
+ _ld_x11="-L$I -lXext -lX11 $_ld_sock"
+ if netbsd; then
+ _ld_x11="$_ld_x11 -Wl,-R$I"
+ fi
+ if test -d "$I" && cc_check $_inc_x11 $_ld_x11 ; then
+ _x11=yes
+ break
+ fi
+ done
fi
if test "$_x11" = yes ; then
_def_x11='#define HAVE_X11 1'
_vosrc="$_vosrc x11_common.c vo_x11.c vo_xover.c"
_vomodules="x11 xover $_vomodules"
+ echores "yes (using $I)"
else
_def_x11='#undef HAVE_X11'
_inc_x11=''
_ld_x11=''
_novomodules="x11 $_novomodules"
+ echores "no (check if the dev(el) packages are installed)"
fi
-echores "$_x11"
echocheck "DPMS"
More information about the MPlayer-dev-eng
mailing list