comparison configure @ 3506:3d906972dafd

--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.
author jkeil
date Sat, 15 Dec 2001 18:35:06 +0000
parents e972025d1c46
children edf1bb99628d
comparison
equal deleted inserted replaced
3505:f35c03c967a3 3506:3d906972dafd
1159 1159
1160 1160
1161 echocheck "pthread" 1161 echocheck "pthread"
1162 cat > $TMPC << EOF 1162 cat > $TMPC << EOF
1163 #include <pthread.h> 1163 #include <pthread.h>
1164 int main(void) { (void) pthread_create (0, 0, 0, 0); return 0; } 1164 void* func(void *arg) { return arg; }
1165 EOF 1165 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
1166 if cc_check ; then # QNX 1166 EOF
1167 if ( cc_check && $TMPO ) ; then # QNX
1167 _ld_pthread='' 1168 _ld_pthread=''
1168 elif cc_check -lpthread ; then 1169 elif ( cc_check -lpthread && $TMPO ) ; then
1169 _ld_pthread='-lpthread' 1170 _ld_pthread='-lpthread'
1170 elif cc_check -pthread ; then 1171 elif ( cc_check -pthread && $TMPO ) ; then
1171 _ld_pthread='-pthread' 1172 _ld_pthread='-pthread'
1172 else 1173 else
1173 die "Lib pthread not found. (needed by windows and networking stuff)" 1174 die "Lib pthread not found. (needed by windows and networking stuff)"
1174 fi 1175 fi
1175 echores "yes (using $_ld_pthread)" 1176 echores "yes (using $_ld_pthread)"
1332 fi 1333 fi
1333 echores "$_vsscanf" 1334 echores "$_vsscanf"
1334 1335
1335 1336
1336 echocheck "X11 headers" 1337 echocheck "X11 headers"
1337 if test -z "$_x11incdir" ; then 1338 if test -z "$_inc_x11" ; then
1338 for I in /usr/include /usr/X11R6/include /usr/X11/include /usr/openwin/include ; do 1339 for I in /usr/include /usr/X11R6/include /usr/X11/include /usr/openwin/include ; do
1339 if test -d "$I/X11" ; then 1340 if test -d "$I/X11" ; then
1340 _x11incdir="$I" 1341 _inc_x11="-I$I"
1341 echores "yes (found: $I)" 1342 echores "yes (found: $I)"
1342 break 1343 break
1343 fi 1344 fi
1344 done 1345 done
1345 fi 1346 if test -z "$_inc_x11" ; then
1346 if test -z "$_x11incdir" ; then 1347 _x11=no
1347 _x11=no 1348 echores "not found"
1348 echores "not found" 1349 fi
1349 elif test "$_x11incdir" != "/usr/include" ; then 1350 else
1350 _inc_x11="-I$_x11incdir" 1351 echores "yes (use: $_inc_x11)"
1352 fi
1353 if test "$_inc_x11" = "-I/usr/include" ; then
1354 _inc_x11=""
1351 fi 1355 fi
1352 1356
1353 1357
1354 echocheck "X11 libs" 1358 echocheck "X11 libs"
1355 if test -z "$_x11libdir" ; then 1359 if test -z "$_ld_x11" ; then
1356 for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib ; do 1360 for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib ; do
1357 if test -d "$I" ; then 1361 if test -d "$I" ; then
1358 _x11libdir="$I" 1362 _ld_x11="-L$I"
1359 echores "yes (found: $I)" 1363 echores "yes (found: $I)"
1360 break; 1364 break;
1361 fi 1365 fi
1362 done 1366 done
1363 fi 1367 if test -z "$_ld_x11" ; then
1364 if test -z "$_x11libdir" ; then 1368 _x11=no
1365 _x11=no 1369 echores "not found"
1366 echores "not found" 1370 fi
1367 fi 1371 else
1368 _ld_x11="-L$_x11libdir -lX11 -lXext $_ld_sock" 1372 echores "yes (use: $_ld_x11)"
1373 fi
1374 _ld_x11="$_ld_x11 -lX11 -lXext $_ld_sock"
1369 1375
1370 1376
1371 ######### 1377 #########
1372 # VIDEO # 1378 # VIDEO #
1373 ######### 1379 #########
1799 cat > $TMPC << EOF 1805 cat > $TMPC << EOF
1800 #include <audio/audiolib.h> 1806 #include <audio/audiolib.h>
1801 int main(void) { return 0; } 1807 int main(void) { return 0; }
1802 EOF 1808 EOF
1803 _nas=no 1809 _nas=no
1804 cc_check -laudio -lX11 -lXt -lm -I$_x11incdir -L$_x11libdir && _nas=yes 1810 cc_check -laudio $_inc_x11 $_ld_x11 -lXt -lm && _nas=yes
1805 fi 1811 fi
1806 if test "$_nas" = yes ; then 1812 if test "$_nas" = yes ; then
1807 _def_nas='#define HAVE_NAS 1' 1813 _def_nas='#define HAVE_NAS 1'
1808 _ld_nas="-laudio -lX11 -lXt -L$_x11libdir" 1814 _ld_nas="-laudio $_ld_x11 -lXt"
1809 _aosrc="$_aosrc ao_nas.c" 1815 _aosrc="$_aosrc ao_nas.c"
1810 _aomodules="nas $_aomodules" 1816 _aomodules="nas $_aomodules"
1811 else 1817 else
1812 _def_nas='#undef HAVE_NAS' 1818 _def_nas='#undef HAVE_NAS'
1813 fi 1819 fi