diff configure.in @ 1895:c121d94672cb

SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Jul 2006 21:04:37 +0000
parents 40b43a80adb5
children c26194009c9c
line wrap: on
line diff
--- a/configure.in	Thu Jul 06 18:01:37 2006 +0000
+++ b/configure.in	Mon Jul 10 21:04:37 2006 +0000
@@ -15,10 +15,10 @@
 # set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
 #
 SDL_MAJOR_VERSION=1
-SDL_MINOR_VERSION=2
-SDL_MICRO_VERSION=11
+SDL_MINOR_VERSION=3
+SDL_MICRO_VERSION=0
 SDL_INTERFACE_AGE=0
-SDL_BINARY_AGE=11
+SDL_BINARY_AGE=0
 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
 
 AC_SUBST(SDL_MAJOR_VERSION)
@@ -1533,6 +1533,20 @@
     fi
 }
 
+dnl Find glSDL
+CheckglSDL()
+{
+    AC_ARG_ENABLE(video-glsdl,
+[  --enable-video-glsdl    use glSDL video driver [default=yes]],
+                  , enable_video_glsdl=yes)
+    AC_MSG_CHECKING(for glSDL support)
+    AC_MSG_RESULT($video_opengl)
+    if test x$video_opengl = xyes -a x$enable_video_glsdl = xyes; then
+        AC_DEFINE(SDL_VIDEO_DRIVER_GLSDL)
+        SOURCES="$SOURCES $srcdir/src/video/glsdl/*.c"
+    fi
+}
+
 dnl Check for Mesa offscreen rendering
 CheckAtariOSMesa()
 {
@@ -1847,13 +1861,6 @@
     if test x$enable_stdio_redirect != xyes; then
         EXTRA_CFLAGS="$EXTRA_CFLAGS -DNO_STDIO_REDIRECT"
     fi
-
-    if test x$enable_video = xyes; then
-        AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB)
-        SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c"
-        SOURCES="$SOURCES $srcdir/src/video/windib/*.c"
-        have_video=yes
-    fi
 }
 
 dnl Find the DirectX includes and libraries
@@ -1863,18 +1870,9 @@
 AC_HELP_STRING([--enable-directx], [use DirectX for Win32 audio/video [[default=yes]]]),
                   , enable_directx=yes)
     if test x$enable_directx = xyes; then
-        have_directx=no
-        AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
+        AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
         AC_CHECK_HEADER(dsound.h, have_dsound=yes)
         AC_CHECK_HEADER(dinput.h, use_dinput=yes)
-        if test x$have_ddraw = xyes -a x$have_dsound = xyes -a x$use_dinput = xyes; then
-            have_directx=yes
-        fi
-        if test x$enable_video = xyes -a x$have_directx = xyes; then
-            AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW)
-            SOURCES="$SOURCES $srcdir/src/video/windx5/*.c"
-            have_video=yes
-        fi
     fi
 }
 
@@ -2155,6 +2153,7 @@
         CheckQtopia
         CheckPicoGUI
         CheckOpenGLX11
+        CheckglSDL
         CheckInputEvents
         CheckTslib
         CheckUSBHID
@@ -2253,6 +2252,7 @@
         CheckPHOTON
         CheckX11
         CheckOpenGLX11
+        CheckglSDL
         CheckPTHREAD
         # Set up files for the audio library
         if test x$enable_audio = xyes; then
@@ -2290,13 +2290,32 @@
         CheckDummyAudio
         CheckWIN32
         CheckWIN32GL
+        CheckglSDL
         CheckDIRECTX
         CheckNASM
+        # Set up files for the video library
+        if test x$enable_video = xyes; then
+            AC_DEFINE(SDL_VIDEO_DRIVER_WIN32)
+            SOURCES="$SOURCES $srcdir/src/video/win32/*.c"
+            have_video=yes
+            AC_ARG_ENABLE(render-gdi,
+AC_HELP_STRING([--enable-render-gdi], [enable the GDI render driver [[default=yes]]]),
+                                , enable_render_gdi=yes)
+            if test x$enable_render_gdi = xyes; then
+                AC_DEFINE(SDL_VIDEO_RENDER_GDI)
+            fi
+            AC_ARG_ENABLE(render-d3d,
+AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
+                                , enable_render_d3d=yes)
+            if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
+                AC_DEFINE(SDL_VIDEO_RENDER_D3D)
+            fi
+        fi
         # Set up files for the audio library
         if test x$enable_audio = xyes; then
             AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
             SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
-            if test x$have_directx = xyes; then
+            if test x$have_dsound = xyes; then
                 AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
                 SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
             fi
@@ -2304,8 +2323,13 @@
         fi
         # Set up files for the joystick library
         if test x$enable_joystick = xyes; then
-            AC_DEFINE(SDL_JOYSTICK_WINMM)
-            SOURCES="$SOURCES $srcdir/src/joystick/win32/*.c"
+            if test x$have_dinput = xyes; then
+                AC_DEFINE(SDL_JOYSTICK_DINPUT)
+                SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_dxjoystick.c"
+            else
+                AC_DEFINE(SDL_JOYSTICK_WINMM)
+                SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_mmjoystick.c"
+            fi
             have_joystick=yes
         fi
         # Set up files for the cdrom library
@@ -2336,10 +2360,7 @@
             have_loadso=yes
         fi
         # Set up the system libraries we need
-        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm"
-        if test x$have_directx = xyes; then
-            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldxguid"
-        fi
+        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm"
         # The Win32 platform requires special setup
         SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
         SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
@@ -2354,6 +2375,7 @@
         CheckNASM
         CheckBWINDOW
         CheckBeGL
+        CheckglSDL
         # Set up files for the audio library
         if test x$enable_audio = xyes; then
             AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO)
@@ -2435,6 +2457,7 @@
         CheckX11
         CheckMacGL
         CheckOpenGLX11
+        CheckglSDL
         CheckPTHREAD
         CheckAltivec
 
@@ -2496,6 +2519,7 @@
         CheckAtariAudio
         CheckAtariLdg
         CheckAtariOSMesa
+        CheckglSDL
         CheckPTH
         # Set up files for the audio library
         if test x$enable_threads = xyes -a x$enable_pth = xyes; then