Index: /trunk/src/VBox/Main/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/HostImpl.cpp	(revision 20159)
+++ /trunk/src/VBox/Main/HostImpl.cpp	(revision 20160)
@@ -112,8 +112,12 @@
 
 #ifdef VBOX_WITH_CROGL
-extern "C" {
- extern void * crSPULoad(void *, int, char *, char *, void *);
- extern void crSPUUnloadChain(void *);
-}
+# ifndef RT_OS_DARWIN
+   extern "C" {
+    extern void * crSPULoad(void *, int, char *, char *, void *);
+    extern void crSPUUnloadChain(void *);
+   }
+# else
+   extern bool is3DAccelerationSupported();
+# endif
 #endif /* VBOX_WITH_CROGL */
 
@@ -260,4 +264,7 @@
 
 #ifdef VBOX_WITH_CROGL
+#ifdef RT_OS_DARWIN
+    f3DAccelerationSupported = is3DAccelerationSupported();
+#else
     void *spu;
     spu = crSPULoad(NULL, 0, "render", NULL, NULL);
@@ -267,4 +274,5 @@
         f3DAccelerationSupported = true;
     }
+#endif
 #endif /* VBOX_WITH_CROGL */
 
Index: /trunk/src/VBox/Main/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Main/Makefile.kmk	(revision 20159)
+++ /trunk/src/VBox/Main/Makefile.kmk	(revision 20160)
@@ -275,7 +275,9 @@
 endif
 ifdef VBOX_WITH_CROGL
- VBoxSVC_LIBS += \
- 	$(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
- 	$(VBOX_LIB_OGL_HOSTCRUTIL)
+ ifneq ($(KBUILD_TARGET),darwin)
+  VBoxSVC_LIBS += \
+	$(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
+	$(VBOX_LIB_OGL_HOSTCRUTIL)
+ endif
 endif
 
@@ -330,4 +332,8 @@
 	darwin/HostPowerDarwin.cpp
 
+ifdef VBOX_WITH_CROGL
+ VBoxSVC_SOURCES.darwin += darwin/OpenGLTestDarwin.cpp
+endif
+
 VBoxSVC_SOURCES.win = \
 	win/svcmain.cpp \
@@ -378,4 +384,9 @@
 endif
 VBoxSVC_LDFLAGS.darwin    = -framework IOKit -framework SystemConfiguration
+
+ifdef VBOX_WITH_CROGL
+ VBoxSVC_LDFLAGS.darwin += -framework OpenGL
+endif
+
 ifeq ($(KBUILD_TYPE),debug)
  VBoxSVC_LDFLAGS.linux   += -rdynamic # for backtrace_symbols()
Index: /trunk/src/VBox/Main/darwin/OpenGLTestDarwin.cpp
===================================================================
--- /trunk/src/VBox/Main/darwin/OpenGLTestDarwin.cpp	(revision 20160)
+++ /trunk/src/VBox/Main/darwin/OpenGLTestDarwin.cpp	(revision 20160)
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/** @file
+ * VBox host opengl support test
+ */
+
+/*
+ * Copyright (C) 2009 Sun Microsystems, Inc.
+ *
+ * Sun Microsystems, Inc. confidential
+ * All rights reserved
+ */
+
+
+#include <OpenGL/OpenGL.h>
+#include <ApplicationServices/ApplicationServices.h>
+
+bool is3DAccelerationSupported()
+{
+    CGDirectDisplayID   display = CGMainDisplayID ();
+    CGOpenGLDisplayMask cglDisplayMask = CGDisplayIDToOpenGLDisplayMask (display);
+    CGLPixelFormatObj   pixelFormat = NULL;
+    long numPixelFormats = 0;
+
+    CGLPixelFormatAttribute attribs[] = {
+        kCGLPFADisplayMask,
+        (CGLPixelFormatAttribute)cglDisplayMask,
+        kCGLPFAAccelerated,
+        kCGLPFADoubleBuffer,
+        kCGLPFAWindow,
+        (CGLPixelFormatAttribute)NULL
+    };
+
+    display = CGMainDisplayID();
+    cglDisplayMask = CGDisplayIDToOpenGLDisplayMask(display);
+    CGLChoosePixelFormat(attribs, &pixelFormat, &numPixelFormats);
+
+    if (pixelFormat)
+    {
+        CGLContextObj cglContext = 0;
+        CGLCreateContext(pixelFormat, NULL, &cglContext);
+        CGLDestroyPixelFormat(pixelFormat);
+        if (cglContext)
+        {
+            CGLDestroyContext(cglContext);
+            return true;
+        }
+    }
+
+    return false;
+}
+
