On Tue, Nov 01, 2011 at 08:31:16PM +0000, Måns Rullgård wrote:
> Martin Storsjö <[email protected]> writes:
> 
> > On Tue, 1 Nov 2011, Janne Grunau wrote:
> >
> >> ---
> >> configure |    2 +-
> >> 1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/configure b/configure
> >> index c23660e..d7a1b5b 100755
> >> --- a/configure
> >> +++ b/configure
> >> @@ -2436,7 +2436,7 @@ case $target_os in
> >>             disable network
> >>         else
> >>             target_os=mingw32
> >> -            enable_weak w32threads
> >> +            enabled pthreads || enable_weak w32threads
> >>         fi
> >>         LIBTARGET=i386
> >>         if enabled x86_64; then
> >> -- 
> >> 1.7.7.1
> >
> > Looks sane to me, but I'd like Måns opinion on whether this is a good
> > way of doing it.
> 
> The answer depends on what "it" is, but I suspect I'd prefer somehow
> doing it outside the per-OS section.

"It" is enabling w32threads only automatically on mingw if --enable-pthreads
is not passed to configure. 'configure --enable-pthreads ...' fails otherwise
with "ERROR: Only one thread type must be selected."

patch to do it outside of target_os section attached.

Janne
>From d0eba933d1fa4d1ddcbfc53774aa01e8559b1079 Mon Sep 17 00:00:00 2001
From: Janne Grunau <[email protected]>
Date: Tue, 1 Nov 2011 20:41:43 +0100
Subject: [PATCH] configure: enable w32threads only automatically if pthreads
 is not enabled

---
 configure |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index fa23619..9312423 100755
--- a/configure
+++ b/configure
@@ -2443,7 +2443,6 @@ case $target_os in
             disable network
         else
             target_os=mingw32
-            enable_weak w32threads
         fi
         LIBTARGET=i386
         if enabled x86_64; then
@@ -2867,6 +2866,10 @@ if ! disabled pthreads && ! enabled w32threads; then
     fi
 fi
 
+if ! enabled pthreads; then
+    test $target_os = "mingw32" &&  enable_weak w32threads
+fi
+
 for thread in $THREADS_LIST; do
     if enabled $thread; then
         test -n "$thread_type" &&
-- 
1.7.7.2

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

Reply via email to