Index: /trunk/configure
===================================================================
--- /trunk/configure	(revision 22751)
+++ /trunk/configure	(revision 22752)
@@ -1238,4 +1238,20 @@
 }
 
+#
+# Check for OpenGL
+#
+check_opengl()
+{
+  # On darwin this is a on/off decision only
+  if [ "$OS" = "darwin" ]; then
+    test_header "OpenGL support"
+    echo "enabled"
+    cnf_append "VBOX_WITH_CROGL"     "1"
+  else
+    check_xmu
+    check_mesa
+  fi
+}
+
 
 #
@@ -1275,5 +1291,4 @@
   fi
 }
-
 
 #
@@ -1716,4 +1731,12 @@
 {
   test_header "python support"
+
+  # On darwin this is a on/off decision only
+  if [ "$OS" = "darwin" ]; then
+    echo "enabled"
+    cnf_append "VBOX_WITH_PYTHON"     "1"
+    return
+  fi
+
   cat > $ODIR.tmp_src.cc << EOF
 #include <cstdio>
@@ -1878,4 +1901,5 @@
     10\.*)
       darwin_ver="10.6"
+      [ "$TARGET_MACHINE" = "amd64" ] && cnf_append "VBOX_WITH_COCOA_QT" "1"
       ;;
     9\.*)
@@ -1942,5 +1966,7 @@
   --build-libxslt          build libxslt from sources
   --build-libcurl          build libcurl from sources (PUEL only)
-  --setup-wine             setup a Wine directory and register the hhc hack
+EOF
+[ "$OS"   != "darwin" ] && echo "  --setup-wine             setup a Wine directory and register the hhc hack"
+cat << EOF
 
 Paths:
@@ -1989,5 +2015,4 @@
   WITH_DBUS=0
   WITH_KMODS=0
-  WITH_OPENGL=0
   BUILD_LIBXSLT=1
   BUILD_LIBXML2=1
@@ -2131,5 +2156,5 @@
       ;;
     --setup-wine)
-      SETUP_WINE=1
+      [ "$OS" != "darwin" ] && SETUP_WINE=1
       ;;
     *)
@@ -2220,9 +2245,6 @@
 fi
 
-if [ $WITH_OPENGL -eq 0 ]; then
-  cnf_append "VBOX_WITH_CROGL" ""
-fi
-
 # emit disable directives corresponding to any --disable-xxx options.
+[ $WITH_OPENGL -eq 0 ]    && cnf_append "VBOX_WITH_CROGL" ""
 [ $WITH_XPCOM -eq 0 ]     && cnf_append "VBOX_WITH_MAIN" ""
 [ $WITH_QT4 -eq 0   ]     && cnf_append "VBOX_WITH_QTGUI" ""
@@ -2258,6 +2280,5 @@
 # TODO check for libxdamange-dev (X11/extensions/Xdamage.h, additions only)
 [ $WITH_X11    -eq 1 ] && check_xcursor
-[ $WITH_OPENGL -eq 1 ] && check_xmu
-[ $WITH_OPENGL -eq 1 ] && check_mesa
+[ $WITH_OPENGL -eq 1 ] && check_opengl
 [ $WITH_QT4    -eq 1 ] && check_qt4
 [ $WITH_PYTHON -eq 1 ] && check_python
@@ -2306,5 +2327,4 @@
 if [ "$OS" = "darwin" ]; then
   check_darwinversion
-#  check_i386elfgcc
 fi
 
