Make sure that we use consistent configuration options on platforms like Windows so that command line builds and IDE builds have ABI compatibility.
authorSam Lantinga <slouken@libsdl.org>
Sat, 14 Jan 2012 13:21:19 -0500
changeset 62176952b11b7f46
parent 6216 c6ce4c89fcea
child 6219 8e94af244f2c
Make sure that we use consistent configuration options on platforms like Windows so that command line builds and IDE builds have ABI compatibility.
Make sure we don't clobber SDL_revision.h when building from Mercurial
.hgignore
Makefile.in
configure
configure.in
include/SDL_config.h
include/SDL_config.h.in
include/SDL_config_generated.h.in
src/SDL_assert.c
src/atomic/SDL_atomic.c
src/atomic/SDL_spinlock.c
src/main/dummy/SDL_dummy_main.c
     1.1 --- a/.hgignore	Sat Jan 14 13:17:01 2012 -0500
     1.2 +++ b/.hgignore	Sat Jan 14 13:21:19 2012 -0500
     1.3 @@ -8,6 +8,7 @@
     1.4  SDL.spec
     1.5  SDL.qpg
     1.6  build
     1.7 +include/SDL_config_generated.h
     1.8  
     1.9  # for Xcode
    1.10  *.orig
     2.1 --- a/Makefile.in	Sat Jan 14 13:17:01 2012 -0500
     2.2 +++ b/Makefile.in	Sat Jan 14 13:21:19 2012 -0500
     2.3 @@ -46,6 +46,13 @@
     2.4  	SDL_audio.h \
     2.5  	SDL_blendmode.h \
     2.6  	SDL_clipboard.h \
     2.7 +	SDL_config.h \
     2.8 +	SDL_config_android.h \
     2.9 +	SDL_config_iphoneos.h \
    2.10 +	SDL_config_macosx.h \
    2.11 +	SDL_config_minimal.h \
    2.12 +	SDL_config_nintendods.h \
    2.13 +	SDL_config_windows.h \
    2.14  	SDL_compat.h \
    2.15  	SDL_cpuinfo.h \
    2.16  	SDL_endian.h \
    2.17 @@ -130,7 +137,7 @@
    2.18  	for file in $(HDRS); do \
    2.19  	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
    2.20  	done
    2.21 -	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
    2.22 +	$(INSTALL) -m 644 include/SDL_config_generated.h $(DESTDIR)$(includedir)/SDL/SDL_config_generated.h
    2.23  	if test -f include/SDL_revision.h; then \
    2.24  	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h; \
    2.25  	else \
    2.26 @@ -155,7 +162,7 @@
    2.27  	for file in $(HDRS); do \
    2.28  	    rm -f $(DESTDIR)$(includedir)/SDL/$$file; \
    2.29  	done
    2.30 -	rm -f $(DESTDIR)$(includedir)/SDL/SDL_config.h
    2.31 +	rm -f $(DESTDIR)$(includedir)/SDL/SDL_config_generated.h
    2.32  	rm -f $(DESTDIR)$(includedir)/SDL/SDL_revision.h
    2.33  	-rmdir $(DESTDIR)$(includedir)/SDL
    2.34  uninstall-lib:
     3.1 --- a/configure	Sat Jan 14 13:17:01 2012 -0500
     3.2 +++ b/configure	Sat Jan 14 13:21:19 2012 -0500
     3.3 @@ -2025,7 +2025,7 @@
     3.4  ac_compiler_gnu=$ac_cv_c_compiler_gnu
     3.5  
     3.6  
     3.7 -ac_config_headers="$ac_config_headers include/SDL_config.h"
     3.8 +ac_config_headers="$ac_config_headers include/SDL_config_generated.h"
     3.9  
    3.10  
    3.11  cat >>confdefs.h <<\_ACEOF
    3.12 @@ -15525,12 +15525,17 @@
    3.13  
    3.14  INCLUDE="-I$srcdir/include"
    3.15  if test x$srcdir != x.; then
    3.16 -    # Remove SDL_config.h from the source directory, since it's the
    3.17 -    # default one, and we want to include the one that we generate.
    3.18 -    if test -f $srcdir/include/SDL_config.h; then
    3.19 -        rm $srcdir/include/SDL_config.h
    3.20 -    fi
    3.21      INCLUDE="-Iinclude $INCLUDE"
    3.22 +elif test -d .hg; then
    3.23 +    { { echo "$as_me:$LINENO: error:
    3.24 +*** When building from Mercurial you should configure and build in a
    3.25 +    separate directory so you don't clobber SDL_revision.h
    3.26 +" >&5
    3.27 +echo "$as_me: error:
    3.28 +*** When building from Mercurial you should configure and build in a
    3.29 +    separate directory so you don't clobber SDL_revision.h
    3.30 +" >&2;}
    3.31 +   { (exit 1); exit 1; }; }
    3.32  fi
    3.33  case "$host" in
    3.34      *-*-cygwin*)
    3.35 @@ -15546,7 +15551,7 @@
    3.36  # Uncomment the following line if you want to force SDL and applications
    3.37  # built with it to be compiled for a particular architecture.
    3.38  #AX_GCC_ARCHFLAG([no], [BASE_CFLAGS="$BASE_CFLAGS $ax_cv_gcc_archflag]")
    3.39 -BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
    3.40 +BUILD_CFLAGS="$CFLAGS $CPPFLAGS -DGENERATED_CONFIG_H"
    3.41  # The default optimization for SDL 1.3 is -O3 (Bug #31)
    3.42  if test x$orig_CFLAGS = x; then
    3.43      BUILD_CFLAGS=`echo $BUILD_CFLAGS | sed 's/-O2/-O3/'`
    3.44 @@ -28805,7 +28810,7 @@
    3.45  for ac_config_target in $ac_config_targets
    3.46  do
    3.47    case $ac_config_target in
    3.48 -    "include/SDL_config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/SDL_config.h" ;;
    3.49 +    "include/SDL_config_generated.h") CONFIG_HEADERS="$CONFIG_HEADERS include/SDL_config_generated.h" ;;
    3.50      "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
    3.51      "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:Makefile.in:Makefile.rules" ;;
    3.52      "sdl-config") CONFIG_FILES="$CONFIG_FILES sdl-config" ;;
     4.1 --- a/configure.in	Sat Jan 14 13:17:01 2012 -0500
     4.2 +++ b/configure.in	Sat Jan 14 13:21:19 2012 -0500
     4.3 @@ -1,6 +1,6 @@
     4.4  dnl Process this file with autoconf to produce a configure script.
     4.5  AC_INIT(README)
     4.6 -AC_CONFIG_HEADER(include/SDL_config.h)
     4.7 +AC_CONFIG_HEADER(include/SDL_config_generated.h)
     4.8  AC_GNU_SOURCE
     4.9  AC_CONFIG_AUX_DIR(build-scripts)
    4.10  AC_CONFIG_MACRO_DIR([acinclude])
    4.11 @@ -61,12 +61,12 @@
    4.12  dnl Set up the compiler and linker flags
    4.13  INCLUDE="-I$srcdir/include"
    4.14  if test x$srcdir != x.; then
    4.15 -    # Remove SDL_config.h from the source directory, since it's the
    4.16 -    # default one, and we want to include the one that we generate.
    4.17 -    if test -f $srcdir/include/SDL_config.h; then
    4.18 -        rm $srcdir/include/SDL_config.h
    4.19 -    fi
    4.20      INCLUDE="-Iinclude $INCLUDE"
    4.21 +elif test -d .hg; then
    4.22 +    AC_MSG_ERROR([
    4.23 +*** When building from Mercurial you should configure and build in a
    4.24 +    separate directory so you don't clobber SDL_revision.h
    4.25 +])
    4.26  fi
    4.27  case "$host" in
    4.28      *-*-cygwin*)
    4.29 @@ -82,7 +82,7 @@
    4.30  # Uncomment the following line if you want to force SDL and applications
    4.31  # built with it to be compiled for a particular architecture.
    4.32  #AX_GCC_ARCHFLAG([no], [BASE_CFLAGS="$BASE_CFLAGS $ax_cv_gcc_archflag]")
    4.33 -BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
    4.34 +BUILD_CFLAGS="$CFLAGS $CPPFLAGS -DGENERATED_CONFIG_H"
    4.35  # The default optimization for SDL 1.3 is -O3 (Bug #31)
    4.36  if test x$orig_CFLAGS = x; then
    4.37      BUILD_CFLAGS=`echo $BUILD_CFLAGS | sed 's/-O2/-O3/'`
     5.1 --- a/include/SDL_config.h	Sat Jan 14 13:17:01 2012 -0500
     5.2 +++ b/include/SDL_config.h	Sat Jan 14 13:21:19 2012 -0500
     5.3 @@ -26,8 +26,6 @@
     5.4  
     5.5  /**
     5.6   *  \file SDL_config.h
     5.7 - *
     5.8 - *  SDL_config.h for any platform that doesn't build using the configure system.
     5.9   */
    5.10   
    5.11  /* Add any platform that doesn't build using the configure system. */
    5.12 @@ -42,7 +40,13 @@
    5.13  #elif defined(__NINTENDODS__)
    5.14  #include "SDL_config_nintendods.h"
    5.15  #else
    5.16 +#ifdef MINIMAL_CONFIG_H
    5.17 +/* This is a minimal configuration just to get SDL running on new platforms */
    5.18  #include "SDL_config_minimal.h"
    5.19 +#else
    5.20 +/* This is generated by configure for your platform */
    5.21 +#include "SDL_config_generated.h"
    5.22 +#endif
    5.23  #endif /* platform config */
    5.24  
    5.25  #endif /* _SDL_config_h */
     6.1 --- a/include/SDL_config.h.in	Sat Jan 14 13:17:01 2012 -0500
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,299 +0,0 @@
     6.4 -/*
     6.5 -  Simple DirectMedia Layer
     6.6 -  Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
     6.7 -
     6.8 -  This software is provided 'as-is', without any express or implied
     6.9 -  warranty.  In no event will the authors be held liable for any damages
    6.10 -  arising from the use of this software.
    6.11 -
    6.12 -  Permission is granted to anyone to use this software for any purpose,
    6.13 -  including commercial applications, and to alter it and redistribute it
    6.14 -  freely, subject to the following restrictions:
    6.15 -
    6.16 -  1. The origin of this software must not be misrepresented; you must not
    6.17 -     claim that you wrote the original software. If you use this software
    6.18 -     in a product, an acknowledgment in the product documentation would be
    6.19 -     appreciated but is not required.
    6.20 -  2. Altered source versions must be plainly marked as such, and must not be
    6.21 -     misrepresented as being the original software.
    6.22 -  3. This notice may not be removed or altered from any source distribution.
    6.23 -*/
    6.24 -
    6.25 -#ifndef _SDL_config_h
    6.26 -#define _SDL_config_h
    6.27 -
    6.28 -/**
    6.29 - *  \file SDL_config.h.in
    6.30 - *
    6.31 - *  This is a set of defines to configure the SDL features
    6.32 - */
    6.33 -
    6.34 -/* General platform specific identifiers */
    6.35 -#include "SDL_platform.h"
    6.36 -
    6.37 -/* Make sure that this isn't included by Visual C++ */
    6.38 -#ifdef _MSC_VER
    6.39 -#error You should run hg revert SDL_config.h 
    6.40 -#endif
    6.41 -
    6.42 -/* C language features */
    6.43 -#undef const
    6.44 -#undef inline
    6.45 -#undef volatile
    6.46 -
    6.47 -/* C datatypes */
    6.48 -#undef SIZEOF_VOIDP
    6.49 -#undef HAVE_GCC_ATOMICS
    6.50 -#undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
    6.51 -#undef HAVE_PTHREAD_SPINLOCK
    6.52 -
    6.53 -/* Comment this if you want to build without any C library requirements */
    6.54 -#undef HAVE_LIBC
    6.55 -#if HAVE_LIBC
    6.56 -
    6.57 -/* Useful headers */
    6.58 -#undef HAVE_ALLOCA_H
    6.59 -#undef HAVE_SYS_TYPES_H
    6.60 -#undef HAVE_STDIO_H
    6.61 -#undef STDC_HEADERS
    6.62 -#undef HAVE_STDLIB_H
    6.63 -#undef HAVE_STDARG_H
    6.64 -#undef HAVE_MALLOC_H
    6.65 -#undef HAVE_MEMORY_H
    6.66 -#undef HAVE_STRING_H
    6.67 -#undef HAVE_STRINGS_H
    6.68 -#undef HAVE_INTTYPES_H
    6.69 -#undef HAVE_STDINT_H
    6.70 -#undef HAVE_CTYPE_H
    6.71 -#undef HAVE_MATH_H
    6.72 -#undef HAVE_ICONV_H
    6.73 -#undef HAVE_SIGNAL_H
    6.74 -#undef HAVE_ALTIVEC_H
    6.75 -#undef HAVE_PTHREAD_NP_H
    6.76 -
    6.77 -/* C library functions */
    6.78 -#undef HAVE_MALLOC
    6.79 -#undef HAVE_CALLOC
    6.80 -#undef HAVE_REALLOC
    6.81 -#undef HAVE_FREE
    6.82 -#undef HAVE_ALLOCA
    6.83 -#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
    6.84 -#undef HAVE_GETENV
    6.85 -#undef HAVE_SETENV
    6.86 -#undef HAVE_PUTENV
    6.87 -#undef HAVE_UNSETENV
    6.88 -#endif
    6.89 -#undef HAVE_QSORT
    6.90 -#undef HAVE_ABS
    6.91 -#undef HAVE_BCOPY
    6.92 -#undef HAVE_MEMSET
    6.93 -#undef HAVE_MEMCPY
    6.94 -#undef HAVE_MEMMOVE
    6.95 -#undef HAVE_MEMCMP
    6.96 -#undef HAVE_STRLEN
    6.97 -#undef HAVE_STRLCPY
    6.98 -#undef HAVE_STRLCAT
    6.99 -#undef HAVE_STRDUP
   6.100 -#undef HAVE__STRREV
   6.101 -#undef HAVE__STRUPR
   6.102 -#undef HAVE__STRLWR
   6.103 -#undef HAVE_INDEX
   6.104 -#undef HAVE_RINDEX
   6.105 -#undef HAVE_STRCHR
   6.106 -#undef HAVE_STRRCHR
   6.107 -#undef HAVE_STRSTR
   6.108 -#undef HAVE_ITOA
   6.109 -#undef HAVE__LTOA
   6.110 -#undef HAVE__UITOA
   6.111 -#undef HAVE__ULTOA
   6.112 -#undef HAVE_STRTOL
   6.113 -#undef HAVE_STRTOUL
   6.114 -#undef HAVE__I64TOA
   6.115 -#undef HAVE__UI64TOA
   6.116 -#undef HAVE_STRTOLL
   6.117 -#undef HAVE_STRTOULL
   6.118 -#undef HAVE_STRTOD
   6.119 -#undef HAVE_ATOI
   6.120 -#undef HAVE_ATOF
   6.121 -#undef HAVE_STRCMP
   6.122 -#undef HAVE_STRNCMP
   6.123 -#undef HAVE__STRICMP
   6.124 -#undef HAVE_STRCASECMP
   6.125 -#undef HAVE__STRNICMP
   6.126 -#undef HAVE_STRNCASECMP
   6.127 -#undef HAVE_SSCANF
   6.128 -#undef HAVE_SNPRINTF
   6.129 -#undef HAVE_VSNPRINTF
   6.130 -#undef HAVE_M_PI
   6.131 -#undef HAVE_ATAN
   6.132 -#undef HAVE_ATAN2
   6.133 -#undef HAVE_CEIL
   6.134 -#undef HAVE_COPYSIGN
   6.135 -#undef HAVE_COS
   6.136 -#undef HAVE_COSF
   6.137 -#undef HAVE_FABS
   6.138 -#undef HAVE_FLOOR
   6.139 -#undef HAVE_LOG
   6.140 -#undef HAVE_POW
   6.141 -#undef HAVE_SCALBN
   6.142 -#undef HAVE_SIN
   6.143 -#undef HAVE_SINF
   6.144 -#undef HAVE_SQRT
   6.145 -#undef HAVE_SIGACTION
   6.146 -#undef HAVE_SA_SIGACTION
   6.147 -#undef HAVE_SETJMP
   6.148 -#undef HAVE_NANOSLEEP
   6.149 -#undef HAVE_SYSCONF
   6.150 -#undef HAVE_SYSCTLBYNAME
   6.151 -#undef HAVE_CLOCK_GETTIME
   6.152 -#undef HAVE_GETPAGESIZE
   6.153 -#undef HAVE_MPROTECT
   6.154 -#undef HAVE_ICONV
   6.155 -#undef HAVE_PTHREAD_SETNAME_NP
   6.156 -#undef HAVE_PTHREAD_SET_NAME_NP
   6.157 -
   6.158 -#else
   6.159 -/* We may need some replacement for stdarg.h here */
   6.160 -#include <stdarg.h>
   6.161 -#endif /* HAVE_LIBC */
   6.162 -
   6.163 -/* SDL internal assertion support */
   6.164 -#undef SDL_DEFAULT_ASSERT_LEVEL
   6.165 -
   6.166 -/* Allow disabling of core subsystems */
   6.167 -#undef SDL_ATOMIC_DISABLED
   6.168 -#undef SDL_AUDIO_DISABLED
   6.169 -#undef SDL_CPUINFO_DISABLED
   6.170 -#undef SDL_EVENTS_DISABLED
   6.171 -#undef SDL_FILE_DISABLED
   6.172 -#undef SDL_JOYSTICK_DISABLED
   6.173 -#undef SDL_HAPTIC_DISABLED
   6.174 -#undef SDL_LOADSO_DISABLED
   6.175 -#undef SDL_RENDER_DISABLED
   6.176 -#undef SDL_THREADS_DISABLED
   6.177 -#undef SDL_TIMERS_DISABLED
   6.178 -#undef SDL_VIDEO_DISABLED
   6.179 -#undef SDL_POWER_DISABLED
   6.180 -
   6.181 -/* Enable various audio drivers */
   6.182 -#undef SDL_AUDIO_DRIVER_ALSA
   6.183 -#undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
   6.184 -#undef SDL_AUDIO_DRIVER_ARTS
   6.185 -#undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC
   6.186 -#undef SDL_AUDIO_DRIVER_PULSEAUDIO
   6.187 -#undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
   6.188 -#undef SDL_AUDIO_DRIVER_BEOSAUDIO
   6.189 -#undef SDL_AUDIO_DRIVER_BSD
   6.190 -#undef SDL_AUDIO_DRIVER_COREAUDIO
   6.191 -#undef SDL_AUDIO_DRIVER_DISK
   6.192 -#undef SDL_AUDIO_DRIVER_DUMMY
   6.193 -#undef SDL_AUDIO_DRIVER_XAUDIO2
   6.194 -#undef SDL_AUDIO_DRIVER_DSOUND
   6.195 -#undef SDL_AUDIO_DRIVER_ESD
   6.196 -#undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
   6.197 -#undef SDL_AUDIO_DRIVER_NAS
   6.198 -#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
   6.199 -#undef SDL_AUDIO_DRIVER_NDS
   6.200 -#undef SDL_AUDIO_DRIVER_OSS
   6.201 -#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
   6.202 -#undef SDL_AUDIO_DRIVER_PAUDIO
   6.203 -#undef SDL_AUDIO_DRIVER_QSA
   6.204 -#undef SDL_AUDIO_DRIVER_SUNAUDIO
   6.205 -#undef SDL_AUDIO_DRIVER_WINMM
   6.206 -#undef SDL_AUDIO_DRIVER_FUSIONSOUND
   6.207 -#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
   6.208 -
   6.209 -/* Enable various input drivers */
   6.210 -#undef SDL_INPUT_LINUXEV
   6.211 -#undef SDL_INPUT_TSLIB
   6.212 -#undef SDL_JOYSTICK_BEOS
   6.213 -#undef SDL_JOYSTICK_DINPUT
   6.214 -#undef SDL_JOYSTICK_DUMMY
   6.215 -#undef SDL_JOYSTICK_IOKIT
   6.216 -#undef SDL_JOYSTICK_LINUX
   6.217 -#undef SDL_JOYSTICK_NDS
   6.218 -#undef SDL_JOYSTICK_WINMM
   6.219 -#undef SDL_JOYSTICK_USBHID
   6.220 -#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
   6.221 -#undef SDL_HAPTIC_DUMMY
   6.222 -#undef SDL_HAPTIC_LINUX
   6.223 -#undef SDL_HAPTIC_IOKIT
   6.224 -#undef SDL_HAPTIC_DINPUT
   6.225 -
   6.226 -/* Enable various shared object loading systems */
   6.227 -#undef SDL_LOADSO_BEOS
   6.228 -#undef SDL_LOADSO_DLOPEN
   6.229 -#undef SDL_LOADSO_DUMMY
   6.230 -#undef SDL_LOADSO_LDG
   6.231 -#undef SDL_LOADSO_WINDOWS
   6.232 -
   6.233 -/* Enable various threading systems */
   6.234 -#undef SDL_THREAD_BEOS
   6.235 -#undef SDL_THREAD_NDS
   6.236 -#undef SDL_THREAD_PTHREAD
   6.237 -#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
   6.238 -#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
   6.239 -#undef SDL_THREAD_WINDOWS
   6.240 -
   6.241 -/* Enable various timer systems */
   6.242 -#undef SDL_TIMER_BEOS
   6.243 -#undef SDL_TIMER_DUMMY
   6.244 -#undef SDL_TIMER_NDS
   6.245 -#undef SDL_TIMER_UNIX
   6.246 -#undef SDL_TIMER_WINDOWS
   6.247 -#undef SDL_TIMER_WINCE
   6.248 -
   6.249 -/* Enable various video drivers */
   6.250 -#undef SDL_VIDEO_DRIVER_BWINDOW
   6.251 -#undef SDL_VIDEO_DRIVER_COCOA
   6.252 -#undef SDL_VIDEO_DRIVER_DIRECTFB
   6.253 -#undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC
   6.254 -#undef SDL_VIDEO_DRIVER_DUMMY
   6.255 -#undef SDL_VIDEO_DRIVER_NDS
   6.256 -#undef SDL_VIDEO_DRIVER_WINDOWS
   6.257 -#undef SDL_VIDEO_DRIVER_X11
   6.258 -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
   6.259 -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
   6.260 -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
   6.261 -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA
   6.262 -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT
   6.263 -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
   6.264 -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
   6.265 -#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
   6.266 -#undef SDL_VIDEO_DRIVER_X11_XCURSOR
   6.267 -#undef SDL_VIDEO_DRIVER_X11_XINERAMA
   6.268 -#undef SDL_VIDEO_DRIVER_X11_XINPUT
   6.269 -#undef SDL_VIDEO_DRIVER_X11_XRANDR
   6.270 -#undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER
   6.271 -#undef SDL_VIDEO_DRIVER_X11_XSHAPE
   6.272 -#undef SDL_VIDEO_DRIVER_X11_XVIDMODE
   6.273 -
   6.274 -#undef SDL_VIDEO_RENDER_D3D
   6.275 -#undef SDL_VIDEO_RENDER_OGL
   6.276 -#undef SDL_VIDEO_RENDER_OGL_ES
   6.277 -#undef SDL_VIDEO_RENDER_OGL_ES2
   6.278 -#undef SDL_VIDEO_RENDER_DIRECTFB
   6.279 -
   6.280 -/* Enable OpenGL support */
   6.281 -#undef SDL_VIDEO_OPENGL
   6.282 -#undef SDL_VIDEO_OPENGL_ES
   6.283 -#undef SDL_VIDEO_OPENGL_BGL
   6.284 -#undef SDL_VIDEO_OPENGL_CGL
   6.285 -#undef SDL_VIDEO_OPENGL_GLX
   6.286 -#undef SDL_VIDEO_OPENGL_WGL
   6.287 -#undef SDL_VIDEO_OPENGL_OSMESA
   6.288 -#undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC
   6.289 -
   6.290 -/* Enable system power support */
   6.291 -#undef SDL_POWER_LINUX
   6.292 -#undef SDL_POWER_WINDOWS
   6.293 -#undef SDL_POWER_MACOSX
   6.294 -#undef SDL_POWER_BEOS
   6.295 -#undef SDL_POWER_NINTENDODS
   6.296 -#undef SDL_POWER_HARDWIRED
   6.297 -
   6.298 -/* Enable assembly routines */
   6.299 -#undef SDL_ASSEMBLY_ROUTINES
   6.300 -#undef SDL_ALTIVEC_BLITTERS
   6.301 -
   6.302 -#endif /* _SDL_config_h */
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/include/SDL_config_generated.h.in	Sat Jan 14 13:21:19 2012 -0500
     7.3 @@ -0,0 +1,299 @@
     7.4 +/*
     7.5 +  Simple DirectMedia Layer
     7.6 +  Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
     7.7 +
     7.8 +  This software is provided 'as-is', without any express or implied
     7.9 +  warranty.  In no event will the authors be held liable for any damages
    7.10 +  arising from the use of this software.
    7.11 +
    7.12 +  Permission is granted to anyone to use this software for any purpose,
    7.13 +  including commercial applications, and to alter it and redistribute it
    7.14 +  freely, subject to the following restrictions:
    7.15 +
    7.16 +  1. The origin of this software must not be misrepresented; you must not
    7.17 +     claim that you wrote the original software. If you use this software
    7.18 +     in a product, an acknowledgment in the product documentation would be
    7.19 +     appreciated but is not required.
    7.20 +  2. Altered source versions must be plainly marked as such, and must not be
    7.21 +     misrepresented as being the original software.
    7.22 +  3. This notice may not be removed or altered from any source distribution.
    7.23 +*/
    7.24 +
    7.25 +#ifndef _SDL_config_h
    7.26 +#define _SDL_config_h
    7.27 +
    7.28 +/**
    7.29 + *  \file SDL_config.h.in
    7.30 + *
    7.31 + *  This is a set of defines to configure the SDL features
    7.32 + */
    7.33 +
    7.34 +/* General platform specific identifiers */
    7.35 +#include "SDL_platform.h"
    7.36 +
    7.37 +/* Make sure that this isn't included by Visual C++ */
    7.38 +#ifdef _MSC_VER
    7.39 +#error You should run hg revert SDL_config.h 
    7.40 +#endif
    7.41 +
    7.42 +/* C language features */
    7.43 +#undef const
    7.44 +#undef inline
    7.45 +#undef volatile
    7.46 +
    7.47 +/* C datatypes */
    7.48 +#undef SIZEOF_VOIDP
    7.49 +#undef HAVE_GCC_ATOMICS
    7.50 +#undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
    7.51 +#undef HAVE_PTHREAD_SPINLOCK
    7.52 +
    7.53 +/* Comment this if you want to build without any C library requirements */
    7.54 +#undef HAVE_LIBC
    7.55 +#if HAVE_LIBC
    7.56 +
    7.57 +/* Useful headers */
    7.58 +#undef HAVE_ALLOCA_H
    7.59 +#undef HAVE_SYS_TYPES_H
    7.60 +#undef HAVE_STDIO_H
    7.61 +#undef STDC_HEADERS
    7.62 +#undef HAVE_STDLIB_H
    7.63 +#undef HAVE_STDARG_H
    7.64 +#undef HAVE_MALLOC_H
    7.65 +#undef HAVE_MEMORY_H
    7.66 +#undef HAVE_STRING_H
    7.67 +#undef HAVE_STRINGS_H
    7.68 +#undef HAVE_INTTYPES_H
    7.69 +#undef HAVE_STDINT_H
    7.70 +#undef HAVE_CTYPE_H
    7.71 +#undef HAVE_MATH_H
    7.72 +#undef HAVE_ICONV_H
    7.73 +#undef HAVE_SIGNAL_H
    7.74 +#undef HAVE_ALTIVEC_H
    7.75 +#undef HAVE_PTHREAD_NP_H
    7.76 +
    7.77 +/* C library functions */
    7.78 +#undef HAVE_MALLOC
    7.79 +#undef HAVE_CALLOC
    7.80 +#undef HAVE_REALLOC
    7.81 +#undef HAVE_FREE
    7.82 +#undef HAVE_ALLOCA
    7.83 +#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
    7.84 +#undef HAVE_GETENV
    7.85 +#undef HAVE_SETENV
    7.86 +#undef HAVE_PUTENV
    7.87 +#undef HAVE_UNSETENV
    7.88 +#endif
    7.89 +#undef HAVE_QSORT
    7.90 +#undef HAVE_ABS
    7.91 +#undef HAVE_BCOPY
    7.92 +#undef HAVE_MEMSET
    7.93 +#undef HAVE_MEMCPY
    7.94 +#undef HAVE_MEMMOVE
    7.95 +#undef HAVE_MEMCMP
    7.96 +#undef HAVE_STRLEN
    7.97 +#undef HAVE_STRLCPY
    7.98 +#undef HAVE_STRLCAT
    7.99 +#undef HAVE_STRDUP
   7.100 +#undef HAVE__STRREV
   7.101 +#undef HAVE__STRUPR
   7.102 +#undef HAVE__STRLWR
   7.103 +#undef HAVE_INDEX
   7.104 +#undef HAVE_RINDEX
   7.105 +#undef HAVE_STRCHR
   7.106 +#undef HAVE_STRRCHR
   7.107 +#undef HAVE_STRSTR
   7.108 +#undef HAVE_ITOA
   7.109 +#undef HAVE__LTOA
   7.110 +#undef HAVE__UITOA
   7.111 +#undef HAVE__ULTOA
   7.112 +#undef HAVE_STRTOL
   7.113 +#undef HAVE_STRTOUL
   7.114 +#undef HAVE__I64TOA
   7.115 +#undef HAVE__UI64TOA
   7.116 +#undef HAVE_STRTOLL
   7.117 +#undef HAVE_STRTOULL
   7.118 +#undef HAVE_STRTOD
   7.119 +#undef HAVE_ATOI
   7.120 +#undef HAVE_ATOF
   7.121 +#undef HAVE_STRCMP
   7.122 +#undef HAVE_STRNCMP
   7.123 +#undef HAVE__STRICMP
   7.124 +#undef HAVE_STRCASECMP
   7.125 +#undef HAVE__STRNICMP
   7.126 +#undef HAVE_STRNCASECMP
   7.127 +#undef HAVE_SSCANF
   7.128 +#undef HAVE_SNPRINTF
   7.129 +#undef HAVE_VSNPRINTF
   7.130 +#undef HAVE_M_PI
   7.131 +#undef HAVE_ATAN
   7.132 +#undef HAVE_ATAN2
   7.133 +#undef HAVE_CEIL
   7.134 +#undef HAVE_COPYSIGN
   7.135 +#undef HAVE_COS
   7.136 +#undef HAVE_COSF
   7.137 +#undef HAVE_FABS
   7.138 +#undef HAVE_FLOOR
   7.139 +#undef HAVE_LOG
   7.140 +#undef HAVE_POW
   7.141 +#undef HAVE_SCALBN
   7.142 +#undef HAVE_SIN
   7.143 +#undef HAVE_SINF
   7.144 +#undef HAVE_SQRT
   7.145 +#undef HAVE_SIGACTION
   7.146 +#undef HAVE_SA_SIGACTION
   7.147 +#undef HAVE_SETJMP
   7.148 +#undef HAVE_NANOSLEEP
   7.149 +#undef HAVE_SYSCONF
   7.150 +#undef HAVE_SYSCTLBYNAME
   7.151 +#undef HAVE_CLOCK_GETTIME
   7.152 +#undef HAVE_GETPAGESIZE
   7.153 +#undef HAVE_MPROTECT
   7.154 +#undef HAVE_ICONV
   7.155 +#undef HAVE_PTHREAD_SETNAME_NP
   7.156 +#undef HAVE_PTHREAD_SET_NAME_NP
   7.157 +
   7.158 +#else
   7.159 +/* We may need some replacement for stdarg.h here */
   7.160 +#include <stdarg.h>
   7.161 +#endif /* HAVE_LIBC */
   7.162 +
   7.163 +/* SDL internal assertion support */
   7.164 +#undef SDL_DEFAULT_ASSERT_LEVEL
   7.165 +
   7.166 +/* Allow disabling of core subsystems */
   7.167 +#undef SDL_ATOMIC_DISABLED
   7.168 +#undef SDL_AUDIO_DISABLED
   7.169 +#undef SDL_CPUINFO_DISABLED
   7.170 +#undef SDL_EVENTS_DISABLED
   7.171 +#undef SDL_FILE_DISABLED
   7.172 +#undef SDL_JOYSTICK_DISABLED
   7.173 +#undef SDL_HAPTIC_DISABLED
   7.174 +#undef SDL_LOADSO_DISABLED
   7.175 +#undef SDL_RENDER_DISABLED
   7.176 +#undef SDL_THREADS_DISABLED
   7.177 +#undef SDL_TIMERS_DISABLED
   7.178 +#undef SDL_VIDEO_DISABLED
   7.179 +#undef SDL_POWER_DISABLED
   7.180 +
   7.181 +/* Enable various audio drivers */
   7.182 +#undef SDL_AUDIO_DRIVER_ALSA
   7.183 +#undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
   7.184 +#undef SDL_AUDIO_DRIVER_ARTS
   7.185 +#undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC
   7.186 +#undef SDL_AUDIO_DRIVER_PULSEAUDIO
   7.187 +#undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
   7.188 +#undef SDL_AUDIO_DRIVER_BEOSAUDIO
   7.189 +#undef SDL_AUDIO_DRIVER_BSD
   7.190 +#undef SDL_AUDIO_DRIVER_COREAUDIO
   7.191 +#undef SDL_AUDIO_DRIVER_DISK
   7.192 +#undef SDL_AUDIO_DRIVER_DUMMY
   7.193 +#undef SDL_AUDIO_DRIVER_XAUDIO2
   7.194 +#undef SDL_AUDIO_DRIVER_DSOUND
   7.195 +#undef SDL_AUDIO_DRIVER_ESD
   7.196 +#undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
   7.197 +#undef SDL_AUDIO_DRIVER_NAS
   7.198 +#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
   7.199 +#undef SDL_AUDIO_DRIVER_NDS
   7.200 +#undef SDL_AUDIO_DRIVER_OSS
   7.201 +#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
   7.202 +#undef SDL_AUDIO_DRIVER_PAUDIO
   7.203 +#undef SDL_AUDIO_DRIVER_QSA
   7.204 +#undef SDL_AUDIO_DRIVER_SUNAUDIO
   7.205 +#undef SDL_AUDIO_DRIVER_WINMM
   7.206 +#undef SDL_AUDIO_DRIVER_FUSIONSOUND
   7.207 +#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
   7.208 +
   7.209 +/* Enable various input drivers */
   7.210 +#undef SDL_INPUT_LINUXEV
   7.211 +#undef SDL_INPUT_TSLIB
   7.212 +#undef SDL_JOYSTICK_BEOS
   7.213 +#undef SDL_JOYSTICK_DINPUT
   7.214 +#undef SDL_JOYSTICK_DUMMY
   7.215 +#undef SDL_JOYSTICK_IOKIT
   7.216 +#undef SDL_JOYSTICK_LINUX
   7.217 +#undef SDL_JOYSTICK_NDS
   7.218 +#undef SDL_JOYSTICK_WINMM
   7.219 +#undef SDL_JOYSTICK_USBHID
   7.220 +#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
   7.221 +#undef SDL_HAPTIC_DUMMY
   7.222 +#undef SDL_HAPTIC_LINUX
   7.223 +#undef SDL_HAPTIC_IOKIT
   7.224 +#undef SDL_HAPTIC_DINPUT
   7.225 +
   7.226 +/* Enable various shared object loading systems */
   7.227 +#undef SDL_LOADSO_BEOS
   7.228 +#undef SDL_LOADSO_DLOPEN
   7.229 +#undef SDL_LOADSO_DUMMY
   7.230 +#undef SDL_LOADSO_LDG
   7.231 +#undef SDL_LOADSO_WINDOWS
   7.232 +
   7.233 +/* Enable various threading systems */
   7.234 +#undef SDL_THREAD_BEOS
   7.235 +#undef SDL_THREAD_NDS
   7.236 +#undef SDL_THREAD_PTHREAD
   7.237 +#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
   7.238 +#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
   7.239 +#undef SDL_THREAD_WINDOWS
   7.240 +
   7.241 +/* Enable various timer systems */
   7.242 +#undef SDL_TIMER_BEOS
   7.243 +#undef SDL_TIMER_DUMMY
   7.244 +#undef SDL_TIMER_NDS
   7.245 +#undef SDL_TIMER_UNIX
   7.246 +#undef SDL_TIMER_WINDOWS
   7.247 +#undef SDL_TIMER_WINCE
   7.248 +
   7.249 +/* Enable various video drivers */
   7.250 +#undef SDL_VIDEO_DRIVER_BWINDOW
   7.251 +#undef SDL_VIDEO_DRIVER_COCOA
   7.252 +#undef SDL_VIDEO_DRIVER_DIRECTFB
   7.253 +#undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC
   7.254 +#undef SDL_VIDEO_DRIVER_DUMMY
   7.255 +#undef SDL_VIDEO_DRIVER_NDS
   7.256 +#undef SDL_VIDEO_DRIVER_WINDOWS
   7.257 +#undef SDL_VIDEO_DRIVER_X11
   7.258 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
   7.259 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
   7.260 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
   7.261 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA
   7.262 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT
   7.263 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
   7.264 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
   7.265 +#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
   7.266 +#undef SDL_VIDEO_DRIVER_X11_XCURSOR
   7.267 +#undef SDL_VIDEO_DRIVER_X11_XINERAMA
   7.268 +#undef SDL_VIDEO_DRIVER_X11_XINPUT
   7.269 +#undef SDL_VIDEO_DRIVER_X11_XRANDR
   7.270 +#undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER
   7.271 +#undef SDL_VIDEO_DRIVER_X11_XSHAPE
   7.272 +#undef SDL_VIDEO_DRIVER_X11_XVIDMODE
   7.273 +
   7.274 +#undef SDL_VIDEO_RENDER_D3D
   7.275 +#undef SDL_VIDEO_RENDER_OGL
   7.276 +#undef SDL_VIDEO_RENDER_OGL_ES
   7.277 +#undef SDL_VIDEO_RENDER_OGL_ES2
   7.278 +#undef SDL_VIDEO_RENDER_DIRECTFB
   7.279 +
   7.280 +/* Enable OpenGL support */
   7.281 +#undef SDL_VIDEO_OPENGL
   7.282 +#undef SDL_VIDEO_OPENGL_ES
   7.283 +#undef SDL_VIDEO_OPENGL_BGL
   7.284 +#undef SDL_VIDEO_OPENGL_CGL
   7.285 +#undef SDL_VIDEO_OPENGL_GLX
   7.286 +#undef SDL_VIDEO_OPENGL_WGL
   7.287 +#undef SDL_VIDEO_OPENGL_OSMESA
   7.288 +#undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC
   7.289 +
   7.290 +/* Enable system power support */
   7.291 +#undef SDL_POWER_LINUX
   7.292 +#undef SDL_POWER_WINDOWS
   7.293 +#undef SDL_POWER_MACOSX
   7.294 +#undef SDL_POWER_BEOS
   7.295 +#undef SDL_POWER_NINTENDODS
   7.296 +#undef SDL_POWER_HARDWIRED
   7.297 +
   7.298 +/* Enable assembly routines */
   7.299 +#undef SDL_ASSEMBLY_ROUTINES
   7.300 +#undef SDL_ALTIVEC_BLITTERS
   7.301 +
   7.302 +#endif /* _SDL_config_h */
     8.1 --- a/src/SDL_assert.c	Sat Jan 14 13:17:01 2012 -0500
     8.2 +++ b/src/SDL_assert.c	Sat Jan 14 13:21:19 2012 -0500
     8.3 @@ -18,6 +18,7 @@
     8.4       misrepresented as being the original software.
     8.5    3. This notice may not be removed or altered from any source distribution.
     8.6  */
     8.7 +#include "SDL_config.h"
     8.8  
     8.9  #include "SDL.h"
    8.10  #include "SDL_atomic.h"
     9.1 --- a/src/atomic/SDL_atomic.c	Sat Jan 14 13:17:01 2012 -0500
     9.2 +++ b/src/atomic/SDL_atomic.c	Sat Jan 14 13:21:19 2012 -0500
     9.3 @@ -18,7 +18,7 @@
     9.4       misrepresented as being the original software.
     9.5    3. This notice may not be removed or altered from any source distribution.
     9.6  */
     9.7 -#include "SDL_stdinc.h"
     9.8 +#include "SDL_config.h"
     9.9  
    9.10  #include "SDL_atomic.h"
    9.11  
    10.1 --- a/src/atomic/SDL_spinlock.c	Sat Jan 14 13:17:01 2012 -0500
    10.2 +++ b/src/atomic/SDL_spinlock.c	Sat Jan 14 13:21:19 2012 -0500
    10.3 @@ -18,7 +18,7 @@
    10.4       misrepresented as being the original software.
    10.5    3. This notice may not be removed or altered from any source distribution.
    10.6  */
    10.7 -#include "SDL_stdinc.h"
    10.8 +#include "SDL_config.h"
    10.9  
   10.10  #include "SDL_atomic.h"
   10.11  #include "SDL_mutex.h"
    11.1 --- a/src/main/dummy/SDL_dummy_main.c	Sat Jan 14 13:17:01 2012 -0500
    11.2 +++ b/src/main/dummy/SDL_dummy_main.c	Sat Jan 14 13:21:19 2012 -0500
    11.3 @@ -1,5 +1,6 @@
    11.4  
    11.5  /* Include the SDL main definition header */
    11.6 +#include "SDL_config.h"
    11.7  #include "SDL_main.h"
    11.8  
    11.9  #ifdef main