configure.in
changeset 1895 c121d94672cb
parent 1891 40b43a80adb5
child 1910 c26194009c9c
     1.1 --- a/configure.in	Thu Jul 06 18:01:37 2006 +0000
     1.2 +++ b/configure.in	Mon Jul 10 21:04:37 2006 +0000
     1.3 @@ -15,10 +15,10 @@
     1.4  # set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
     1.5  #
     1.6  SDL_MAJOR_VERSION=1
     1.7 -SDL_MINOR_VERSION=2
     1.8 -SDL_MICRO_VERSION=11
     1.9 +SDL_MINOR_VERSION=3
    1.10 +SDL_MICRO_VERSION=0
    1.11  SDL_INTERFACE_AGE=0
    1.12 -SDL_BINARY_AGE=11
    1.13 +SDL_BINARY_AGE=0
    1.14  SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
    1.15  
    1.16  AC_SUBST(SDL_MAJOR_VERSION)
    1.17 @@ -1533,6 +1533,20 @@
    1.18      fi
    1.19  }
    1.20  
    1.21 +dnl Find glSDL
    1.22 +CheckglSDL()
    1.23 +{
    1.24 +    AC_ARG_ENABLE(video-glsdl,
    1.25 +[  --enable-video-glsdl    use glSDL video driver [default=yes]],
    1.26 +                  , enable_video_glsdl=yes)
    1.27 +    AC_MSG_CHECKING(for glSDL support)
    1.28 +    AC_MSG_RESULT($video_opengl)
    1.29 +    if test x$video_opengl = xyes -a x$enable_video_glsdl = xyes; then
    1.30 +        AC_DEFINE(SDL_VIDEO_DRIVER_GLSDL)
    1.31 +        SOURCES="$SOURCES $srcdir/src/video/glsdl/*.c"
    1.32 +    fi
    1.33 +}
    1.34 +
    1.35  dnl Check for Mesa offscreen rendering
    1.36  CheckAtariOSMesa()
    1.37  {
    1.38 @@ -1847,13 +1861,6 @@
    1.39      if test x$enable_stdio_redirect != xyes; then
    1.40          EXTRA_CFLAGS="$EXTRA_CFLAGS -DNO_STDIO_REDIRECT"
    1.41      fi
    1.42 -
    1.43 -    if test x$enable_video = xyes; then
    1.44 -        AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB)
    1.45 -        SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c"
    1.46 -        SOURCES="$SOURCES $srcdir/src/video/windib/*.c"
    1.47 -        have_video=yes
    1.48 -    fi
    1.49  }
    1.50  
    1.51  dnl Find the DirectX includes and libraries
    1.52 @@ -1863,18 +1870,9 @@
    1.53  AC_HELP_STRING([--enable-directx], [use DirectX for Win32 audio/video [[default=yes]]]),
    1.54                    , enable_directx=yes)
    1.55      if test x$enable_directx = xyes; then
    1.56 -        have_directx=no
    1.57 -        AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
    1.58 +        AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
    1.59          AC_CHECK_HEADER(dsound.h, have_dsound=yes)
    1.60          AC_CHECK_HEADER(dinput.h, use_dinput=yes)
    1.61 -        if test x$have_ddraw = xyes -a x$have_dsound = xyes -a x$use_dinput = xyes; then
    1.62 -            have_directx=yes
    1.63 -        fi
    1.64 -        if test x$enable_video = xyes -a x$have_directx = xyes; then
    1.65 -            AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW)
    1.66 -            SOURCES="$SOURCES $srcdir/src/video/windx5/*.c"
    1.67 -            have_video=yes
    1.68 -        fi
    1.69      fi
    1.70  }
    1.71  
    1.72 @@ -2155,6 +2153,7 @@
    1.73          CheckQtopia
    1.74          CheckPicoGUI
    1.75          CheckOpenGLX11
    1.76 +        CheckglSDL
    1.77          CheckInputEvents
    1.78          CheckTslib
    1.79          CheckUSBHID
    1.80 @@ -2253,6 +2252,7 @@
    1.81          CheckPHOTON
    1.82          CheckX11
    1.83          CheckOpenGLX11
    1.84 +        CheckglSDL
    1.85          CheckPTHREAD
    1.86          # Set up files for the audio library
    1.87          if test x$enable_audio = xyes; then
    1.88 @@ -2290,13 +2290,32 @@
    1.89          CheckDummyAudio
    1.90          CheckWIN32
    1.91          CheckWIN32GL
    1.92 +        CheckglSDL
    1.93          CheckDIRECTX
    1.94          CheckNASM
    1.95 +        # Set up files for the video library
    1.96 +        if test x$enable_video = xyes; then
    1.97 +            AC_DEFINE(SDL_VIDEO_DRIVER_WIN32)
    1.98 +            SOURCES="$SOURCES $srcdir/src/video/win32/*.c"
    1.99 +            have_video=yes
   1.100 +            AC_ARG_ENABLE(render-gdi,
   1.101 +AC_HELP_STRING([--enable-render-gdi], [enable the GDI render driver [[default=yes]]]),
   1.102 +                                , enable_render_gdi=yes)
   1.103 +            if test x$enable_render_gdi = xyes; then
   1.104 +                AC_DEFINE(SDL_VIDEO_RENDER_GDI)
   1.105 +            fi
   1.106 +            AC_ARG_ENABLE(render-d3d,
   1.107 +AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
   1.108 +                                , enable_render_d3d=yes)
   1.109 +            if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
   1.110 +                AC_DEFINE(SDL_VIDEO_RENDER_D3D)
   1.111 +            fi
   1.112 +        fi
   1.113          # Set up files for the audio library
   1.114          if test x$enable_audio = xyes; then
   1.115              AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
   1.116              SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
   1.117 -            if test x$have_directx = xyes; then
   1.118 +            if test x$have_dsound = xyes; then
   1.119                  AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
   1.120                  SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
   1.121              fi
   1.122 @@ -2304,8 +2323,13 @@
   1.123          fi
   1.124          # Set up files for the joystick library
   1.125          if test x$enable_joystick = xyes; then
   1.126 -            AC_DEFINE(SDL_JOYSTICK_WINMM)
   1.127 -            SOURCES="$SOURCES $srcdir/src/joystick/win32/*.c"
   1.128 +            if test x$have_dinput = xyes; then
   1.129 +                AC_DEFINE(SDL_JOYSTICK_DINPUT)
   1.130 +                SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_dxjoystick.c"
   1.131 +            else
   1.132 +                AC_DEFINE(SDL_JOYSTICK_WINMM)
   1.133 +                SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_mmjoystick.c"
   1.134 +            fi
   1.135              have_joystick=yes
   1.136          fi
   1.137          # Set up files for the cdrom library
   1.138 @@ -2336,10 +2360,7 @@
   1.139              have_loadso=yes
   1.140          fi
   1.141          # Set up the system libraries we need
   1.142 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm"
   1.143 -        if test x$have_directx = xyes; then
   1.144 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldxguid"
   1.145 -        fi
   1.146 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm"
   1.147          # The Win32 platform requires special setup
   1.148          SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
   1.149          SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
   1.150 @@ -2354,6 +2375,7 @@
   1.151          CheckNASM
   1.152          CheckBWINDOW
   1.153          CheckBeGL
   1.154 +        CheckglSDL
   1.155          # Set up files for the audio library
   1.156          if test x$enable_audio = xyes; then
   1.157              AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO)
   1.158 @@ -2435,6 +2457,7 @@
   1.159          CheckX11
   1.160          CheckMacGL
   1.161          CheckOpenGLX11
   1.162 +        CheckglSDL
   1.163          CheckPTHREAD
   1.164          CheckAltivec
   1.165  
   1.166 @@ -2496,6 +2519,7 @@
   1.167          CheckAtariAudio
   1.168          CheckAtariLdg
   1.169          CheckAtariOSMesa
   1.170 +        CheckglSDL
   1.171          CheckPTH
   1.172          # Set up files for the audio library
   1.173          if test x$enable_threads = xyes -a x$enable_pth = xyes; then