On Tue, Nov 08, 2011 at 02:28:27PM +0000, Måns Rullgård wrote:
> Janne Grunau <[email protected]> writes:
>
> > @@ -2867,6 +2866,10 @@ if ! disabled pthreads && ! enabled w32threads; then
> >      fi
> >  fi
> >
> > +if ! enabled pthreads; then
> > +    test $target_os = "mingw32" &&  enable_weak w32threads
> > +fi
>
> That is just introducing another OS "section" which is not at all what I
> had in mind.  I'd like to do it in an OS-independent way if at all
> possible as it would then work automatically for anything else
> supporting windows threads (if such a thing exists).

point taken, patch updated

> I'm also not sure either of these patches provide the most intuitive
> semantics.  To disable threads entirely on a win32 system, both
> --disable-pthreads and --disable-w32threds must be used.

only if we detect pthreads support but I don't really see an elegant 
way around it other than adding a --disable-threading option.

Martin, please verify that the test fails for mingw32ce

Janne
---
 configure |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 6e4259f..cd8662d 100755
--- a/configure
+++ b/configure
@@ -2447,7 +2447,6 @@ case $target_os in
             disable network
         else
             target_os=mingw32
-            enable_weak w32threads
         fi
         LIBTARGET=i386
         if enabled x86_64; then
@@ -2852,6 +2851,12 @@ check_struct dxva2api.h DXVA_PictureParameters 
wDecodedPictureIndex
 disabled  zlib || check_lib   zlib.h      zlibVersion -lz   || disable  zlib
 disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
 
+if ! disabled w32threads && ! enabled pthreads ; then
+    if check_func _beginthreadex; then
+        enable w32threads
+    fi
+fi
+
 # check for some common methods of building with pthread support
 # do this before the optional library checks as some of them require pthreads
 if ! disabled pthreads && ! enabled w32threads; then
-- 
1.7.8.rc1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to