qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch
@ 2011-11-09 18:54 Pavel Borzenkov
  2011-11-10 10:41 ` Andreas Färber
  2011-11-11 18:49 ` Anthony Liguori
  0 siblings, 2 replies; 7+ messages in thread
From: Pavel Borzenkov @ 2011-11-09 18:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: andreas.faerber

When SDL support is disabled, there is no way to build QEMU without
Cocoa support on MacOS X. This patch adds '--disable-cocoa' switch and
allows to build QEMU without both SDL and Cocoa frontends.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
---
 configure |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 9e5da44..ba3a830 100755
--- a/configure
+++ b/configure
@@ -669,6 +669,8 @@ for opt do
   ;;
   --enable-profiler) profiler="yes"
   ;;
+  --disable-cocoa) cocoa="no"
+  ;;
   --enable-cocoa)
       cocoa="yes" ;
       sdl="no" ;
@@ -979,7 +981,10 @@ echo "  --disable-sdl            disable SDL"
 echo "  --enable-sdl             enable SDL"
 echo "  --disable-vnc            disable VNC"
 echo "  --enable-vnc             enable VNC"
-echo "  --enable-cocoa           enable COCOA (Mac OS X only)"
+if test "$darwin" = "yes" ; then
+    echo "  --disable-cocoa          disable COCOA"
+    echo "  --enable-cocoa           enable COCOA"
+fi
 echo "  --audio-drv-list=LIST    set audio drivers list:"
 echo "                           Available drivers: $audio_possible_drivers"
 echo "  --audio-card-list=LIST   set list of emulated audio cards [$audio_card_list]"
@@ -1424,10 +1429,6 @@ EOF
   if compile_prog "$sdl_cflags" "$sdl_libs" ; then
     if test "$_sdlversion" -lt 121 ; then
       sdl_too_old=yes
