Skip to contentSkip to conversation

Make GUI frontends optional on Mac OS X

PATCH Applied Pavel Borzenkov 4 participants 13 messages Nov 10, 2011 – Jan 17, 2012 Block layer

lore
Share & tools
lore
#0 lore raw

cover Make GUI frontends optional on Mac OS X

After applying this small patch series, you'll be able to build QEMU on Mac OS X without both SDL and Cocoa frontends. First two patches deal with raw-posix, which is the only CONFIG_COCOA user not related to GUI. The third patch adds '--disable-cocoa' switch to configure.

Pavel Borzenkov (3):
raw-posix: Remove dead code
raw-posix: Do not use CONFIG_COCOA macro
configure: add '--disable-cocoa' switch

 block/raw-posix.c |   26 ++++----------------------
 configure         |    9 +++++++--
 2 files changed, 11 insertions(+), 24 deletions(-)
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/3 raw-posix: Remove dead code

It was commented out since the initial import from svn.

---
 block/raw-posix.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)
block/raw-posix.c +0 -18
index a3de373..17e1c6f 100644
@@ -37,7 +37,6 @@
 #include <IOKit/storage/IOMediaBSDClient.h>
 #include <IOKit/storage/IOMedia.h>
 #include <IOKit/storage/IOCDMedia.h>
-//#include <IOKit/storage/IOCDTypes.h>
 #include <CoreFoundation/CoreFoundation.h>
 #endif
 
@@ -279,23 +278,6 @@ static int raw_open(BlockDriverState *bs, const char *filename, int flags)
     return raw_open_common(bs, filename, flags, 0);
 }
 
-/* XXX: use host sector size if necessary with:
-#ifdef DIOCGSECTORSIZE
-        {
-            unsigned int sectorsize = 512;
-            if (!ioctl(fd, DIOCGSECTORSIZE, &sectorsize) &&
-                sectorsize > bufsize)
-                bufsize = sectorsize;
-        }
-#endif
-#ifdef CONFIG_COCOA
-        uint32_t blockSize = 512;
-        if ( !ioctl( fd, DKIOCGETBLOCKSIZE, &blockSize ) && blockSize > bufsize) {
-            bufsize = blockSize;
-        }
-#endif
-*/
-
 /*
  * Check if all memory in this vector is sector aligned.
  */
Signature · 1 line
1.7.5.4
#2 lore raw

Re: [Qemu-devel] [PATCH 1/3] raw-posix: Remove dead code

Am 10.11.2011 19:40, schrieb Pavel Borzenkov:

Quoted 3 lines

It was commented out since the initial import from svn.

This dead code has just been picked up by Paolo for his "Support mismatched host and guest logical block sizes" series (10/17).

Feel invited to test whether it works as expected on your Mac OS X.

Andreas

Quoted 40 lines
---
 block/raw-posix.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)
block/raw-posix.c +0 -18
index a3de373..17e1c6f 100644
@@ -37,7 +37,6 @@
 #include <IOKit/storage/IOMediaBSDClient.h>
 #include <IOKit/storage/IOMedia.h>
 #include <IOKit/storage/IOCDMedia.h>
-//#include <IOKit/storage/IOCDTypes.h>
 #include <CoreFoundation/CoreFoundation.h>
 #endif
 
@@ -279,23 +278,6 @@ static int raw_open(BlockDriverState *bs, const char *filename, int flags)
     return raw_open_common(bs, filename, flags, 0);
 }
 
-/* XXX: use host sector size if necessary with:
-#ifdef DIOCGSECTORSIZE
-        {
-            unsigned int sectorsize = 512;
-            if (!ioctl(fd, DIOCGSECTORSIZE, &sectorsize) &&
-                sectorsize > bufsize)
-                bufsize = sectorsize;
-        }
-#endif
-#ifdef CONFIG_COCOA
-        uint32_t blockSize = 512;
-        if ( !ioctl( fd, DKIOCGETBLOCKSIZE, &blockSize ) && blockSize > bufsize) {
-            bufsize = blockSize;
-        }
-#endif
-*/
-
 /*
  * Check if all memory in this vector is sector aligned.
  */
