configure.in
changeset 3083 0bc41e0361d3
parent 3082 1c85c44557de
child 3085 4800979de337
     1.1 --- a/configure.in	Fri Feb 27 09:51:55 2009 +0000
     1.2 +++ b/configure.in	Tue Mar 03 04:21:51 2009 +0000
     1.3 @@ -1256,6 +1256,35 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Check for QNX photon video driver
     1.8 +CheckQNXGF()
     1.9 +{
    1.10 +    AC_ARG_ENABLE(video-qnxgf,
    1.11 +                  AC_HELP_STRING([--enable-video-qnxgf], [use QNX GF video driver [[default=yes]]]),
    1.12 +                  , enable_video_qnxgf=yes)
    1.13 +    if test x$enable_video = xyes -a x$enable_video_qnxgf = xyes; then
    1.14 +        AC_MSG_CHECKING(for QNX GF support)
    1.15 +        video_qnxgf=no
    1.16 +        AC_TRY_COMPILE([
    1.17 +          #include <gf/gf.h>
    1.18 +          #include <gf/gf3d.h>
    1.19 +        ],[
    1.20 +         gf_3d_config_info_t* gfinfo;
    1.21 +        ],[
    1.22 +        video_qnxgf=yes
    1.23 +        ])
    1.24 +        AC_MSG_RESULT($video_qnxgf)
    1.25 +        if test x$video_qnxgf = xyes; then
    1.26 +            AC_DEFINE(SDL_VIDEO_DRIVER_QNXGF)
    1.27 +            SOURCES="$SOURCES $srcdir/src/video/qnxgf/*.c"
    1.28 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lgf"
    1.29 +            have_video=yes
    1.30 +
    1.31 +            CheckOpenGLESQNX
    1.32 +        fi
    1.33 +    fi
    1.34 +}
    1.35 +
    1.36  dnl Set up the BWindow video driver if enabled
    1.37  CheckBWINDOW()
    1.38  {
    1.39 @@ -1639,11 +1668,11 @@
    1.40      fi
    1.41  }
    1.42  
    1.43 -dnl Find QNX RtP OpenGL
    1.44 +dnl Find QNX 6.x Software OpenGL
    1.45  CheckOpenGLQNX()
    1.46  {
    1.47      if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
    1.48 -        AC_MSG_CHECKING(for OpenGL (Photon) support)
    1.49 +        AC_MSG_CHECKING(for QNX 6.x Photon OpenGL support)
    1.50          video_opengl=no
    1.51          AC_TRY_COMPILE([
    1.52           #include <GL/gl.h>
    1.53 @@ -1660,6 +1689,43 @@
    1.54      fi
    1.55  }
    1.56  
    1.57 +dnl Find QNX 6.3 and above OpenGL ES implementation
    1.58 +CheckOpenGLESQNX()
    1.59 +{
    1.60 +    if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
    1.61 +        AC_MSG_CHECKING(for QNX OpenGL ES (CM) support)
    1.62 +        video_opengl=no
    1.63 +        AC_TRY_COMPILE([
    1.64 +         #include <GLES/egl.h>
    1.65 +        ],[
    1.66 +        ],[
    1.67 +        video_opengl=yes
    1.68 +        ])
    1.69 +        AC_MSG_RESULT($video_opengl)
    1.70 +        if test x$video_opengl = xyes; then
    1.71 +            AC_DEFINE(SDL_VIDEO_OPENGL_ES)
    1.72 +            AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES)
    1.73 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGLES_CM"
    1.74 +        else
    1.75 +            AC_MSG_CHECKING(for QNX OpenGL ES (CL) support)
    1.76 +            video_opengl=no
    1.77 +            AC_TRY_COMPILE([
    1.78 +             #include <GLES/egl.h>
    1.79 +            ],[
    1.80 +            ],[
    1.81 +            video_opengl=yes
    1.82 +            ])
    1.83 +            AC_MSG_RESULT($video_opengl)
    1.84 +            if test x$video_opengl = xyes; then
    1.85 +                AC_DEFINE(SDL_VIDEO_OPENGL_ES)
    1.86 +                AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES)
    1.87 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGLES_CL"
    1.88 +            fi
    1.89 +        fi
    1.90 +    fi
    1.91 +}
    1.92 +
    1.93 +
    1.94  dnl Check for Win32 OpenGL
    1.95  CheckWIN32GL()
    1.96  {
    1.97 @@ -2406,16 +2472,27 @@
    1.98          fi
    1.99          ;;
   1.100      *-*-qnx*)
   1.101 +
   1.102 +        EXTRA_CFLAGS="-I/usr/include $CFLAGS"
   1.103 +        EXTRA_LDLAGS="-L/usr/lib $LDFLAGS"
   1.104 +
   1.105          ARCH=qnx
   1.106 +        CheckVisibilityHidden
   1.107          CheckDummyVideo
   1.108          CheckDiskAudio
   1.109          CheckDummyAudio
   1.110          CheckDLOPEN
   1.111 +        CheckPulseAudio
   1.112 +        CheckESD
   1.113          CheckNAS
   1.114          CheckPHOTON
   1.115 +        CheckQNXGF
   1.116          CheckX11
   1.117          CheckOpenGLX11
   1.118          CheckPTHREAD
   1.119 +        CheckClockGettime
   1.120 +
   1.121 +
   1.122          # Set up files for the audio library
   1.123          if test x$enable_audio = xyes; then
   1.124              AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO)
   1.125 @@ -2435,6 +2512,18 @@
   1.126              SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
   1.127              have_timers=yes
   1.128          fi
   1.129 +        # Set up dummy files for the joystick for now
   1.130 +        if test x$enable_joystick = xyes; then
   1.131 +            AC_DEFINE(SDL_JOYSTICK_DUMMY)
   1.132 +            SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
   1.133 +            have_joystick=yes
   1.134 +        fi
   1.135 +        # Set up dummy files for the haptic for now
   1.136 +        if test x$enable_haptic = xyes; then
   1.137 +            AC_DEFINE(SDL_HAPTIC_DUMMY)
   1.138 +            SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c"
   1.139 +            have_haptic=yes
   1.140 +        fi
   1.141          ;;
   1.142      *-*-cygwin* | *-*-mingw32*)
   1.143          ARCH=win32
   1.144 @@ -2865,7 +2954,7 @@
   1.145  AC_SUBST(WINDRES)
   1.146  
   1.147  AC_OUTPUT([
   1.148 -    Makefile sdl-config SDL.spec SDL.qpg sdl.pc
   1.149 +    Makefile sdl-config SDL.spec sdl.pc
   1.150  ], [
   1.151      : >build-deps
   1.152      if test x"$MAKE" = x; then MAKE=make; fi; $MAKE depend