configure.in
branchgsoc2009_ps3
changeset 3141 3df74541339b
parent 3113 df2bb5735822
child 3144 0d8d1f870964
--- a/configure.in	Sat May 23 22:49:46 2009 +0000
+++ b/configure.in	Fri May 29 09:50:21 2009 +0000
@@ -1501,6 +1501,33 @@
     fi
 }
 
+dnl See if we're running on PlayStation 3 Cell hardware
+CheckPS3()
+{
+  AC_ARG_ENABLE(video-ps3,
+                AC_HELP_STRING([--enable-video-ps3], [use PlayStation 3 Cell driver [[default=yes]]]),
+                , enable_video_ps3=yes)
+  if test x$enable_video = xyes -a x$enable_video_ps3 = xyes; then 
+    AC_MSG_CHECKING(for PlayStation 3 Cell support)
+    video_ps3=no
+    AC_TRY_COMPILE([
+      #include <linux/fb.h>
+      #include <asm/ps3fb.h>
+    ],[  
+    ],[  
+      video_ps3=yes
+    ])   
+    AC_MSG_RESULT($video_ps3)
+    if test x$video_ps3 = xyes; then 
+      AC_DEFINE(SDL_VIDEO_DRIVER_PS3)
+      SOURCES="$SOURCES $srcdir/src/video/ps3/*.c"
+      EXTRA_CFLAGS="$EXTRA_CFLAGS -I/opt/cell/sdk/usr/include"
+      EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L/opt/cell/sdk/usr/lib -lspe2 -lfb_writer_spu"
+      have_video=yes
+    fi   
+  fi
+}
+
 dnl Find the SVGAlib includes and libraries
 CheckSVGA()
 {
@@ -2380,6 +2407,7 @@
         CheckDirectFB
         CheckFusionSound
         CheckPS2GS
+        CheckPS3
         CheckSVGA
         CheckVGL
         CheckWscons