#3 lore raw

PATCH 2/3 raw-posix: Do not use CONFIG_COCOA macro

In reply to Pavel Borzenkov

Use __APPLE__ and __MACH__ macros instead of CONFIG_COCOA to detect Mac OS X host. The patch is based on the Ben Leslie's patch:
http://patchwork.ozlabs.org/patch/97859/

---
 block/raw-posix.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
block/raw-posix.c +4 -4
index 17e1c6f..ee08f80 100644
@@ -29,7 +29,7 @@
 #include "module.h"
 #include "block/raw-posix-aio.h"
 
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && (__MACH__)
 #include <paths.h>
 #include <sys/param.h>
 #include <IOKit/IOKitLib.h>
@@ -487,7 +487,7 @@ again:
         }
         if (size == 0)
 #endif
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
         size = LONG_LONG_MAX;
 #else
         size = lseek(fd, 0LL, SEEK_END);
@@ -632,7 +632,7 @@ static BlockDriver bdrv_file = {
 /***********************************************/
 /* host device */
 
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
 static kern_return_t FindEjectableCDMedia( io_iterator_t *mediaIterator );
 static kern_return_t GetBSDPath( io_iterator_t mediaIterator, char *bsdPath, CFIndex maxPathSize );
 
@@ -710,7 +710,7 @@ static int hdev_open(BlockDriverState *bs, const char *filename, int flags)
 {
     BDRVRawState *s = bs->opaque;
 
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
     if (strstart(filename, "/dev/cdrom", NULL)) {
         kern_return_t kernResult;
         io_iterator_t mediaIterator;
Signature · 1 line
1.7.5.4
Reviewed-by on v1 2/3
#4 lore raw

Re: [Qemu-devel] [PATCH 2/3] raw-posix: Do not use CONFIG_COCOA macro

Am 10.11.2011 19:40, schrieb Pavel Borzenkov:

Quoted 5 lines

Use __APPLE__ and __MACH__ macros instead of CONFIG_COCOA to detect Mac OS X host. The patch is based on the Ben Leslie's patch:
http://patchwork.ozlabs.org/patch/97859/

Still in my queue for testing on a Mac though.

Andreas

Quoted 44 lines
---
 block/raw-posix.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
block/raw-posix.c +4 -4
index 17e1c6f..ee08f80 100644
@@ -29,7 +29,7 @@
 #include "module.h"
 #include "block/raw-posix-aio.h"
 
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && (__MACH__)
 #include <paths.h>
 #include <sys/param.h>
 #include <IOKit/IOKitLib.h>
@@ -487,7 +487,7 @@ again:
         }
         if (size == 0)
 #endif
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
         size = LONG_LONG_MAX;
 #else
         size = lseek(fd, 0LL, SEEK_END);
@@ -632,7 +632,7 @@ static BlockDriver bdrv_file = {
 /***********************************************/
 /* host device */
 
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
 static kern_return_t FindEjectableCDMedia( io_iterator_t *mediaIterator );
 static kern_return_t GetBSDPath( io_iterator_t mediaIterator, char *bsdPath, CFIndex maxPathSize );
 
@@ -710,7 +710,7 @@ static int hdev_open(BlockDriverState *bs, const char *filename, int flags)
 {
     BDRVRawState *s = bs->opaque;
 
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
     if (strstart(filename, "/dev/cdrom", NULL)) {
         kern_return_t kernResult;
         io_iterator_t mediaIterator;
#5 lore raw

Re: [Qemu-devel] [PATCH 2/3] raw-posix: Do not use CONFIG_COCOA macro

Am 30.11.2011 01:38, schrieb Andreas Färber:

Quoted 8 lines

Am 10.11.2011 19:40, schrieb Pavel Borzenkov:

Quoted 5 lines

Use __APPLE__ and __MACH__ macros instead of CONFIG_COCOA to detect Mac OS X host. The patch is based on the Ben Leslie's patch:
http://patchwork.ozlabs.org/patch/97859/

Thanks, applied to the cocoa branch with a minor edit (s/the//).

http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/cocoa-for-upstream

Andreas

Quoted 44 lines
Quoted 44 lines
---
 block/raw-posix.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
block/raw-posix.c +4 -4
index 17e1c6f..ee08f80 100644
@@ -29,7 +29,7 @@
 #include "module.h"
 #include "block/raw-posix-aio.h"
 
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && (__MACH__)
 #include <paths.h>
 #include <sys/param.h>
 #include <IOKit/IOKitLib.h>
@@ -487,7 +487,7 @@ again:
         }
         if (size == 0)
 #endif
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
         size = LONG_LONG_MAX;
 #else
         size = lseek(fd, 0LL, SEEK_END);
@@ -632,7 +632,7 @@ static BlockDriver bdrv_file = {
 /***********************************************/
 /* host device */
 
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
 static kern_return_t FindEjectableCDMedia( io_iterator_t *mediaIterator );
 static kern_return_t GetBSDPath( io_iterator_t mediaIterator, char *bsdPath, CFIndex maxPathSize );
 
@@ -710,7 +710,7 @@ static int hdev_open(BlockDriverState *bs, const char *filename, int flags)
 {
     BDRVRawState *s = bs->opaque;
 
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
     if (strstart(filename, "/dev/cdrom", NULL)) {
         kern_return_t kernResult;
         io_iterator_t mediaIterator;
#6 lore raw

PATCH 3/3 configure: add '--disable-cocoa' switch

In reply to 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.

---
 configure |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
configure +6 -1
index 401d9a6..4720bb2 100755
@@ -670,6 +670,8 @@ for opt do
   ;;
   --enable-profiler) profiler="yes"
   ;;
+  --disable-cocoa) cocoa="no"
+  ;;
   --enable-cocoa)
       cocoa="yes" ;
       sdl="no" ;
@@ -980,7 +982,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 (default)"
+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]"
Signature · 1 line
1.7.5.4
Tested-by on v1 3/3
#7 lore raw

Re: [Qemu-devel] [PATCH 3/3] configure: add '--disable-cocoa' switch

Am 10.11.2011 19:40, schrieb Pavel Borzenkov:

Quoted 14 lines

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.

---
 configure |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
configure +0 -0
index 401d9a6..4720bb2 100755

configure for opt do · line 677

Quoted 8 lines
configure +2 -0
@@ -670,6 +670,8 @@ for opt do
   ;;
   --enable-profiler) profiler="yes"
   ;;
+  --disable-cocoa) cocoa="no"
+  ;;
   --enable-cocoa)
       cocoa="yes" ;
       sdl="no" ;

configure echo " --disable-sdl disable SDL" · line 991

Quoted 12 lines
configure +4 -1
@@ -980,7 +982,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 (default)"
+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]"

