Enable w32threads automatically unless explicitly disabled

Message ID 1320143624-85441-1-git-send-email-martin@martin.st
State Committed
Headers show

Commit Message

Martin Storsjö Nov. 1, 2011, 10:33 a.m.
From: Martin Storsjo <martin@martin.st>

---
This makes it behave like pthreads, which is enabled
automatically, too.

It is only enabled for desktop windows, not for mingw32ce, where
the pthreads wrapper doesn't compile cleanly at the moment.

 configure |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Janne Grunau Nov. 1, 2011, 11:10 a.m. | #1
On Tue, Nov 01, 2011 at 12:33:44PM +0200, Martin Storsjö wrote:
> From: Martin Storsjo <martin@martin.st>
> 
> ---
> This makes it behave like pthreads, which is enabled
> automatically, too.
> 
> It is only enabled for desktop windows, not for mingw32ce, where
> the pthreads wrapper doesn't compile cleanly at the moment.
> 
>  configure |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/configure b/configure
> index 80adbdc..8bcaf58 100755
> --- a/configure
> +++ b/configure
> @@ -92,7 +92,7 @@ Configuration options:
>    --disable-postproc       disable libpostproc build
>    --disable-avfilter       disable video filter support [no]
>    --disable-pthreads       disable pthreads [auto]
> -  --enable-w32threads      use Win32 threads [no]
> +  --disable-w32threads     disable Win32 threads [auto]
>    --enable-x11grab         enable X11 grabbing [no]
>    --disable-network        disable network support [no]
>    --enable-gray            enable full grayscale support (slower color)
> @@ -2436,6 +2436,7 @@ case $target_os in
>              disable network
>          else
>              target_os=mingw32
> +            disabled w32threads || enable w32threads
>          fi
>          LIBTARGET=i386
>          if enabled x86_64; then

looks ok,

Is there something we could/should check in configure for mingw32ce?

Janne
Martin Storsjö Nov. 1, 2011, 11:53 a.m. | #2
On Tue, 1 Nov 2011, Janne Grunau wrote:

> On Tue, Nov 01, 2011 at 12:33:44PM +0200, Martin Storsjö wrote:
>> From: Martin Storsjo <martin@martin.st>
>>
>> ---
>> This makes it behave like pthreads, which is enabled
>> automatically, too.
>>
>> It is only enabled for desktop windows, not for mingw32ce, where
>> the pthreads wrapper doesn't compile cleanly at the moment.
>>
>>  configure |    3 ++-
>>  1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 80adbdc..8bcaf58 100755
>> --- a/configure
>> +++ b/configure
>> @@ -92,7 +92,7 @@ Configuration options:
>>    --disable-postproc       disable libpostproc build
>>    --disable-avfilter       disable video filter support [no]
>>    --disable-pthreads       disable pthreads [auto]
>> -  --enable-w32threads      use Win32 threads [no]
>> +  --disable-w32threads     disable Win32 threads [auto]
>>    --enable-x11grab         enable X11 grabbing [no]
>>    --disable-network        disable network support [no]
>>    --enable-gray            enable full grayscale support (slower color)
>> @@ -2436,6 +2436,7 @@ case $target_os in
>>              disable network
>>          else
>>              target_os=mingw32
>> +            disabled w32threads || enable w32threads
>>          fi
>>          LIBTARGET=i386
>>          if enabled x86_64; then
>
> looks ok,
>
> Is there something we could/should check in configure for mingw32ce?

Do you mean if we could make it work on that config, or how to detect that 
case?

In configure, we know if it's mingw32ce since $target_os is set to it 
(it's the branch above in the patch, that does "disable network"), and in 
code we know about it with #ifdef __MINGW32CE__.

For what fails - this is what has to be changed for it to compile: 
http://albin.abo.fi/~mstorsjo/0001-w32threads-Allow-building-on-mingw32ce-too.patch
Whether it actuall is correct or works in practice, I don't really know, 
I've just compile tested it...

// Martin
Mans Rullgard Nov. 1, 2011, 2:20 p.m. | #3
Martin Storsjö <martin@martin.st> writes:

> +            disabled w32threads || enable w32threads

enable_weak w32threads

Patch

diff --git a/configure b/configure
index 80adbdc..8bcaf58 100755
--- a/configure
+++ b/configure
@@ -92,7 +92,7 @@  Configuration options:
   --disable-postproc       disable libpostproc build
   --disable-avfilter       disable video filter support [no]
   --disable-pthreads       disable pthreads [auto]
-  --enable-w32threads      use Win32 threads [no]
+  --disable-w32threads     disable Win32 threads [auto]
   --enable-x11grab         enable X11 grabbing [no]
   --disable-network        disable network support [no]
   --enable-gray            enable full grayscale support (slower color)
@@ -2436,6 +2436,7 @@  case $target_os in
             disable network
         else
             target_os=mingw32
+            disabled w32threads || enable w32threads
         fi
         LIBTARGET=i386
         if enabled x86_64; then