[MPlayer-cygwin] pthreads support for mingw32

Gianluigi Tiesi mplayer at netfarm.it
Fri Jun 3 07:44:23 CEST 2005


This patch enables pthreads support for mingw32 needed to use x264
multithreading stuff on mingw buils (cygwin includes by itself pthreads)

Btw I'm still compiling with network enabled to see if mplayer will be
forced to have pthreads dll dep, so in this case it would be better
to add a --disable-pthreads configure option.

Bye

-- 
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
-------------- next part --------------
diff -NubBr -xCVS -xhelp_mp.h -x'*.a' -x'*.exe' -x'*.o' -xconfigure.log -xconfig.mak -x.cvsignore -xconfig.h -xcodecs.conf.h -xversion.h -x.depend main/configure sherpya/configure
--- main/configure	2005-06-03 05:32:59.328300800 +0200
+++ sherpya/configure	2005-06-03 07:20:03.736145600 +0200
@@ -2793,10 +2793,10 @@
 void* func(void *arg) { return arg; }
 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
 EOF
-if mingw32 ; then
-  _ld_pthread=''
-elif hpux ; then
+if hpux ; then
   _ld_pthread=''
+elif ( cc_check -lpthreadGC2 && $TMPO ) ; then # mingw pthreads-win32
+  _ld_pthread='-lpthreadGC2'
 elif ( cc_check && $TMPO ) ; then              # QNX
   _ld_pthread=' ' # _ld_pthread='' would disable pthreads, but the test worked
 elif ( cc_check -lpthread && $TMPO ) ; then


More information about the MPlayer-cygwin mailing list