I see no prior art of any conditional help output in configure. Anthony? Andrzej?

Andreas

#8 lore raw

Re: [Qemu-devel] [PATCH 3/3] configure: add '--disable-cocoa' switch

Am 08.12.2011 01:41, schrieb Andreas Färber:

Quoted 26 lines

Am 10.11.2011 19:40, schrieb Pavel Borzenkov:

Quoted 14 lines

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.

---
 configure |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
configure +0 -0
index 401d9a6..4720bb2 100755

configure for opt do · line 677

Quoted 8 lines
configure +2 -0
@@ -670,6 +670,8 @@ for opt do
   ;;
   --enable-profiler) profiler="yes"
   ;;
+  --disable-cocoa) cocoa="no"
+  ;;
   --enable-cocoa)
       cocoa="yes" ;
       sdl="no" ;
Quoted 15 lines

configure echo " --disable-sdl disable SDL" · line 991

Quoted 12 lines
configure +4 -1
@@ -980,7 +982,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 (default)"
+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]"

I see no prior art of any conditional help output in configure. Anthony? Andrzej?

Ping? Should we keep command line options a flat list with comments on applicability or start introducing tests like above?

Me, I'd prefer not doing this since the switch cases above don't check.

Andreas

#9 lore raw

Re: [Qemu-devel] [PATCH 3/3] configure: add '--disable-cocoa' switch