-    else
-      if test "$cocoa" = "no" ; then
-        sdl=yes
-      fi
     fi
 
     # static link with sdl ? (note: sdl.pc's --static --libs is broken)
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch
  2011-11-09 18:54 [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch Pavel Borzenkov
@ 2011-11-10 10:41 ` Andreas Färber
  2011-11-10 10:44   ` Peter Maydell
  2011-11-10 12:02   ` Pavel Borzenkov
  2011-11-11 18:49 ` Anthony Liguori
  1 sibling, 2 replies; 7+ messages in thread
From: Andreas Färber @ 2011-11-10 10:41 UTC (permalink / raw)
  To: Pavel Borzenkov; +Cc: qemu-devel

Am 09.11.2011 19:54, schrieb Pavel Borzenkov:
> When SDL support is disabled, there is no way to build QEMU without
> Cocoa support on MacOS X. This patch adds '--disable-cocoa' switch and
> allows to build QEMU without both SDL and Cocoa frontends.
> 
> Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>

This is a new feature and therefore too late for 1.0. Only bugfixes now.

I remember there was a similar patch once but some issue with it kept us
from applying it - something unrelated to the frontend was influenced by
it I think... block layer?

> ---
>  configure |   11 ++++++-----
>  1 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/configure b/configure
> index 9e5da44..ba3a830 100755
> --- a/configure
> +++ b/configure

> @@ -1424,10 +1429,6 @@ EOF
>    if compile_prog "$sdl_cflags" "$sdl_libs" ; then
>      if test "$_sdlversion" -lt 121 ; then
>        sdl_too_old=yes
> -    else
> -      if test "$cocoa" = "no" ; then
> -        sdl=yes
> -      fi

Without looking at the context, this hunk looks weird. You sure you're
not breaking the SDL default for other platforms?

>      fi
>  
>      # static link with sdl ? (note: sdl.pc's --static --libs is broken)


Anyway, I would much more appreciate a bugfix or suggestion how to make
Cocoa build than to disable it altogether (and then only based on a
configure option).

Andreas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch
  2011-11-10 10:41 ` Andreas Färber
@ 2011-11-10 10:44   ` Peter Maydell
  2011-11-10 11:54     ` Pavel Borzenkov
  2011-11-10 12:02   ` Pavel Borzenkov
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2011-11-10 10:44 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-devel, Pavel Borzenkov

On 10 November 2011 10:41, Andreas Färber <andreas.faerber@web.de> wrote:
> I remember there was a similar patch once but some issue with it kept us
> from applying it - something unrelated to the frontend was influenced by
> it I think... block layer?

Yeah, block/raw-posix.c has a pile of #ifdef CONFIG_COCOA in it,
which it looks like it's using to mean "am I on MacOSX?"

-- PMM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch
  2011-11-10 10:44   ` Peter Maydell
@ 2011-11-10 11:54     ` Pavel Borzenkov
  2011-11-10 12:23       ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Pavel Borzenkov @ 2011-11-10 11:54 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Andreas Färber, qemu-devel

On Thu, Nov 10, 2011 at 2:44 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 10 November 2011 10:41, Andreas Färber <andreas.faerber@web.de> wrote:
>> I remember there was a similar patch once but some issue with it kept us
>> from applying it - something unrelated to the frontend was influenced by
>> it I think... block layer?
>
> Yeah, block/raw-posix.c has a pile of #ifdef CONFIG_COCOA in it,
> which it looks like it's using to mean "am I on MacOSX?"

Yes, I see it now. I'll modify the file to use some pre-defined Mac OS X macro,
so CONFIG_COCOA will control only Cocoa frontend build.

-- 
Pavel

>
> -- PMM
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch
  2011-11-10 10:41 ` Andreas Färber
  2011-11-10 10:44   ` Peter Maydell
@ 2011-11-10 12:02   ` Pavel Borzenkov
  1 sibling, 0 replies; 7+ messages in thread
From: Pavel Borzenkov @ 2011-11-10 12:02 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-devel

On Thu, Nov 10, 2011 at 2:41 PM, Andreas Färber <andreas.faerber@web.de> wrote:
> Am 09.11.2011 19:54, schrieb Pavel Borzenkov:
>> When SDL support is disabled, there is no way to build QEMU without
>> Cocoa support on MacOS X. This patch adds '--disable-cocoa' switch and
>> allows to build QEMU without both SDL and Cocoa frontends.
>>
>> Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
>
> This is a new feature and therefore too late for 1.0. Only bugfixes now.
>
> I remember there was a similar patch once but some issue with it kept us
> from applying it - something unrelated to the frontend was influenced by
> it I think... block layer?
>
>> ---
>>  configure |   11 ++++++-----
>>  1 files changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 9e5da44..ba3a830 100755
>> --- a/configure
>> +++ b/configure
>
>> @@ -1424,10 +1429,6 @@ EOF
>>    if compile_prog "$sdl_cflags" "$sdl_libs" ; then
>>      if test "$_sdlversion" -lt 121 ; then
>>        sdl_too_old=yes
>> -    else
>> -      if test "$cocoa" = "no" ; then
>> -        sdl=yes
>> -      fi
>
> Without looking at the context, this hunk looks weird. You sure you're
> not breaking the SDL default for other platforms?

Yeah, I did break it, at least for Linux. I'll fix this in the next version.

-- 
Pavel

>
>>      fi
>>
>>      # static link with sdl ? (note: sdl.pc's --static --libs is broken)
>
>
> Anyway, I would much more appreciate a bugfix or suggestion how to make
> Cocoa build than to disable it altogether (and then only based on a
> configure option).
>
> Andreas
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch
  2011-11-10 11:54     ` Pavel Borzenkov
@ 2011-11-10 12:23       ` Peter Maydell
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2011-11-10 12:23 UTC (permalink / raw)
  To: Pavel Borzenkov; +Cc: Andreas Färber, qemu-devel

On 10 November 2011 11:54, Pavel Borzenkov <pavel.borzenkov@gmail.com> wrote:
> On Thu, Nov 10, 2011 at 2:44 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 10 November 2011 10:41, Andreas Färber <andreas.faerber@web.de> wrote:
>>> I remember there was a similar patch once but some issue with it kept us
>>> from applying it - something unrelated to the frontend was influenced by
>>> it I think... block layer?
>>
>> Yeah, block/raw-posix.c has a pile of #ifdef CONFIG_COCOA in it,
>> which it looks like it's using to mean "am I on MacOSX?"
>
> Yes, I see it now. I'll modify the file to use some pre-defined Mac OS X macro,
> so CONFIG_COCOA will control only Cocoa frontend build.

>From last time this came up, to save you reinventing the wheel:

http://lists.gnu.org/archive/html/qemu-devel/2011-05/msg03158.html

-- PMM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch
  2011-11-09 18:54 [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch Pavel Borzenkov
  2011-11-10 10:41 ` Andreas Färber
@ 2011-11-11 18:49 ` Anthony Liguori
  1 sibling, 0 replies; 7+ messages in thread
From: Anthony Liguori @ 2011-11-11 18:49 UTC (permalink / raw)
  To: Pavel Borzenkov; +Cc: andreas.faerber, qemu-devel

On 11/09/2011 12:54 PM, Pavel Borzenkov wrote:
> When SDL support is disabled, there is no way to build QEMU without
> Cocoa support on MacOS X. This patch adds '--disable-cocoa' switch and
> allows to build QEMU without both SDL and Cocoa frontends.
>
> Signed-off-by: Pavel Borzenkov<pavel.borzenkov@gmail.com>

This breaks SDL probing on Linux.

> ---
>   configure |   11 ++++++-----
>   1 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/configure b/configure
> index 9e5da44..ba3a830 100755
> --- a/configure
> +++ b/configure
> @@ -669,6 +669,8 @@ for opt do
>     ;;
>     --enable-profiler) profiler="yes"
>     ;;
> +  --disable-cocoa) cocoa="no"
> +  ;;
>     --enable-cocoa)
>         cocoa="yes" ;
>         sdl="no" ;
> @@ -979,7 +981,10 @@ echo "  --disable-sdl            disable SDL"
>   echo "  --enable-sdl             enable SDL"
>   echo "  --disable-vnc            disable VNC"
>   echo "  --enable-vnc             enable VNC"
> -echo "  --enable-cocoa           enable COCOA (Mac OS X only)"
> +if test "$darwin" = "yes" ; then
> +    echo "  --disable-cocoa          disable COCOA"
> +    echo "  --enable-cocoa           enable COCOA"
> +fi
>   echo "  --audio-drv-list=LIST    set audio drivers list:"
>   echo "                           Available drivers: $audio_possible_drivers"
>   echo "  --audio-card-list=LIST   set list of emulated audio cards [$audio_card_list]"
> @@ -1424,10 +1429,6 @@ EOF
>     if compile_prog "$sdl_cflags" "$sdl_libs" ; then
>       if test "$_sdlversion" -lt 121 ; then
>         sdl_too_old=yes
> -    else
> -      if test "$cocoa" = "no" ; then
> -        sdl=yes
> -      fi

This is what normally enables SDL.

Regards,

Anthony Liguori
>       fi
>
>       # static link with sdl ? (note: sdl.pc's --static --libs is broken)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-11-11 18:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-09 18:54 [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch Pavel Borzenkov
2011-11-10 10:41 ` Andreas Färber
2011-11-10 10:44   ` Peter Maydell
2011-11-10 11:54     ` Pavel Borzenkov
2011-11-10 12:23       ` Peter Maydell
2011-11-10 12:02   ` Pavel Borzenkov
2011-11-11 18:49 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).