]> git.sesse.net Git - vlc/commitdiff
Build the opengl module on OS X (gl provider not done yet)
authorEric Petit <titer@videolan.org>
Thu, 5 Aug 2004 14:48:58 +0000 (14:48 +0000)
committerEric Petit <titer@videolan.org>
Thu, 5 Aug 2004 14:48:58 +0000 (14:48 +0000)
configure.ac
modules/video_output/opengl.c

index b9008fa2855113cdc1faeb2a1a3f721dec327927..a06d04454ce6bf9e3bec5c26cfc73dc9c3e760d3 100644 (file)
@@ -2564,20 +2564,26 @@ if test "${enable_xvideo}" != "no" &&
 fi
 
 dnl
-dnl  GLX module
-dnl  (enabled by default except on win32)
+dnl  OpenGL module
+dnl  (enabled by default except on beos)
 dnl
 AC_ARG_ENABLE(opengl,
   [  --enable-opengl            OpenGL support (default enabled)])
 if test "${enable_opengl}" != "no" && test "${SYS}" != "beos"; then
-  AC_CHECK_HEADERS(GL/gl.h, [
+  if test "${SYS}" != "darwin"; then
+    AC_CHECK_HEADERS(GL/gl.h, [
+      VLC_ADD_PLUGINS([opengl])
+      if test "${SYS}" != "mingw32"; then
+        VLC_ADD_LDFLAGS([opengl],[-L${x_libraries} -lGL -lGLU])
+      else
+        VLC_ADD_LDFLAGS([opengl],[-lopengl32])
+      fi
+    ])
+  else
+    dnl OS X special case (no GL/gl.h but OpenGL/gl.h)
     VLC_ADD_PLUGINS([opengl])
-    if test "${SYS}" != "mingw32"; then
-      VLC_ADD_LDFLAGS([opengl],[-L${x_libraries} -lGL -lGLU])
-    else
-      VLC_ADD_LDFLAGS([opengl],[-lopengl32])
-    fi
-  ])
+    VLC_ADD_LDFLAGS([opengl],[-framework OpenGL])
+  fi
 fi
 
 dnl
index e8d60d4f37549def093a14731f3eb5fba1bcc431..08510273c2907cfd946fd9898b7de4eb37cebbab 100644 (file)
 #include <vlc/vlc.h>
 #include <vlc/vout.h>
 
+#ifndef SYS_DARWIN
 #include <GL/gl.h>
+#else
+/* Mac OS X < 10.3 does not have GL/gl.h */
+#include <OpenGL/gl.h>
+#endif
 
 /* RV16 */
 #ifndef GL_UNSIGNED_SHORT_5_6_5