[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
Sat May 28 22:22:18 CEST 2005
Hi,
is the attached patch to fix
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=206
okay?
IMHO it makes sense anyway to check whether the libs can be linked against,
and not only if they exist...
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.957
diff -u -r1.957 configure
--- configure 22 Jan 2005 18:30:23 -0000 1.957
+++ configure 29 Jan 2005 20:42:01 -0000
@@ -3381,7 +3385,7 @@
fi
-echocheck "X11 libs presence"
+echocheck "working X11 libs"
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
@@ -3390,8 +3394,18 @@
else
_ld_x11="-L$I"
fi
+ _ld_x11="$_ld_x11 -lXext -lX11 $_ld_sock"
+ cat > $TMPC <<EOF
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
+EOF
+ if cc_check $_inc_x11 $_ld_x11 ; then
echores "yes (using $I)"
break;
+ else
+ _ld_x11=""
+ fi
fi
done
if test -z "$_ld_x11" ; then
@@ -3400,19 +3414,14 @@
fi
else
echores "yes (using $_ld_x11)"
+ _ld_x11="$_ld_x11 -lXext -lX11 $_ld_sock"
fi
-_ld_x11="$_ld_x11 -lXext -lX11 $_ld_sock"
echocheck "X11"
-if test "$_x11" != no ; then
- cat > $TMPC <<EOF
-#include <X11/Xlib.h>
-#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 "$_x11" = auto ; then
+ # X11 lib check will set to no when not working
+ _x11=yes
fi
if test "$_x11" = yes ; then
_def_x11='#define HAVE_X11 1'
More information about the MPlayer-dev-eng
mailing list