configure.in
changeset 3083 0bc41e0361d3
parent 3082 1c85c44557de
child 3085 4800979de337
--- a/configure.in	Fri Feb 27 09:51:55 2009 +0000
+++ b/configure.in	Tue Mar 03 04:21:51 2009 +0000
@@ -1256,6 +1256,35 @@
     fi
 }
 
+dnl Check for QNX photon video driver
+CheckQNXGF()
+{
+    AC_ARG_ENABLE(video-qnxgf,
+                  AC_HELP_STRING([--enable-video-qnxgf], [use QNX GF video driver [[default=yes]]]),
+                  , enable_video_qnxgf=yes)
+    if test x$enable_video = xyes -a x$enable_video_qnxgf = xyes; then
+        AC_MSG_CHECKING(for QNX GF support)
+        video_qnxgf=no
+        AC_TRY_COMPILE([
+          #include <gf/gf.h>
+          #include <gf/gf3d.h>
+        ],[
+         gf_3d_config_info_t* gfinfo;
+        ],[
+        video_qnxgf=yes
+        ])
+        AC_MSG_RESULT($video_qnxgf)
+        if test x$video_qnxgf = xyes; then
+            AC_DEFINE(SDL_VIDEO_DRIVER_QNXGF)
+            SOURCES="$SOURCES $srcdir/src/video/qnxgf/*.c"
+            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lgf"
+            have_video=yes
+
+            CheckOpenGLESQNX
+        fi
+    fi
+}
+
 dnl Set up the BWindow video driver if enabled
 CheckBWINDOW()
 {
@@ -1639,11 +1668,11 @@
     fi
 }
 
-dnl Find QNX RtP OpenGL
+dnl Find QNX 6.x Software OpenGL
 CheckOpenGLQNX()
 {
     if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
-        AC_MSG_CHECKING(for OpenGL (Photon) support)
+        AC_MSG_CHECKING(for QNX 6.x Photon OpenGL support)
         video_opengl=no
         AC_TRY_COMPILE([
          #include <GL/gl.h>
@@ -1660,6 +1689,43 @@
     fi
 }
 
+dnl Find QNX 6.3 and above OpenGL ES implementation
+CheckOpenGLESQNX()
+{
+    if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+        AC_MSG_CHECKING(for QNX OpenGL ES (CM) support)
+        video_opengl=no
+        AC_TRY_COMPILE([
+         #include <GLES/egl.h>
+        ],[
+        ],[
+        video_opengl=yes
+        ])
+        AC_MSG_RESULT($video_opengl)
+        if test x$video_opengl = xyes; then
+            AC_DEFINE(SDL_VIDEO_OPENGL_ES)
+            AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES)
+            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGLES_CM"
+        else
+            AC_MSG_CHECKING(for QNX OpenGL ES (CL) support)
+            video_opengl=no
+            AC_TRY_COMPILE([
+             #include <GLES/egl.h>
+            ],[
+            ],[
+            video_opengl=yes
+            ])
+            AC_MSG_RESULT($video_opengl)
+            if test x$video_opengl = xyes; then
+                AC_DEFINE(SDL_VIDEO_OPENGL_ES)
+                AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES)
+                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGLES_CL"
+            fi
+        fi
+    fi
+}
+
+
 dnl Check for Win32 OpenGL
 CheckWIN32GL()
 {
@@ -2406,16 +2472,27 @@
         fi
         ;;
     *-*-qnx*)
+
+        EXTRA_CFLAGS="-I/usr/include $CFLAGS"
+        EXTRA_LDLAGS="-L/usr/lib $LDFLAGS"
+
         ARCH=qnx
+        CheckVisibilityHidden
         CheckDummyVideo
         CheckDiskAudio
         CheckDummyAudio
         CheckDLOPEN
+        CheckPulseAudio
+        CheckESD
         CheckNAS
         CheckPHOTON
+        CheckQNXGF
         CheckX11
         CheckOpenGLX11
         CheckPTHREAD
+        CheckClockGettime
+
+
         # Set up files for the audio library
         if test x$enable_audio = xyes; then
             AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO)
@@ -2435,6 +2512,18 @@
             SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
             have_timers=yes
         fi
+        # Set up dummy files for the joystick for now
+        if test x$enable_joystick = xyes; then
+            AC_DEFINE(SDL_JOYSTICK_DUMMY)
+            SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
+            have_joystick=yes
+        fi
+        # Set up dummy files for the haptic for now
+        if test x$enable_haptic = xyes; then
+            AC_DEFINE(SDL_HAPTIC_DUMMY)
+            SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c"
+            have_haptic=yes
+        fi
         ;;
     *-*-cygwin* | *-*-mingw32*)
         ARCH=win32
@@ -2865,7 +2954,7 @@
 AC_SUBST(WINDRES)
 
 AC_OUTPUT([
-    Makefile sdl-config SDL.spec SDL.qpg sdl.pc
+    Makefile sdl-config SDL.spec sdl.pc
 ], [
     : >build-deps
     if test x"$MAKE" = x; then MAKE=make; fi; $MAKE depend