[Mplayer-cvslog] CVS: main configure,1.326,1.327

Jürgen Keil jkeil at mplayer.dev.hu
Sat Dec 15 19:35:09 CET 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv20493

Modified Files:
	configure 
Log Message:
--with-x11{inc,lib}dir configure option broken, can't select a specific X11
include/lib directory for mplayer compilation

solaris has pthread stub routines in libc, try to verify that the _ld_pthread
option used really produces a working threaded binary.


Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.326
retrieving revision 1.327
diff -u -r1.326 -r1.327
--- configure	10 Dec 2001 22:40:14 -0000	1.326
+++ configure	15 Dec 2001 18:35:06 -0000	1.327
@@ -1161,13 +1161,14 @@
 echocheck "pthread"
 cat > $TMPC << EOF
 #include <pthread.h>
-int main(void) { (void) pthread_create (0, 0, 0, 0); return 0; }
+void* func(void *arg) { return arg; }
+int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
 EOF
-if cc_check ; then              # QNX
+if ( cc_check && $TMPO ) ; then              # QNX
   _ld_pthread=''
-elif cc_check -lpthread ; then
+elif ( cc_check -lpthread && $TMPO ) ; then
   _ld_pthread='-lpthread'
-elif cc_check -pthread ; then
+elif ( cc_check -pthread && $TMPO ) ; then
   _ld_pthread='-pthread'
 else
   die "Lib pthread not found. (needed by windows and networking stuff)"
@@ -1334,38 +1335,43 @@
 
 
 echocheck "X11 headers"
-if test -z "$_x11incdir" ; then
+if test -z "$_inc_x11" ; then
   for I in /usr/include /usr/X11R6/include /usr/X11/include /usr/openwin/include ; do
     if test -d "$I/X11" ; then
-      _x11incdir="$I"
+      _inc_x11="-I$I"
       echores "yes (found: $I)"
       break
     fi
   done
+  if test -z "$_inc_x11" ; then
+    _x11=no
+    echores "not found"
+  fi
+else
+  echores "yes (use: $_inc_x11)"
 fi
-if test -z "$_x11incdir" ; then
-  _x11=no
-  echores "not found"
-elif test "$_x11incdir" != "/usr/include" ; then
-  _inc_x11="-I$_x11incdir"
+if test "$_inc_x11" = "-I/usr/include" ; then
+  _inc_x11=""
 fi
 
 
 echocheck "X11 libs"
-if test -z "$_x11libdir" ; then
+if test -z "$_ld_x11" ; then
   for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib ; do
     if test -d "$I" ; then
-      _x11libdir="$I"
+      _ld_x11="-L$I"
       echores "yes (found: $I)"
       break;
     fi
   done
+  if test -z "$_ld_x11" ; then
+    _x11=no
+    echores "not found"
+  fi
+else
+  echores "yes (use: $_ld_x11)"
 fi
-if test -z "$_x11libdir" ; then
-  _x11=no
-  echores "not found"
-fi
-_ld_x11="-L$_x11libdir -lX11 -lXext $_ld_sock"
+_ld_x11="$_ld_x11 -lX11 -lXext $_ld_sock"
 
 
 #########
@@ -1801,11 +1807,11 @@
 int main(void) { return 0; }
 EOF
   _nas=no
-  cc_check -laudio -lX11 -lXt -lm -I$_x11incdir -L$_x11libdir && _nas=yes
+  cc_check -laudio $_inc_x11 $_ld_x11 -lXt -lm && _nas=yes
 fi
 if test "$_nas" = yes ; then
   _def_nas='#define HAVE_NAS 1'
-  _ld_nas="-laudio -lX11 -lXt -L$_x11libdir"
+  _ld_nas="-laudio  $_ld_x11 -lXt"
   _aosrc="$_aosrc ao_nas.c"
   _aomodules="nas $_aomodules"
 else




More information about the MPlayer-cvslog mailing list