summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-15 18:35:06 +0000
committerjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-15 18:35:06 +0000
commit7a7eaccc0b45debfa99ecc9226b3c1bc9f438bec (patch)
tree117e516ebb50bd6034125bea2248c31bf9b04de8 /configure
parentd8462d3d1b932f425f152bb2462438537aa5cfd3 (diff)
downloadmpv-7a7eaccc0b45debfa99ecc9226b3c1bc9f438bec.tar.bz2
mpv-7a7eaccc0b45debfa99ecc9226b3c1bc9f438bec.tar.xz
--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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3507 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure46
1 files changed, 26 insertions, 20 deletions
diff --git a/configure b/configure
index b41730eb07..2b51caf716 100755
--- a/configure
+++ b/configure
@@ -1161,13 +1161,14 @@ echores "$_dl"
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 @@ echores "$_vsscanf"
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 @@ if test "$_nas" = auto || test "$_nas" = yes ; then
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