Quoted 43 lines · Andreas Färber

Am 08.12.2011 01:41, schrieb Andreas Färber:

Quoted 26 lines

Am 10.11.2011 19:40, schrieb Pavel Borzenkov:

Quoted 15 lines

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.

---
 configure |    7 ++++++-

 1 files changed, 6 insertions(+), 1 deletions(-)
configure +0 -0
index 401d9a6..4720bb2 100755
@@ -670,6 +670,8 @@ for opt do
    ;;
Quoted 7 lines

   --enable-profiler) profiler="yes"
   ;;
+  --disable-cocoa) cocoa="no"
+  ;;
   --enable-cocoa)
       cocoa="yes" ;
       sdl="no" ;

Quoted 15 lines
Quoted 9 lines
configure +0 -0
@@ -980,7 +982,10 @@ echo "  --disable-sdl            disable SDL"

 echo "  --enable-sdl             enable SDL"
 echo "  --disable-vnc            disable VNC"
 echo "  --enable-vnc             enable VNC"

configure +4 -1
-echo "  --enable-cocoa           enable COCOA (Mac OS X only)"
+if test "$darwin" = "yes" ; then
+    echo "  --disable-cocoa          disable COCOA"
+    echo "  --enable-cocoa           enable COCOA (default)"
+fi
Quoted 3 lines

 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]"

I see no prior art of any conditional help output in configure. Anthony? Andrzej?

Quoted 4 lines

Ping? Should we keep command line options a flat list with comments on applicability or start introducing tests like above?

Me, I'd prefer not doing this since the switch cases above don't check.

Perhaps --diable-cocoa should be allowed on any platform. You're right we don't have such checks now, but then it's hard to see downsides of doing them, so I'm quite ambivalent.

I still don't see the purpose of the following test in configure though:
if test "$cocoa" = "no" ; then
sdl=yes
fi
With it in place and no --disable-cocoa there's no way to compile SDL.
--enable-cocoa is also broken as fas as I can tell.

Cheers

#10 lore raw

Re: [Qemu-devel] [PATCH 3/3] configure: add '--disable-cocoa' switch

Am 17.01.2012 00:46, schrieb Andrzej Zaborowski:

Quoted 49 lines · Andreas Färber
Quoted 43 lines

Am 08.12.2011 01:41, schrieb Andreas Färber:

Quoted 26 lines

Am 10.11.2011 19:40, schrieb Pavel Borzenkov:

Quoted 14 lines

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.

---
 configure |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
configure +0 -0
index 401d9a6..4720bb2 100755

configure for opt do · line 677

Quoted 8 lines
configure +2 -0
@@ -670,6 +670,8 @@ for opt do
   ;;
   --enable-profiler) profiler="yes"
   ;;
+  --disable-cocoa) cocoa="no"
+  ;;
   --enable-cocoa)
       cocoa="yes" ;
       sdl="no" ;
Quoted 15 lines

configure echo " --disable-sdl disable SDL" · line 991

Quoted 12 lines
configure +4 -1
@@ -980,7 +982,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 (default)"
+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]"

I see no prior art of any conditional help output in configure. Anthony? Andrzej?

Quoted 4 lines

Ping? Should we keep command line options a flat list with comments on applicability or start introducing tests like above?

Me, I'd prefer not doing this since the switch cases above don't check.

Quoted 8 lines

Perhaps --diable-cocoa should be allowed on any platform. You're right we don't have such checks now, but then it's hard to see downsides of doing them, so I'm quite ambivalent.

I still don't see the purpose of the following test in configure though:
if test "$cocoa" = "no" ; then
sdl=yes
fi

The reason is that SDL and Cocoa must not both be detected due to the way it is handled in vl.c. Given that Cocoa is enabled by default, SDL must not be detected in that case. If Cocoa is disabled, then detecting SDL is fine of course.

The alternative would be to check for SDL and, if present, disable Cocoa. Still collides with Pavel's patch though - we need to sort out how to merge them.

Quoted 3 lines

With it in place and no --disable-cocoa there's no way to compile SDL.

--enable-cocoa is also broken as fas as I can tell.

I've been using it for historic reasons without noticeable problems.

Andreas

#11 lore raw

Re: [Qemu-devel] [PATCH 3/3] configure: add '--disable-cocoa' switch

Quoted 68 lines · Andreas Färber

Am 17.01.2012 00:46, schrieb Andrzej Zaborowski:

Quoted 49 lines · Andreas Färber
Quoted 43 lines

Am 08.12.2011 01:41, schrieb Andreas Färber:

Quoted 26 lines

Am 10.11.2011 19:40, schrieb Pavel Borzenkov:

Quoted 15 lines

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.

---
 configure |    7 ++++++-

 1 files changed, 6 insertions(+), 1 deletions(-)
configure +0 -0
index 401d9a6..4720bb2 100755
@@ -670,6 +670,8 @@ for opt do
    ;;
Quoted 7 lines

   --enable-profiler) profiler="yes"
   ;;
+  --disable-cocoa) cocoa="no"
+  ;;
   --enable-cocoa)
       cocoa="yes" ;
       sdl="no" ;

Quoted 15 lines
Quoted 9 lines
configure +0 -0
@@ -980,7 +982,10 @@ echo "  --disable-sdl            disable SDL"

 echo "  --enable-sdl             enable SDL"
 echo "  --disable-vnc            disable VNC"
 echo "  --enable-vnc             enable VNC"

configure +4 -1
-echo "  --enable-cocoa           enable COCOA (Mac OS X only)"
+if test "$darwin" = "yes" ; then
+    echo "  --disable-cocoa          disable COCOA"
+    echo "  --enable-cocoa           enable COCOA (default)"
+fi
Quoted 3 lines

 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]"

I see no prior art of any conditional help output in configure. Anthony? Andrzej?

Quoted 4 lines

Ping? Should we keep command line options a flat list with comments on applicability or start introducing tests like above?

Me, I'd prefer not doing this since the switch cases above don't check.

Quoted 8 lines

Perhaps --diable-cocoa should be allowed on any platform.  You're right we don't have such checks now, but then it's hard to see downsides of doing them, so I'm quite ambivalent.

I still don't see the purpose of the following test in configure though:
      if test "$cocoa" = "no" ; then
        sdl=yes
      fi

The reason is that SDL and Cocoa must not both be detected due to the way it is handled in vl.c. Given that Cocoa is enabled by default, SDL must not be detected in that case. If Cocoa is disabled, then detecting SDL is fine of course.

The alternative would be to check for SDL and, if present, disable Cocoa. Still collides with Pavel's patch though - we need to sort out how to merge them.

Quoted 5 lines
Quoted 3 lines

With it in place and no --disable-cocoa there's no way to compile SDL.

 --enable-cocoa is also broken as fas as I can tell.

I've been using it for historic reasons without noticeable problems.

The problem I see is that the handler touches the sdl variable, which is also touched by --enable/disable-sdl. So the order of the options on the command line starts to matter. I think the options should be treated orthogonally, and then after parsing the command line the script should bail out if two incompatible options are enabled.

Cheers

#12 lore raw

Re: [Qemu-devel] [PATCH 3/3] configure: add '--disable-cocoa' switch

In reply to Andrzej Zaborowski
Quoted 9 lines · Andrzej Zaborowski
Quoted 4 lines · Andreas Färber

Ping? Should we keep command line options a flat list with comments on applicability or start introducing tests like above?

Me, I'd prefer not doing this since the switch cases above don't check.

Perhaps --diable-cocoa should be allowed on any platform.  You're right we don't have such checks now, but then it's hard to see downsides of doing them, so I'm quite ambivalent.

I'm vaguely negative about it because heading down that path increases the number of tests and checks we end up performing before we do the relatively straightforward thing of printing out a help message. (We already do a pile of compiler/cpu tests early, which among other things means 'configure --help' trashes config.log.)

"allow everything as an option and complain if it's not valid on this machine" is at least easy to keep consistent.

-- PMM