summaryrefslogtreecommitdiff
path: root/recipes/libsdl/files
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/libsdl/files
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/libsdl/files')
-rw-r--r--recipes/libsdl/files/acinclude.m4189
-rw-r--r--recipes/libsdl/files/configure_tweak.patch1167
-rw-r--r--recipes/libsdl/files/directfb_obsolete_calls.patch33
-rw-r--r--recipes/libsdl/files/explicit-extern-C.patch22
-rw-r--r--recipes/libsdl/files/extra-keys.patch53
-rw-r--r--recipes/libsdl/files/fixlibs-1.2.9.patch27
-rw-r--r--recipes/libsdl/files/fixmfour.patch14
-rw-r--r--recipes/libsdl/files/kernel-asm-page.patch13
-rw-r--r--recipes/libsdl/files/kill-stdc++-1.2.9.patch422
-rw-r--r--recipes/libsdl/files/pagesize.patch15
-rw-r--r--recipes/libsdl/files/pygame-1.2.9.patch191
-rw-r--r--recipes/libsdl/files/remove_path.patch18
-rw-r--r--recipes/libsdl/files/sdl-cdfix.patch11
13 files changed, 2175 insertions, 0 deletions
diff --git a/recipes/libsdl/files/acinclude.m4 b/recipes/libsdl/files/acinclude.m4
new file mode 100644
index 0000000000..ca2df9d5e5
--- /dev/null
+++ b/recipes/libsdl/files/acinclude.m4
@@ -0,0 +1,189 @@
+# Local macros for the SDL configure.in script
+
+dnl Function to link an architecture specific file
+dnl LINK_ARCH_SRC(source_dir, arch, source_file)
+AC_DEFUN([COPY_ARCH_SRC],
+[
+ old="$srcdir/$1/$2/$3"
+ new="$1/$3"
+ if test ! -d $1; then
+ echo "Creating directory $1"
+ mkdir -p $1
+ fi
+ echo "Copying $old -> $new"
+ cat >$new <<__EOF__
+/* WARNING: This file was automatically generated!
+ * Original: $old
+ */
+__EOF__
+ cat >>$new <$old
+])
+
+#
+# --- esd.m4 ---
+#
+# Configure paths for ESD
+# Manish Singh 98-9-30
+# stolen back from Frank Belew
+# stolen from Manish Singh
+# Shamelessly stolen from Owen Taylor
+
+dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
+dnl
+AC_DEFUN([AM_PATH_ESD],
+[dnl
+dnl Get the cflags and libraries from the esd-config script
+dnl
+AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
+ esd_prefix="$withval", esd_prefix="")
+AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
+ esd_exec_prefix="$withval", esd_exec_prefix="")
+AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
+ , enable_esdtest=yes)
+
+ if test x$esd_exec_prefix != x ; then
+ esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
+ if test x${ESD_CONFIG+set} != xset ; then
+ ESD_CONFIG=$esd_exec_prefix/bin/esd-config
+ fi
+ fi
+ if test x$esd_prefix != x ; then
+ esd_args="$esd_args --prefix=$esd_prefix"
+ if test x${ESD_CONFIG+set} != xset ; then
+ ESD_CONFIG=$esd_prefix/bin/esd-config
+ fi
+ fi
+
+ AC_PATH_PROG(ESD_CONFIG, esd-config, no)
+ min_esd_version=ifelse([$1], ,0.2.7,$1)
+ AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
+ no_esd=""
+ if test "$ESD_CONFIG" = "no" ; then
+ no_esd=yes
+ else
+ ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
+ ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
+
+ esd_major_version=`$ESD_CONFIG $esd_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ esd_minor_version=`$ESD_CONFIG $esd_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_esdtest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $ESD_CFLAGS"
+ LIBS="$LIBS $ESD_LIBS"
+dnl
+dnl Now check if the installed ESD is sufficiently new. (Also sanity
+dnl checks the results of esd-config to some extent
+dnl
+ rm -f conf.esdtest
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <esd.h>
+
+char*
+my_strdup (char *str)
+{
+ char *new_str;
+
+ if (str)
+ {
+ new_str = malloc ((strlen (str) + 1) * sizeof(char));
+ strcpy (new_str, str);
+ }
+ else
+ new_str = NULL;
+
+ return new_str;
+}
+
+int main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ system ("touch conf.esdtest");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = my_strdup("$min_esd_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+ printf("%s, bad version string\n", "$min_esd_version");
+ exit(1);
+ }
+
+ if (($esd_major_version > major) ||
+ (($esd_major_version == major) && ($esd_minor_version > minor)) ||
+ (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
+ printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
+ printf("*** best to upgrade to the required version.\n");
+ printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
+ printf("*** to point to the correct copy of esd-config, and remove the file\n");
+ printf("*** config.cache before re-running configure\n");
+ return 1;
+ }
+}
+
+],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_esd" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$ESD_CONFIG" = "no" ; then
+ echo "*** The esd-config script installed by ESD could not be found"
+ echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the ESD_CONFIG environment variable to the"
+ echo "*** full path to esd-config."
+ else
+ if test -f conf.esdtest ; then
+ :
+ else
+ echo "*** Could not run ESD test program, checking why..."
+ CFLAGS="$CFLAGS $ESD_CFLAGS"
+ LIBS="$LIBS $ESD_LIBS"
+ AC_TRY_LINK([
+#include <stdio.h>
+#include <esd.h>
+], [ return 0; ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding ESD or finding the wrong"
+ echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means ESD was incorrectly installed"
+ echo "*** or that you have moved ESD since it was installed. In the latter case, you"
+ echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ ESD_CFLAGS=""
+ ESD_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(ESD_CFLAGS)
+ AC_SUBST(ESD_LIBS)
+ rm -f conf.esdtest
+])
+
diff --git a/recipes/libsdl/files/configure_tweak.patch b/recipes/libsdl/files/configure_tweak.patch
new file mode 100644
index 0000000000..90a2888e57
--- /dev/null
+++ b/recipes/libsdl/files/configure_tweak.patch
@@ -0,0 +1,1167 @@
+Index: SDL-1.2.11/configure.in
+===================================================================
+--- SDL-1.2.11.orig/configure.in 2006-06-27 05:48:33.000000000 +0100
++++ SDL-1.2.11/configure.in 2008-02-21 19:48:47.000000000 +0000
+@@ -40,13 +40,13 @@
+ AC_SUBST(LT_AGE)
+
+ dnl Detect the canonical build and host environments
+-AC_CONFIG_AUX_DIRS($srcdir/build-scripts)
++AC_CONFIG_AUX_DIR(./build-scripts)
+ AC_CANONICAL_HOST
+ AC_C_BIGENDIAN
+ if test x$ac_cv_c_bigendian = xyes; then
+- AC_DEFINE(SDL_BYTEORDER, 4321)
++ AC_DEFINE(SDL_BYTEORDER, 4321, "Byte Order")
+ else
+- AC_DEFINE(SDL_BYTEORDER, 1234)
++ AC_DEFINE(SDL_BYTEORDER, 1234, "Byte Order")
+ fi
+
+ dnl Set up the compiler and linker flags
+@@ -107,7 +107,7 @@
+ AC_HELP_STRING([--enable-libc], [Use the system C library [[default=yes]]]),
+ , enable_libc=yes)
+ if test x$enable_libc = xyes; then
+- AC_DEFINE(HAVE_LIBC)
++ AC_DEFINE(HAVE_LIBC,1,"")
+
+ dnl Check for C library headers
+ AC_HEADER_STDC
+@@ -118,7 +118,7 @@
+ if test x$ac_cv_header_inttypes_h = xyes -o x$ac_cv_header_stdint_h = xyes; then
+ AC_CHECK_TYPE(int64_t)
+ if test x$ac_cv_type_int64_t = xyes; then
+- AC_DEFINE(SDL_HAS_64BIT_TYPE)
++ AC_DEFINE(SDL_HAS_64BIT_TYPE,1,"")
+ fi
+ have_inttypes=yes
+ fi
+@@ -127,11 +127,11 @@
+ AC_FUNC_ALLOCA
+ AC_FUNC_MEMCMP
+ if test x$ac_cv_func_memcmp_working = xyes; then
+- AC_DEFINE(HAVE_MEMCMP)
++ AC_DEFINE(HAVE_MEMCMP,1,"")
+ fi
+ AC_FUNC_STRTOD
+ if test x$ac_cv_func_strtod = xyes; then
+- AC_DEFINE(HAVE_STRTOD)
++ AC_DEFINE(HAVE_STRTOD,1,"")
+ fi
+ AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf iconv sigaction setjmp nanosleep)
+
+@@ -146,40 +146,40 @@
+ AC_CHECK_SIZEOF(long, 4)
+ AC_CHECK_SIZEOF(long long, 8)
+ if test x$ac_cv_sizeof_char = x1; then
+- AC_DEFINE(int8_t, signed char)
+- AC_DEFINE(uint8_t, unsigned char)
++ AC_DEFINE(int8_t, signed char,"")
++ AC_DEFINE(uint8_t, unsigned char,"")
+ fi
+ if test x$ac_cv_sizeof_short = x2; then
+- AC_DEFINE(int16_t, signed short)
+- AC_DEFINE(uint16_t, unsigned short)
++ AC_DEFINE(int16_t, signed short,"")
++ AC_DEFINE(uint16_t, unsigned short,"")
+ else
+ if test x$ac_cv_sizeof_int = x2; then
+- AC_DEFINE(int16_t, signed int)
+- AC_DEFINE(uint16_t, unsigned int)
++ AC_DEFINE(int16_t, signed int,"")
++ AC_DEFINE(uint16_t, unsigned int,"")
+ fi
+ fi
+ if test x$ac_cv_sizeof_int = x4; then
+- AC_DEFINE(int32_t, signed int)
+- AC_DEFINE(uint32_t, unsigned int)
++ AC_DEFINE(int32_t, signed int,"")
++ AC_DEFINE(uint32_t, unsigned int,"")
+ else
+ if test x$ac_cv_sizeof_long = x4; then
+- AC_DEFINE(int32_t, signed long)
+- AC_DEFINE(uint32_t, unsigned long)
++ AC_DEFINE(int32_t, signed long,"")
++ AC_DEFINE(uint32_t, unsigned long,"")
+ fi
+ fi
+ if test x$ac_cv_sizeof_long = x8; then
+- AC_DEFINE(int64_t, signed long)
+- AC_DEFINE(uint64_t, unsigned long)
+- AC_DEFINE(SDL_HAS_64BIT_TYPE)
++ AC_DEFINE(int64_t, signed long,"")
++ AC_DEFINE(uint64_t, unsigned long,"")
++ AC_DEFINE(SDL_HAS_64BIT_TYPE,"")
+ else
+ if test x$ac_cv_sizeof_long_long = x8; then
+- AC_DEFINE(int64_t, signed long long)
+- AC_DEFINE(uint64_t, unsigned long long)
+- AC_DEFINE(SDL_HAS_64BIT_TYPE)
++ AC_DEFINE(int64_t, signed long long,"")
++ AC_DEFINE(uint64_t, unsigned long long,"")
++ AC_DEFINE(SDL_HAS_64BIT_TYPE,"")
+ fi
+ fi
+- AC_DEFINE(size_t, unsigned int)
+- AC_DEFINE(uintptr_t, unsigned long)
++ AC_DEFINE(size_t, unsigned int,"")
++ AC_DEFINE(uintptr_t, unsigned long,"")
+ fi
+
+ # Standard C sources
+@@ -201,67 +201,67 @@
+ AC_HELP_STRING([--enable-audio], [Enable the audio subsystem [[default=yes]]]),
+ , enable_audio=yes)
+ if test x$enable_audio != xyes; then
+- AC_DEFINE(SDL_AUDIO_DISABLED)
++ AC_DEFINE(SDL_AUDIO_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(video,
+ AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
+ , enable_video=yes)
+ if test x$enable_video != xyes; then
+- AC_DEFINE(SDL_VIDEO_DISABLED)
++ AC_DEFINE(SDL_VIDEO_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(events,
+ AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
+ , enable_events=yes)
+ if test x$enable_events != xyes; then
+- AC_DEFINE(SDL_EVENTS_DISABLED)
++ AC_DEFINE(SDL_EVENTS_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(joystick,
+ AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
+ , enable_joystick=yes)
+ if test x$enable_joystick != xyes; then
+- AC_DEFINE(SDL_JOYSTICK_DISABLED)
++ AC_DEFINE(SDL_JOYSTICK_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(cdrom,
+ AC_HELP_STRING([--enable-cdrom], [Enable the cdrom subsystem [[default=yes]]]),
+ , enable_cdrom=yes)
+ if test x$enable_cdrom != xyes; then
+- AC_DEFINE(SDL_CDROM_DISABLED)
++ AC_DEFINE(SDL_CDROM_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(threads,
+ AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
+ , enable_threads=yes)
+ if test x$enable_threads != xyes; then
+- AC_DEFINE(SDL_THREADS_DISABLED)
++ AC_DEFINE(SDL_THREADS_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(timers,
+ AC_HELP_STRING([--enable-timers], [Enable the timer subsystem [[default=yes]]]),
+ , enable_timers=yes)
+ if test x$enable_timers != xyes; then
+- AC_DEFINE(SDL_TIMERS_DISABLED)
++ AC_DEFINE(SDL_TIMERS_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(file,
+ AC_HELP_STRING([--enable-file], [Enable the file subsystem [[default=yes]]]),
+ , enable_file=yes)
+ if test x$enable_file != xyes; then
+- AC_DEFINE(SDL_FILE_DISABLED)
++ AC_DEFINE(SDL_FILE_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(loadso,
+ AC_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [[default=yes]]]),
+ , enable_loadso=yes)
+ if test x$enable_loadso != xyes; then
+- AC_DEFINE(SDL_LOADSO_DISABLED)
++ AC_DEFINE(SDL_LOADSO_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(cpuinfo,
+ AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]]),
+ , enable_cpuinfo=yes)
+ if test x$enable_cpuinfo != xyes; then
+- AC_DEFINE(SDL_CPUINFO_DISABLED)
++ AC_DEFINE(SDL_CPUINFO_DISABLED,1,"")
+ fi
+ AC_ARG_ENABLE(assembly,
+ AC_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
+ , enable_assembly=yes)
+ if test x$enable_assembly = xyes; then
+- AC_DEFINE(SDL_ASSEMBLY_ROUTINES)
++ AC_DEFINE(SDL_ASSEMBLY_ROUTINES,1,"")
+ fi
+
+ dnl See if the OSS audio interface is supported
+@@ -289,12 +289,12 @@
+ int arg = SNDCTL_DSP_SETFRAGMENT;
+ ],[
+ have_oss=yes
+- AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H)
++ AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H,1,"")
+ ])
+ fi
+ AC_MSG_RESULT($have_oss)
+ if test x$have_oss = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_OSS)
++ AC_DEFINE(SDL_AUDIO_DRIVER_OSS,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/dsp/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/dma/*.c"
+ have_audio=yes
+@@ -314,45 +314,7 @@
+ AC_ARG_ENABLE(alsa,
+ AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
+ , enable_alsa=yes)
+- if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
+- AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
+- # Restore all flags from before the ALSA detection runs
+- CFLAGS="$alsa_save_CFLAGS"
+- LDFLAGS="$alsa_save_LDFLAGS"
+- LIBS="$alsa_save_LIBS"
+- if test x$have_alsa = xyes; then
+- AC_ARG_ENABLE(alsa-shared,
+-AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
+- , enable_alsa_shared=yes)
+- if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then
+- if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then
+- ALSA_LIBS="-L/lib $ALSA_LIBS"
+- elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then
+- ALSA_LIBS="-L/usr/lib $ALSA_LIBS"
+- elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then
+- ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS"
+- fi
+- fi
+- alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'`
+- alsa_lib=`ls -- $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
+- echo "-- $alsa_lib_spec -> $alsa_lib"
+-
+- AC_DEFINE(SDL_AUDIO_DRIVER_ALSA)
+- SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
+- EXTRA_CFLAGS="$EXTRA_CFLAGS $ALSA_CFLAGS"
+- if test x$have_loadso != xyes && \
+- test x$enable_alsa_shared = xyes; then
+- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ALSA loading])
+- fi
+- if test x$have_loadso = xyes && \
+- test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
+- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib")
+- else
+- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ALSA_LIBS"
+- fi
+- have_audio=yes
+- fi
+- fi
++ enable_alsa=no
+ }
+
+ dnl Check whether we want to use IRIX 6.5+ native audio or not
+@@ -371,7 +333,7 @@
+ AC_MSG_RESULT($have_dmedia)
+ # Set up files for the audio library
+ if test x$have_dmedia = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA)
++ AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laudio"
+ have_audio=yes
+@@ -408,7 +370,7 @@
+ AC_MSG_RESULT($have_mme)
+ # Set up files for the audio library
+ if test x$have_mme = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $MME_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MME_LIBS"
+@@ -433,7 +395,7 @@
+ esd_lib=`ls -- $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
+ echo "-- $esd_lib_spec -> $esd_lib"
+
+- AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
++ AC_DEFINE(SDL_AUDIO_DRIVER_ESD,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $ESD_CFLAGS"
+ if test x$have_loadso != xyes && \
+@@ -442,7 +404,7 @@
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_esd_shared = xyes && test x$esd_lib != x; then
+- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib")
++ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib", "")
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ESD_LIBS"
+ fi
+@@ -485,7 +447,7 @@
+ arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
+ echo "-- $arts_lib_spec -> $arts_lib"
+
+- AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
++ AC_DEFINE(SDL_AUDIO_DRIVER_ARTS,, "")
+ SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $ARTS_CFLAGS"
+ if test x$have_loadso != xyes && \
+@@ -494,7 +456,7 @@
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_arts_shared = xyes && test x$arts_lib != x; then
+- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib")
++ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib",1,"")
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARTS_LIBS"
+ fi
+@@ -527,7 +489,7 @@
+ fi
+ AC_MSG_RESULT($have_nas)
+ if test x$have_nas = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
++ AC_DEFINE(SDL_AUDIO_DRIVER_NAS,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS"
+@@ -543,7 +505,7 @@
+ AC_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [[default=yes]]]),
+ , enable_diskaudio=yes)
+ if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_DISK)
++ AC_DEFINE(SDL_AUDIO_DRIVER_DISK,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
+ fi
+ }
+@@ -555,7 +517,7 @@
+ AC_HELP_STRING([--enable-dummyaudio], [support the dummy audio driver [[default=yes]]]),
+ , enable_dummyaudio=yes)
+ if test x$enable_audio = xyes -a x$enable_dummyaudio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY)
++ AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
+ fi
+ }
+@@ -571,7 +533,7 @@
+ AC_CHECK_HEADER(mint/falcon.h, have_mint_falcon_hdr=yes)
+ if test x$have_mint_falcon_hdr = xyes; then
+ mintaudio=yes
+- AC_DEFINE(SDL_AUDIO_DRIVER_MINT)
++ AC_DEFINE(SDL_AUDIO_DRIVER_MINT,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/mint/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/mint/*.S"
+ have_audio=yes
+@@ -602,7 +564,7 @@
+ AC_PATH_PROG(NASM, nasm)
+ fi
+ if test "x$NASM" != x -a "x$NASM" != x'"$NASM"'; then
+- AC_DEFINE(SDL_HERMES_BLITTERS)
++ AC_DEFINE(SDL_HERMES_BLITTERS,1,"")
+ SOURCES="$SOURCES $srcdir/src/hermes/*.asm"
+ if test x"$NASMFLAGS" = x; then
+ case $ARCH in
+@@ -713,9 +675,9 @@
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_altivec = xyes; then
+- AC_DEFINE(SDL_ALTIVEC_BLITTERS)
++ AC_DEFINE(SDL_ALTIVEC_BLITTERS,1,"")
+ if test x$have_altivec_h_hdr = xyes; then
+- AC_DEFINE(HAVE_ALTIVEC_H)
++ AC_DEFINE(HAVE_ALTIVEC_H,1,"")
+ fi
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
+ fi
+@@ -758,7 +720,7 @@
+
+ if test x$enable_ipod = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DIPOD"
+- AC_DEFINE(SDL_VIDEO_DRIVER_IPOD)
++ AC_DEFINE(SDL_VIDEO_DRIVER_IPOD,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/ipod/*.c"
+ fi
+ }
+@@ -792,7 +754,7 @@
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DENABLE_NANOX_DIRECT_FB"
+ fi
+
+- AC_DEFINE(SDL_VIDEO_DRIVER_NANOX)
++ AC_DEFINE(SDL_VIDEO_DRIVER_NANOX,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/nanox/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lnano-X"
+ have_video=yes
+@@ -881,7 +843,7 @@
+ CFLAGS="$CFLAGS $X_CFLAGS"
+ LDFLAGS="$LDFLAGS $X_LIBS"
+
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
+
+@@ -903,8 +865,8 @@
+ test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
+ echo "-- dynamic libX11 -> $x11_lib"
+ echo "-- dynamic libX11ext -> $x11ext_lib"
+- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib")
+- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib")
++ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib","")
++ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib","")
+ else
+ enable_x11_shared=no
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $X_LIBS -lX11 -lXext"
+@@ -921,20 +883,20 @@
+ AC_HELP_STRING([--enable-video-dga], [use DGA 2.0 video driver [[default=yes]]]),
+ , enable_video_dga=yes)
+ if test x$enable_dga = xyes -a x$enable_video_dga = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_DGA)
++ AC_DEFINE(SDL_VIDEO_DRIVER_DGA,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/dga/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-dgamouse,
+ AC_HELP_STRING([--enable-video-x11-dgamouse], [use X11 DGA for mouse events [[default=yes]]]),
+ , enable_video_x11_dgamouse=yes)
+ if test x$enable_dga = xyes -a x$enable_video_x11_dgamouse = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_DGAMOUSE)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_DGAMOUSE,1,"")
+ fi
+ AC_ARG_ENABLE(video-x11-vm,
+ AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
+ , enable_video_x11_vm=yes)
+ if test x$enable_video_x11_vm = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-xv,
+@@ -948,14 +910,14 @@
+ AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
+ , enable_video_x11_xinerama=yes)
+ if test x$enable_video_x11_xinerama = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-xme,
+ AC_HELP_STRING([--enable-video-x11-xme], [enable Xi Graphics XME for fullscreen [[default=yes]]]),
+ , enable_video_x11_xme=yes)
+ if test x$enable_video_x11_xme = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/Xext/XME/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-xrandr,
+@@ -972,8 +934,8 @@
+ if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
+ echo "-- dynamic libXrender -> $xrender_lib"
+ echo "-- dynamic libXrandr -> $xrandr_lib"
+- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib")
+- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib")
++ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib","")
++ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib","")
+ definitely_enable_video_x11_xrandr=yes
+ else
+ AC_CHECK_LIB(Xrender, XRenderQueryExtension, have_xrender_lib=yes)
+@@ -986,7 +948,7 @@
+ fi
+ fi
+ if test x$definitely_enable_video_x11_xrandr = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR,1,"")
+ fi
+ AC_ARG_ENABLE(video-x11-dpms,
+ AC_HELP_STRING([--enable-video-x11-dpms], [enable X11 DPMS extension [[default=yes]]]),
+@@ -998,7 +960,7 @@
+ [#include <X11/Xlib.h>
+ ])
+ if test x$have_dpms_h_hdr = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_X11_DPMS)
++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_DPMS,1,"")
+ fi
+ fi
+ fi
+@@ -1026,7 +988,7 @@
+ ])
+ AC_MSG_RESULT($video_photon)
+ if test x$video_photon = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON)
++ AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/photon/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lph"
+ have_video=yes
+@@ -1040,7 +1002,7 @@
+ CheckBWINDOW()
+ {
+ if test x$enable_video = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW)
++ AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc"
+ have_video=yes
+ fi
+@@ -1063,7 +1025,7 @@
+ ])
+ AC_MSG_RESULT($have_carbon)
+ if test x$have_carbon = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_TOOLBOX)
++ AC_DEFINE(SDL_VIDEO_DRIVER_TOOLBOX,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/maccommon/*.c"
+ SOURCES="$SOURCES $srcdir/src/video/macrom/*.c"
+ have_video=yes
+@@ -1092,7 +1054,7 @@
+ AC_MSG_RESULT($have_cocoa)
+ CFLAGS="$save_CFLAGS"
+ if test x$have_cocoa = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_QUARTZ)
++ AC_DEFINE(SDL_VIDEO_DRIVER_QUARTZ,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/quartz/*.m"
+ have_video=yes
+ fi
+@@ -1118,7 +1080,7 @@
+ ])
+ AC_MSG_RESULT($video_fbcon)
+ if test x$video_fbcon = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_FBCON)
++ AC_DEFINE(SDL_VIDEO_DRIVER_FBCON,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/fbcon/*.c"
+ have_video=yes
+ fi
+@@ -1163,7 +1125,7 @@
+ fi
+
+ if test x$video_directfb = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB)
++ AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS"
+@@ -1190,7 +1152,7 @@
+ ])
+ AC_MSG_RESULT($video_ps2gs)
+ if test x$video_ps2gs = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_PS2GS)
++ AC_DEFINE(SDL_VIDEO_DRIVER_PS2GS,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/ps2gs/*.c"
+ have_video=yes
+ fi
+@@ -1215,7 +1177,7 @@
+ ])
+ AC_MSG_RESULT($video_ggi)
+ if test x$video_ggi = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_GGI)
++ AC_DEFINE(SDL_VIDEO_DRIVER_GGI,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/ggi/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lggi -lgii -lgg"
+ have_video=yes
+@@ -1245,7 +1207,7 @@
+ ])
+ AC_MSG_RESULT($video_svga)
+ if test x$video_svga = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB)
++ AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/svga/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvga"
+ have_video=yes
+@@ -1277,7 +1239,7 @@
+ ])
+ AC_MSG_RESULT($video_vgl)
+ if test x$video_vgl = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_VGL)
++ AC_DEFINE(SDL_VIDEO_DRIVER_VGL,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/vgl/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvgl"
+ have_video=yes
+@@ -1305,7 +1267,7 @@
+ ])
+ AC_MSG_RESULT($video_wscons)
+ if test x$video_wscons = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_WSCONS)
++ AC_DEFINE(SDL_VIDEO_DRIVER_WSCONS,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/wscons/*.c"
+ have_video=yes
+ fi
+@@ -1330,7 +1292,7 @@
+ ])
+ AC_MSG_RESULT($video_aalib)
+ if test x$video_aalib = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_AALIB)
++ AC_DEFINE(SDL_VIDEO_DRIVER_AALIB,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/aalib/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laa"
+ have_video=yes
+@@ -1360,7 +1322,7 @@
+ CXXFLAGS="$OLD_CXX"
+ AC_MSG_RESULT($video_qtopia)
+ if test x$video_qtopia = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA)
++ AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/qtopia/*.cc"
+ SDLMAIN_SOURCES="$srcdir/src/main/qtopia/*.cc"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $QTOPIA_FLAGS"
+@@ -1389,7 +1351,7 @@
+ ])
+ AC_MSG_RESULT($video_picogui)
+ if test x$video_picogui = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_PICOGUI)
++ AC_DEFINE(SDL_VIDEO_DRIVER_PICOGUI,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/picogui/*.c"
+ SDL_LIBS="$SDL_LIBS -lpgui"
+ have_video=yes
+@@ -1413,7 +1375,7 @@
+ video_xbios=no
+ if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
+ video_xbios=yes
+- AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS)
++ AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/xbios/*.c"
+ have_video=yes
+ fi
+@@ -1431,7 +1393,7 @@
+ AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
+ if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
+ video_gem=yes
+- AC_DEFINE(SDL_VIDEO_DRIVER_GEM)
++ AC_DEFINE(SDL_VIDEO_DRIVER_GEM,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/gem/*.c"
+ SDL_LIBS="$SDL_LIBS -lgem"
+ have_video=yes
+@@ -1446,7 +1408,7 @@
+ AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
+ , enable_video_dummy=yes)
+ if test x$enable_video_dummy = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY)
++ AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
+ have_video=yes
+ fi
+@@ -1472,8 +1434,8 @@
+ ])
+ AC_MSG_RESULT($video_opengl)
+ if test x$video_opengl = xyes; then
+- AC_DEFINE(SDL_VIDEO_OPENGL)
+- AC_DEFINE(SDL_VIDEO_OPENGL_GLX)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
++ AC_DEFINE(SDL_VIDEO_OPENGL_GLX,1,"")
+ fi
+ fi
+ }
+@@ -1492,7 +1454,7 @@
+ ])
+ AC_MSG_RESULT($video_opengl)
+ if test x$video_opengl = xyes; then
+- AC_DEFINE(SDL_VIDEO_OPENGL)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
+ fi
+ fi
+@@ -1502,8 +1464,8 @@
+ CheckWIN32GL()
+ {
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+- AC_DEFINE(SDL_VIDEO_OPENGL)
+- AC_DEFINE(SDL_VIDEO_OPENGL_WGL)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
++ AC_DEFINE(SDL_VIDEO_OPENGL_WGL,1,"")
+ fi
+ }
+
+@@ -1511,7 +1473,7 @@
+ CheckBeGL()
+ {
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+- AC_DEFINE(SDL_VIDEO_OPENGL)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
+ fi
+ }
+@@ -1520,7 +1482,7 @@
+ CheckMacGL()
+ {
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+- AC_DEFINE(SDL_VIDEO_OPENGL)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
+ case "$host" in
+ *-*-darwin*)
+ if test x$enable_video_cocoa = xyes; then
+@@ -1552,8 +1514,8 @@
+ OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
+ OSMESA_LIBS=`$OSMESA_CONFIG --libs`
+ fi
+- AC_DEFINE(SDL_VIDEO_OPENGL)
+- AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA)
++ AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
++ AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA,1,"")
+ SDL_CFLAGS="$SDL_CFLAGS $OSMESA_CFLAGS"
+ SDL_LIBS="$SDL_LIBS $OSMESA_LIBS"
+
+@@ -1563,7 +1525,7 @@
+ if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then
+ # Dynamic linking
+ if test "x$have_osmesa_hdr" = "xyes"; then
+- AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC)
++ AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC,1,"")
+ fi
+ fi
+ fi
+@@ -1590,7 +1552,7 @@
+ ])
+ AC_MSG_RESULT($use_input_events)
+ if test x$use_input_events = xyes; then
+- AC_DEFINE(SDL_INPUT_LINUXEV)
++ AC_DEFINE(SDL_INPUT_LINUXEV,1,"")
+ fi
+ fi
+ }
+@@ -1612,7 +1574,7 @@
+ ])
+ AC_MSG_RESULT($enable_input_tslib)
+ if test x$enable_input_tslib = xyes; then
+- AC_DEFINE(SDL_INPUT_TSLIB)
++ AC_DEFINE(SDL_INPUT_TSLIB,1,"")
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
+ fi
+ fi
+@@ -1635,7 +1597,7 @@
+ AC_MSG_CHECKING(pth)
+ AC_MSG_RESULT($use_pth)
+ if test "x$use_pth" = xyes; then
+- AC_DEFINE(SDL_THREAD_PTH)
++ AC_DEFINE(SDL_THREAD_PTH,1,"")
+ SOURCES="$SOURCES $srcdir/src/thread/pth/*.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
+ SDL_CFLAGS="$SDL_CFLAGS `$PTH_CONFIG --cflags`"
+@@ -1741,7 +1703,7 @@
+
+ # Do futher testing if we have pthread support...
+ if test x$use_pthreads = xyes; then
+- AC_DEFINE(SDL_THREAD_PTHREAD)
++ AC_DEFINE(SDL_THREAD_PTHREAD,1,"")
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $pthread_cflags"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $pthread_lib"
+ SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
+@@ -1763,7 +1725,7 @@
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+ ],[
+ has_recursive_mutexes=yes
+- AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX)
++ AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX,1,"")
+ ])
+ fi
+ if test x$has_recursive_mutexes = xno; then
+@@ -1774,7 +1736,7 @@
+ pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+ ],[
+ has_recursive_mutexes=yes
+- AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP)
++ AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP,1,"")
+ ])
+ fi
+ AC_MSG_RESULT($has_recursive_mutexes)
+@@ -1849,7 +1811,7 @@
+ fi
+
+ if test x$enable_video = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB)
++ AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c"
+ SOURCES="$SOURCES $srcdir/src/video/windib/*.c"
+ have_video=yes
+@@ -1871,7 +1833,7 @@
+ have_directx=yes
+ fi
+ if test x$enable_video = xyes -a x$have_directx = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW)
++ AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/windx5/*.c"
+ have_video=yes
+ fi
+@@ -1904,9 +1866,9 @@
+ AC_CHECK_LIB(ltdl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl")))
+ AC_CHECK_LIB(dl, dlvsym, have_dlvsym=yes)
+ if test x$have_dlvsym = xyes; then
+- AC_DEFINE(HAVE_DLVSYM)
++ AC_DEFINE(HAVE_DLVSYM,1,"")
+ fi
+- AC_DEFINE(SDL_LOADSO_DLOPEN)
++ AC_DEFINE(SDL_LOADSO_DLOPEN,1,"")
+ SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
+ have_loadso=yes
+ fi
+@@ -1923,7 +1885,7 @@
+ AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
+ AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
+ if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
+- AC_DEFINE(SDL_LOADSO_LDG)
++ AC_DEFINE(SDL_LOADSO_LDG,1,"")
+ SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c"
+ SDL_LIBS="$SDL_LIBS -lldg -lgem"
+ have_loadso=yes
+@@ -2049,11 +2011,11 @@
+ have_machine_joystick=yes
+ ])
+ if test x$have_machine_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H)
++ AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H,1,"")
+ fi
+ AC_MSG_RESULT($have_machine_joystick)
+
+- AC_DEFINE(SDL_JOYSTICK_USBHID)
++ AC_DEFINE(SDL_JOYSTICK_USBHID,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $USB_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
+@@ -2072,7 +2034,7 @@
+ if test x$enable_clock_gettime = xyes; then
+ AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
+ if test x$have_clock_gettime = xyes; then
+- AC_DEFINE(HAVE_CLOCK_GETTIME)
++ AC_DEFINE(HAVE_CLOCK_GETTIME,1,"")
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
+ fi
+ fi
+@@ -2103,7 +2065,7 @@
+ CheckIPod
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_UNIX)
++ AC_DEFINE(SDL_TIMER_UNIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+@@ -2166,17 +2128,17 @@
+ if test x$enable_audio = xyes; then
+ case $ARCH in
+ sysv5|solaris|hpux)
+- AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
+ have_audio=yes
+ ;;
+ netbsd|openbsd)
+- AC_DEFINE(SDL_AUDIO_DRIVER_BSD)
++ AC_DEFINE(SDL_AUDIO_DRIVER_BSD,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
+ have_audio=yes
+ ;;
+ aix)
+- AC_DEFINE(SDL_AUDIO_DRIVER_PAUD)
++ AC_DEFINE(SDL_AUDIO_DRIVER_PAUD,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
+ have_audio=yes
+ ;;
+@@ -2186,7 +2148,7 @@
+ if test x$enable_joystick = xyes; then
+ case $ARCH in
+ linux)
+- AC_DEFINE(SDL_JOYSTICK_LINUX)
++ AC_DEFINE(SDL_JOYSTICK_LINUX,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
+ have_joystick=yes
+ ;;
+@@ -2196,32 +2158,32 @@
+ if test x$enable_cdrom = xyes; then
+ case $ARCH in
+ linux|solaris)
+- AC_DEFINE(SDL_CDROM_LINUX)
++ AC_DEFINE(SDL_CDROM_LINUX,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/linux/*.c"
+ have_cdrom=yes
+ ;;
+ *freebsd*)
+- AC_DEFINE(SDL_CDROM_FREEBSD)
++ AC_DEFINE(SDL_CDROM_FREEBSD,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/freebsd/*.c"
+ have_cdrom=yes
+ ;;
+ *openbsd*|*netbsd*)
+- AC_DEFINE(SDL_CDROM_OPENBSD)
++ AC_DEFINE(SDL_CDROM_OPENBSD,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/openbsd/*.c"
+ have_cdrom=yes
+ ;;
+ bsdi)
+- AC_DEFINE(SDL_CDROM_BSDI)
++ AC_DEFINE(SDL_CDROM_BSDI,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/bsdi/*.c"
+ have_cdrom=yes
+ ;;
+ aix)
+- AC_DEFINE(SDL_CDROM_AIX)
++ AC_DEFINE(SDL_CDROM_AIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/aix/*.c"
+ have_cdrom=yes
+ ;;
+ osf)
+- AC_DEFINE(SDL_CDROM_OSF)
++ AC_DEFINE(SDL_CDROM_OSF,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/osf/*.c"
+ have_cdrom=yes
+ ;;
+@@ -2229,7 +2191,7 @@
+ fi
+ # Set up files for the thread library
+ if test x$enable_threads = xyes -a x$use_pthreads != xyes -a x$use_pth != xyes -a x$ARCH = xirix; then
+- AC_DEFINE(SDL_THREAD_SPROC)
++ AC_DEFINE(SDL_THREAD_SPROC,1,"")
+ SOURCES="$SOURCES $srcdir/src/thread/irix/*.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
+@@ -2237,7 +2199,7 @@
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_UNIX)
++ AC_DEFINE(SDL_TIMER_UNIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+@@ -2256,20 +2218,20 @@
+ CheckPTHREAD
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/nto/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lasound"
+ have_audio=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_QNX)
++ AC_DEFINE(SDL_CDROM_QNX,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/qnx/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_UNIX)
++ AC_DEFINE(SDL_TIMER_UNIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+@@ -2294,29 +2256,29 @@
+ CheckNASM
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
++ AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
+ if test x$have_directx = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
++ AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
+ fi
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_WINMM)
++ AC_DEFINE(SDL_JOYSTICK_WINMM,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/win32/*.c"
+ have_joystick=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_WIN32)
++ AC_DEFINE(SDL_CDROM_WIN32,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/win32/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the thread library
+ if test x$enable_threads = xyes; then
+- AC_DEFINE(SDL_THREAD_WIN32)
++ AC_DEFINE(SDL_THREAD_WIN32,1,"")
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_sysmutex.c"
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_syssem.c"
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_systhread.c"
+@@ -2325,13 +2287,13 @@
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_WIN32)
++ AC_DEFINE(SDL_TIMER_WIN32,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/win32/*.c"
+ have_timers=yes
+ fi
+ # Set up files for the shared object loading library
+ if test x$enable_loadso = xyes; then
+- AC_DEFINE(SDL_LOADSO_WIN32)
++ AC_DEFINE(SDL_LOADSO_WIN32,1,"")
+ SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c"
+ have_loadso=yes
+ fi
+@@ -2356,25 +2318,25 @@
+ CheckBeGL
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc"
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_BEOS)
++ AC_DEFINE(SDL_JOYSTICK_BEOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
+ have_joystick=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_BEOS)
++ AC_DEFINE(SDL_CDROM_BEOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/beos/*.cc"
+ have_cdrom=yes
+ fi
+ # Set up files for the thread library
+ if test x$enable_threads = xyes; then
+- AC_DEFINE(SDL_THREAD_BEOS)
++ AC_DEFINE(SDL_THREAD_BEOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/thread/beos/*.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
+@@ -2382,13 +2344,13 @@
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_BEOS)
++ AC_DEFINE(SDL_TIMER_BEOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
+ have_timers=yes
+ fi
+ # Set up files for the shared object loading library
+ if test x$enable_loadso = xyes; then
+- AC_DEFINE(SDL_LOADSO_BEOS)
++ AC_DEFINE(SDL_LOADSO_BEOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
+ have_loadso=yes
+ fi
+@@ -2425,7 +2387,7 @@
+ # Set up files for the shared object loading library
+ # (this needs to be done before the dynamic X11 check)
+ if test x$enable_loadso = xyes -a x$have_dlopen != xyes; then
+- AC_DEFINE(SDL_LOADSO_DLCOMPAT)
++ AC_DEFINE(SDL_LOADSO_DLCOMPAT,1,"")
+ SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c"
+ have_loadso=yes
+ fi
+@@ -2443,28 +2405,28 @@
+
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c"
+- AC_DEFINE(SDL_AUDIO_DRIVER_SNDMGR)
++ AC_DEFINE(SDL_AUDIO_DRIVER_SNDMGR,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/macrom/*.c"
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_IOKIT)
++ AC_DEFINE(SDL_JOYSTICK_IOKIT,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
+ have_joystick=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_MACOSX)
++ AC_DEFINE(SDL_CDROM_MACOSX,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/macosx/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_UNIX)
++ AC_DEFINE(SDL_TIMER_UNIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+@@ -2500,30 +2462,30 @@
+ # Set up files for the audio library
+ if test x$enable_threads = xyes -a x$enable_pth = xyes; then
+ if test x$enable_audio = xyes; then
+- AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
++ AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO,1,"")
+ SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
+ have_audio=yes
+ fi
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_MINT)
++ AC_DEFINE(SDL_JOYSTICK_MINT,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/mint/*.c"
+ have_joystick=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_MINT)
++ AC_DEFINE(SDL_CDROM_MINT,1,"")
+ SOURCES="$SOURCES $srcdir/src/cdrom/mint/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ if test x$enable_threads = xyes -a x$enable_pth = xyes; then
+- AC_DEFINE(SDL_TIMER_UNIX)
++ AC_DEFINE(SDL_TIMER_UNIX,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ else
+- AC_DEFINE(SDL_TIMER_MINT)
++ AC_DEFINE(SDL_TIMER_MIN,1,""T)
+ SOURCES="$SOURCES $srcdir/src/timer/mint/*.c"
+ SOURCES="$SOURCES $srcdir/src/timer/mint/*.S"
+ fi
+@@ -2536,20 +2498,20 @@
+ CheckPTHREAD
+ # Set up files for the video library
+ if test x$enable_video = xyes; then
+- AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS)
++ AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/video/riscos/*.c"
+ SOURCES="$SOURCES $srcdir/src/video/riscos/*.S"
+ have_video=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_RISCOS)
++ AC_DEFINE(SDL_JOYSTICK_RISCOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/joystick/riscos/*.c"
+ have_joystick=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMER_RISCOS)
++ AC_DEFINE(SDL_TIMER_RISCOS,1,"")
+ SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c"
+ have_timers=yes
+ fi
+@@ -2566,31 +2528,31 @@
+ # Verify that we have all the platform specific files we need
+ if test x$have_joystick != xyes; then
+ if test x$enable_joystick = xyes; then
+- AC_DEFINE(SDL_JOYSTICK_DISABLED)
++ AC_DEFINE(SDL_JOYSTICK_DISABLED,1,"")
+ fi
+ SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
+ fi
+ if test x$have_cdrom != xyes; then
+ if test x$enable_cdrom = xyes; then
+- AC_DEFINE(SDL_CDROM_DISABLED)
++ AC_DEFINE(SDL_CDROM_DISABLED,1,"")
+ fi
+ SOURCES="$SOURCES $srcdir/src/cdrom/dummy/*.c"
+ fi
+ if test x$have_threads != xyes; then
+ if test x$enable_threads = xyes; then
+- AC_DEFINE(SDL_THREADS_DISABLED)
++ AC_DEFINE(SDL_THREADS_DISABLED,1,"")
+ fi
+ SOURCES="$SOURCES $srcdir/src/thread/generic/*.c"
+ fi
+ if test x$have_timers != xyes; then
+ if test x$enable_timers = xyes; then
+- AC_DEFINE(SDL_TIMERS_DISABLED)
++ AC_DEFINE(SDL_TIMERS_DISABLED,1,"")
+ fi
+ SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
+ fi
+ if test x$have_loadso != xyes; then
+ if test x$enable_loadso = xyes; then
+- AC_DEFINE(SDL_LOADSO_DISABLED)
++ AC_DEFINE(SDL_LOADSO_DISABLED,1,"")
+ fi
+ SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
+ fi
diff --git a/recipes/libsdl/files/directfb_obsolete_calls.patch b/recipes/libsdl/files/directfb_obsolete_calls.patch
new file mode 100644
index 0000000000..f3f422cde3
--- /dev/null
+++ b/recipes/libsdl/files/directfb_obsolete_calls.patch
@@ -0,0 +1,33 @@
+--- tmp/work/armv5te-angstrom-linux-gnueabi/libsdl-directfb-1.2.9-r1/SDL-1.2.9/src/video/directfb/SDL_DirectFB_video.c 2007-02-18 11:40:38.000000000 -0500
++++ SDL/src/video/directfb/SDL_DirectFB_video.c 2007-02-18 11:00:07.000000000 -0500
+@@ -376,7 +376,7 @@
+ {
+ int i;
+ DFBResult ret;
+- DFBCardCapabilities caps;
++ DFBGraphicsDeviceDescription caps;
+ DFBDisplayLayerConfig dlc;
+ struct DirectFBEnumRect *rect;
+ IDirectFB *dfb = NULL;
+@@ -448,7 +448,7 @@
+
+
+ /* Query card capabilities to get the video memory size */
+- dfb->GetCardCapabilities (dfb, &caps);
++ dfb->GetDeviceDescription (dfb, &caps);
+
+ this->info.wm_available = 1;
+ this->info.hw_available = 1;
+diff -u'rNF^function' tmp/work/armv5te-angstrom-linux-gnueabi/libsdl-directfb-1.2.9-r1/SDL-1.2.9/src/video/directfb/SDL_Direct
+/SDL_DirectFB_events.c
+--- tmp/work/armv5te-angstrom-linux-gnueabi/libsdl-directfb-1.2.9-r1/SDL-1.2.9/src/video/directfb/SDL_DirectFB_events.c 2004-0
++++ SDL/src/video/directfb/SDL_DirectFB_events.c 2007-02-18 11:00:07.000000000 -0500
+@@ -161,7 +161,7 @@
+ keymap[DIKI_SHIFT_L - DIKI_UNKNOWN] = SDLK_LSHIFT;
+ keymap[DIKI_SHIFT_R - DIKI_UNKNOWN] = SDLK_RSHIFT;
+ keymap[DIKI_ALT_L - DIKI_UNKNOWN] = SDLK_LALT;
+- keymap[DIKI_ALTGR - DIKI_UNKNOWN] = SDLK_RALT;
++ keymap[DIKI_ALT_R - DIKI_UNKNOWN] = SDLK_RALT;
+ keymap[DIKI_TAB - DIKI_UNKNOWN] = SDLK_TAB;
+ keymap[DIKI_ENTER - DIKI_UNKNOWN] = SDLK_RETURN;
+ keymap[DIKI_SPACE - DIKI_UNKNOWN] = SDLK_SPACE;
diff --git a/recipes/libsdl/files/explicit-extern-C.patch b/recipes/libsdl/files/explicit-extern-C.patch
new file mode 100644
index 0000000000..3dd44bea27
--- /dev/null
+++ b/recipes/libsdl/files/explicit-extern-C.patch
@@ -0,0 +1,22 @@
+--- SDL-1.2.9-orig/src/video/SDL_sysvideo.h.org 2005-04-17 10:40:41.000000000 +0000
++++ SDL-1.2.9-orig/src/video/SDL_sysvideo.h 2007-05-25 07:34:38.000000000 +0000
+@@ -332,6 +332,9 @@
+ SDL_VideoDevice *(*create)(int devindex);
+ } VideoBootStrap;
+
++#ifdef __cplusplus
++extern "C" {
++#endif
+ #ifdef ENABLE_X11
+ extern VideoBootStrap X11_bootstrap;
+ #endif
+@@ -417,6 +420,9 @@
+ #ifdef ENABLE_RISCOS
+ extern VideoBootStrap RISCOS_bootstrap;
+ #endif
++#ifdef __cplusplus
++};
++#endif
+ /* This is the current video device */
+ extern SDL_VideoDevice *current_video;
+
diff --git a/recipes/libsdl/files/extra-keys.patch b/recipes/libsdl/files/extra-keys.patch
new file mode 100644
index 0000000000..f12f0c7efb
--- /dev/null
+++ b/recipes/libsdl/files/extra-keys.patch
@@ -0,0 +1,53 @@
+diff -upr --exclude=configure --exclude=Makefile --exclude=Makefile.in libsdl1.2-1.2.4/include/SDL_keysym.h libsdl1.2-1.2.4-arm/include/SDL_keysym.h
+--- libsdl1.2-1.2.4/include/SDL_keysym.h 2002-03-06 11:23:01.000000000 +0000
++++ libsdl1.2-1.2.4-arm/include/SDL_keysym.h 2002-11-08 20:43:09.000000000 +0000
+@@ -286,6 +286,12 @@ typedef enum {
+ SDLK_EURO = 321, /* Some european keyboards */
+ SDLK_UNDO = 322, /* Atari keyboard has Undo */
+
++ SDLK_RECORD = 322,
++ SDLK_CALENDAR = 323,
++ SDLK_TELEPHONE = 324,
++ SDLK_MAIL = 325,
++ SDLK_START = 326,
++
+ /* Add any other keys here */
+
+ SDLK_LAST
+diff -upr --exclude=configure --exclude=Makefile --exclude=Makefile.in libsdl1.2-1.2.4/src/video/x11/SDL_x11events.c libsdl1.2-1.2.4-arm/src/video/x11/SDL_x11events.c
+--- libsdl1.2-1.2.4/src/video/x11/SDL_x11events.c 2002-03-06 11:23:08.000000000 +0000
++++ libsdl1.2-1.2.4-arm/src/video/x11/SDL_x11events.c 2002-11-08 21:01:41.000000000 +0000
+@@ -34,6 +34,7 @@ static char rcsid =
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include <X11/keysym.h>
++#include <X11/XF86keysym.h>
+ #ifdef __SVR4
+ #include <X11/Sunkeysym.h>
+ #endif
+@@ -655,6 +656,25 @@ SDL_keysym *X11_TranslateKey(Display *di
+ case 0xFF:
+ keysym->sym = MISC_keymap[xsym&0xFF];
+ break;
++ case 0x1008ff:
++ switch (xsym) {
++ case XF86XK_AudioRecord:
++ keysym->sym = SDLK_RECORD;
++ break;
++ case XF86XK_PowerDown:
++ keysym->sym = SDLK_POWER;
++ break;
++ case XF86XK_Calendar:
++ keysym->sym = SDLK_CALENDAR;
++ break;
++ case XF86XK_Mail:
++ keysym->sym = SDLK_MAIL;
++ break;
++ case XF86XK_Start:
++ keysym->sym = SDLK_START;
++ break;
++ }
++ break;
+ default:
+ fprintf(stderr,
+ "X11: Unknown xsym, sym = 0x%04x\n",
diff --git a/recipes/libsdl/files/fixlibs-1.2.9.patch b/recipes/libsdl/files/fixlibs-1.2.9.patch
new file mode 100644
index 0000000000..ebc6ec7769
--- /dev/null
+++ b/recipes/libsdl/files/fixlibs-1.2.9.patch
@@ -0,0 +1,27 @@
+diff -Naur SDL-1.2.9-orig/configure.in SDL-1.2.9/configure.in
+--- SDL-1.2.9-orig/configure.in 2007-03-12 20:56:23.000000000 +0100
++++ SDL-1.2.9/configure.in 2007-03-12 20:59:28.000000000 +0100
+@@ -1593,8 +1593,8 @@
+ AC_MSG_RESULT($video_qtopia)
+ if test x$video_qtopia = xyes; then
+ CFLAGS="$CFLAGS -DENABLE_QTOPIA -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG -fno-rtti -fno-exceptions"
+- SDL_LIBS="$SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
+- SDL_CFLAGS="$SDL_CFLAGS -DQWS"
++ SDL_LIBS="$SDL_LIBS -Wl,-rpath-link -Wl,${QPEDIR}/lib -Wl,-rpath-link -Wl,${QTDIR}/lib"
++ SYSTEM_LIBS="$SYSTEM_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte-mt"
+ VIDEO_SUBDIRS="$VIDEO_SUBDIRS qtopia"
+ VIDEO_DRIVERS="$VIDEO_DRIVERS qtopia/libvideo_qtopia.la"
+ else
+@@ -1908,12 +1908,6 @@
+ CheckAltivec
+ CheckLinuxVersion
+ CheckRPATH
+-
+- # Set up files for the main() stub
+- if test "x$video_qtopia" = "xyes"; then
+- SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
+-
+- fi
+ # Set up files for the audio library
+ # We use the OSS and ALSA API's, not the Sun audio API
+ #if test x$enable_audio = xyes; then
diff --git a/recipes/libsdl/files/fixmfour.patch b/recipes/libsdl/files/fixmfour.patch
new file mode 100644
index 0000000000..0d534bd9a1
--- /dev/null
+++ b/recipes/libsdl/files/fixmfour.patch
@@ -0,0 +1,14 @@
+Index: SDL-1.2.11/sdl.m4
+===================================================================
+--- SDL-1.2.11.orig/sdl.m4 2008-10-18 21:20:13.482478928 +0200
++++ SDL-1.2.11/sdl.m4 2008-10-18 21:20:28.979441480 +0200
+@@ -32,9 +32,6 @@
+ fi
+ fi
+
+- if test "x$prefix" != xNONE; then
+- PATH="$prefix/bin:$prefix/usr/bin:$PATH"
+- fi
+ AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
+ min_sdl_version=ifelse([$1], ,0.11.0,$1)
+ AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
diff --git a/recipes/libsdl/files/kernel-asm-page.patch b/recipes/libsdl/files/kernel-asm-page.patch
new file mode 100644
index 0000000000..42bceadfdc
--- /dev/null
+++ b/recipes/libsdl/files/kernel-asm-page.patch
@@ -0,0 +1,13 @@
+diff --git a/src/video/Xext/Xxf86dga/XF86DGA.c b/src/video/Xext/Xxf86dga/XF86DGA.c
+index 4e3d662..de38a3c 100644
+--- a/src/video/Xext/Xxf86dga/XF86DGA.c
++++ b/src/video/Xext/Xxf86dga/XF86DGA.c
+@@ -18,7 +18,7 @@ Copyright (c) 1995,1996 The XFree86 Project, Inc
+ #define HAS_MMAP_ANON
+ #include <sys/types.h>
+ #include <sys/mman.h>
+-#include <asm/page.h> /* PAGE_SIZE */
++#include <unistd.h>
+ #define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */
+ #define HAS_GETPAGESIZE
+ #endif /* linux */
diff --git a/recipes/libsdl/files/kill-stdc++-1.2.9.patch b/recipes/libsdl/files/kill-stdc++-1.2.9.patch
new file mode 100644
index 0000000000..884cb2191c
--- /dev/null
+++ b/recipes/libsdl/files/kill-stdc++-1.2.9.patch
@@ -0,0 +1,422 @@
+diff -Naur SDL-1.2.9-orig/acinclude.m4 SDL-1.2.9/acinclude.m4
+--- SDL-1.2.9-orig/acinclude.m4 2004-08-24 08:32:50.000000000 +0200
++++ SDL-1.2.9/acinclude.m4 2007-03-12 20:57:08.000000000 +0100
+@@ -1473,11 +1473,11 @@
+ case $host_os in
+ aix3*)
+ version_type=linux
+- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
++ library_names_spec='${libname}${release}${shrext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+- soname_spec='${libname}${release}${shared_ext}$major'
++ soname_spec='${libname}${release}${shrext}$major'
+ ;;
+
+ aix4* | aix5*)
+@@ -1487,7 +1487,7 @@
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
++ library_names_spec='${libname}${release}${shrext}$major ${libname}${release}${shrext}$versuffix $libname${shrext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+@@ -1513,12 +1513,12 @@
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ soname_spec='${libname}${release}${shrext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+@@ -1531,7 +1531,7 @@
+ ;;
+
+ beos*)
+- library_names_spec='${libname}${shared_ext}'
++ library_names_spec='${libname}${shrext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+@@ -1539,8 +1539,8 @@
+ bsdi[[45]]*)
+ version_type=linux
+ need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+@@ -1573,14 +1573,14 @@
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+- #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+- soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
++ #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shrext}'
++ soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shrext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+- #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+- soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
++ #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shrext}'
++ soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shrext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+@@ -1596,13 +1596,13 @@
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
++ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shrext}'
+ ;;
+ esac
+ ;;
+
+ *)
+- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
++ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shrext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+@@ -1615,8 +1615,8 @@
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+- soname_spec='${libname}${release}${major}$shared_ext'
++ library_names_spec='${libname}${release}${versuffix}$shrext ${libname}${release}${major}$shrext ${libname}$shrext'
++ soname_spec='${libname}${release}${major}$shrext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+@@ -1633,8 +1633,8 @@
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname$shrext'
++ soname_spec='${libname}${release}${shrext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+@@ -1646,8 +1646,8 @@
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major ${libname}${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+@@ -1659,12 +1659,12 @@
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext} $libname${shrext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
++ library_names_spec='${libname}${release}${shrext}$versuffix $libname${shrext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+@@ -1688,8 +1688,8 @@
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}${major} ${libname}${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+@@ -1707,8 +1707,8 @@
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+@@ -1722,8 +1722,8 @@
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+@@ -1732,8 +1732,8 @@
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+@@ -1752,8 +1752,8 @@
+ esac
+ need_lib_prefix=no
+ need_version=no
+- soname_spec='${libname}${release}${shared_ext}$major'
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
++ soname_spec='${libname}${release}${shrext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major ${libname}${release}${shrext} $libname${shrext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+@@ -1787,8 +1787,8 @@
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+@@ -1816,8 +1816,8 @@
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major ${libname}${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+@@ -1829,12 +1829,12 @@
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${shrext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major ${libname}${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+@@ -1844,7 +1844,7 @@
+
+ newsos6)
+ version_type=linux
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+@@ -1853,8 +1853,8 @@
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+@@ -1863,7 +1863,7 @@
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${shrext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+@@ -1884,7 +1884,7 @@
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+- library_names_spec='$libname${shared_ext} $libname.a'
++ library_names_spec='$libname${shrext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+@@ -1893,8 +1893,8 @@
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+- soname_spec='${libname}${release}${shared_ext}$major'
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shrext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+@@ -1902,8 +1902,8 @@
+
+ sco3.2v5*)
+ version_type=osf
+- soname_spec='${libname}${release}${shared_ext}$major'
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
++ soname_spec='${libname}${release}${shrext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+@@ -1911,8 +1911,8 @@
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+@@ -1922,7 +1922,7 @@
+
+ sunos4*)
+ version_type=sunos
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${shrext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+@@ -1934,8 +1934,8 @@
+
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ version_type=linux
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+@@ -1959,16 +1959,16 @@
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+- soname_spec='$libname${shared_ext}.$major'
++ library_names_spec='$libname${shrext}.$versuffix $libname${shrext}.$major $libname${shrext}'
++ soname_spec='$libname${shrext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+ uts4*)
+ version_type=linux
+- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+- soname_spec='${libname}${release}${shared_ext}$major'
++ library_names_spec='${libname}${release}${shrext}$versuffix ${libname}${release}${shrext}$major $libname${shrext}'
++ soname_spec='${libname}${release}${shrext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+@@ -3471,8 +3471,8 @@
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
++ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shrext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
++ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shrext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+@@ -3481,7 +3481,7 @@
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
++ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shrext 2>&1 | grep "ld"`; rm -f libconftest$shrext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+@@ -3585,7 +3585,7 @@
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
++ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shrext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+@@ -3645,7 +3645,7 @@
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
++ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shrext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+@@ -4596,7 +4596,7 @@
+ # Whether we need a single -rpath flag with a separated argument.
+ hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+
+-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
++# Set to yes if using DIR/libNAME${shrext} during linking hardcodes DIR into the
+ # resulting binary.
+ hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+
+diff -Naur SDL-1.2.9-orig/src/main/Makefile.am SDL-1.2.9/src/main/Makefile.am
+--- SDL-1.2.9-orig/src/main/Makefile.am 2007-03-12 20:56:23.000000000 +0100
++++ SDL-1.2.9/src/main/Makefile.am 2007-03-12 20:57:08.000000000 +0100
+@@ -46,3 +46,9 @@
+ (cd $(distdir) && rm -f $(BUILT_SOURCES))
+ cp -rp $(ARCH_SUBDIRS) $(distdir)
+ (cd $(distdir) && rm -rf `find . -name CVS`)
++
++# overwrite USER variables
++CXXLD = $(CC)
++CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
++ $(AM_LDFLAGS) $(LDFLAGS) -o $@
++
+diff -Naur SDL-1.2.9-orig/src/video/qtopia/Makefile.am SDL-1.2.9/src/video/qtopia/Makefile.am
+--- SDL-1.2.9-orig/src/video/qtopia/Makefile.am 2007-03-12 20:56:23.000000000 +0100
++++ SDL-1.2.9/src/video/qtopia/Makefile.am 2007-03-12 20:57:08.000000000 +0100
+@@ -17,3 +17,9 @@
+ SDL_sysevents.cc \
+ SDL_sysevents_c.h \
+ SDL_qmain.cc
++
++
++# overwrite USER variables
++CXXLD = $(CC)
++CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
++ $(AM_LDFLAGS) $(LDFLAGS) -o $@
diff --git a/recipes/libsdl/files/pagesize.patch b/recipes/libsdl/files/pagesize.patch
new file mode 100644
index 0000000000..ea9ea9849b
--- /dev/null
+++ b/recipes/libsdl/files/pagesize.patch
@@ -0,0 +1,15 @@
+Remove obsolete non-portable macro.
+
+Index: SDL-1.2.9/src/video/fbcon/SDL_fbvideo.c
+===================================================================
+--- SDL-1.2.9.orig/src/video/fbcon/SDL_fbvideo.c
++++ SDL-1.2.9/src/video/fbcon/SDL_fbvideo.c
+@@ -405,7 +405,7 @@ static int FB_VideoInit(_THIS, SDL_Pixel
+
+ /* Memory map the device, compensating for buggy PPC mmap() */
+ mapped_offset = (((long)finfo.smem_start) -
+- (((long)finfo.smem_start)&~(PAGE_SIZE-1)));
++ (((long)finfo.smem_start)&~(getpagesize()-1)));
+ mapped_memlen = finfo.smem_len+mapped_offset;
+ mapped_mem = mmap(NULL, mapped_memlen,
+ PROT_READ|PROT_WRITE, MAP_SHARED, console_fd, 0);
diff --git a/recipes/libsdl/files/pygame-1.2.9.patch b/recipes/libsdl/files/pygame-1.2.9.patch
new file mode 100644
index 0000000000..4073de25bf
--- /dev/null
+++ b/recipes/libsdl/files/pygame-1.2.9.patch
@@ -0,0 +1,191 @@
+diff -Naur SDL-1.2.9-orig/configure.in SDL-1.2.9/configure.in
+--- SDL-1.2.9-orig/configure.in 2005-08-28 08:31:18.000000000 +0200
++++ SDL-1.2.9/configure.in 2007-03-12 20:55:18.000000000 +0100
+@@ -1912,7 +1912,7 @@
+ # Set up files for the main() stub
+ if test "x$video_qtopia" = "xyes"; then
+ SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
+- SDL_LIBS="-lSDLmain $SDL_LIBS"
++
+ fi
+ # Set up files for the audio library
+ # We use the OSS and ALSA API's, not the Sun audio API
+diff -Naur SDL-1.2.9-orig/src/main/Makefile.am SDL-1.2.9/src/main/Makefile.am
+--- SDL-1.2.9-orig/src/main/Makefile.am 2004-02-12 07:21:13.000000000 +0100
++++ SDL-1.2.9/src/main/Makefile.am 2007-03-12 20:55:18.000000000 +0100
+@@ -21,11 +21,7 @@
+ if TARGET_MACOSX
+ MAINLIB_ARCH_SRCS = macosx/SDLMain.m macosx/SDLMain.h
+ else
+-if TARGET_QTOPIA
+-MAINLIB_ARCH_SRCS = qtopia/SDL_qtopia_main.cc
+-else
+ MAINLIB_ARCH_SRCS = dummy/SDL_dummy_main.c
+-endif # !TARGET_QTOPIA
+ endif # !TARGET_MACOSX
+ endif # !TARGET_WIN32
+ libSDLmain_a_SOURCES = $(MAINLIB_ARCH_SRCS)
+diff -Naur SDL-1.2.9-orig/src/main/qtopia/SDL_qtopia_main.cc SDL-1.2.9/src/main/qtopia/SDL_qtopia_main.cc
+--- SDL-1.2.9-orig/src/main/qtopia/SDL_qtopia_main.cc 2003-12-14 07:25:53.000000000 +0100
++++ SDL-1.2.9/src/main/qtopia/SDL_qtopia_main.cc 1970-01-01 01:00:00.000000000 +0100
+@@ -1,47 +0,0 @@
+-
+-/* Include the SDL main definition header */
+-#include "SDL_main.h"
+-#include <stdlib.h>
+-#include <unistd.h>
+-#ifdef main
+-#undef main
+-#endif
+-#ifdef QWS
+-#include <qpe/qpeapplication.h>
+-#include <qapplication.h>
+-#include <qpe/qpeapplication.h>
+-#include <stdlib.h>
+-
+-// Workaround for OPIE to remove taskbar icon. Also fixes
+-// some issues in Qtopia where there are left-over qcop files in /tmp/.
+-// I'm guessing this will also clean up the taskbar in the Sharp version
+-// of Qtopia.
+-static inline void cleanupQCop() {
+- QString appname(qApp->argv()[0]);
+- int slash = appname.findRev("/");
+- if(slash != -1) { appname = appname.mid(slash+1); }
+- QString cmd = QPEApplication::qpeDir() + "bin/qcop QPE/System 'closing(QString)' '"+appname+"'";
+- system(cmd.latin1());
+- cmd = "/tmp/qcop-msg-"+appname;
+- unlink(cmd.latin1());
+-}
+-
+-static QPEApplication *app;
+-#endif
+-
+-extern int SDL_main(int argc, char *argv[]);
+-
+-int main(int argc, char *argv[])
+-{
+-#ifdef QWS
+- // This initializes the Qtopia application. It needs to be done here
+- // because it parses command line options.
+- app = new QPEApplication(argc, argv);
+- QWidget dummy;
+- app->showMainWidget(&dummy);
+- atexit(cleanupQCop);
+-#endif
+- // Exit here because if return is used, the application
+- // doesn't seem to quit correctly.
+- exit(SDL_main(argc, argv));
+-}
+diff -Naur SDL-1.2.9-orig/src/video/qtopia/Makefile.am SDL-1.2.9/src/video/qtopia/Makefile.am
+--- SDL-1.2.9-orig/src/video/qtopia/Makefile.am 2002-05-28 21:24:11.000000000 +0200
++++ SDL-1.2.9/src/video/qtopia/Makefile.am 2007-03-12 20:55:18.000000000 +0100
+@@ -15,4 +15,5 @@
+ SDL_syswm.cc \
+ SDL_syswm_c.h \
+ SDL_sysevents.cc \
+- SDL_sysevents_c.h
++ SDL_sysevents_c.h \
++ SDL_qmain.cc
+diff -Naur SDL-1.2.9-orig/src/video/qtopia/SDL_qmain.cc SDL-1.2.9/src/video/qtopia/SDL_qmain.cc
+--- SDL-1.2.9-orig/src/video/qtopia/SDL_qmain.cc 1970-01-01 01:00:00.000000000 +0100
++++ SDL-1.2.9/src/video/qtopia/SDL_qmain.cc 2007-03-12 20:55:18.000000000 +0100
+@@ -0,0 +1,99 @@
++/* Include the SDL main definition header */
++#include "SDL_main.h"
++#include <stdlib.h>
++
++#include <sys/types.h>
++#include <fcntl.h>
++#include <unistd.h>
++
++
++#ifdef QWS
++#include <qpe/qpeapplication.h>
++#include <stdlib.h>
++#include <string.h>
++
++
++
++static QWidget *dummyW = 0;
++static QPEApplication *theApp = 0;
++static char **cmdline= 0;
++static int size = 0;
++
++static void parse_cmd_line() {
++ /*
++ * find the number
++ */
++ char buf[1024];
++ int available = 0;
++ char *string_start = 0;
++ int fd = ::open( "/proc/self/cmdline", O_RDONLY );
++ if ( fd < 0 ) {
++ qWarning( "Error getting the cmdline, can't be" );
++ goto error_out;
++ }
++
++ available = ::read( fd, &buf, sizeof(buf) );
++ if ( available <= 0 )
++ goto error_out;
++
++ /*
++ * find out the number of arguments
++ */
++ size = 0;
++ for (int i = 0; i < available; ++i )
++ if ( buf[i] == '\0' )
++ ++size;
++
++ /* now create a the cmdline */
++ cmdline = new char*[size+1];
++ cmdline[size] = '\0'; // parnoid...
++
++ string_start = &buf[0];
++ for ( int i = 0; i < size; ++i ) {
++ /*
++ * find the end of the string
++ */
++ size_t sz = ::strlen(string_start);
++ cmdline[i] = new char[sz+1];
++ memcpy( cmdline[i], string_start, sz+1 );
++ string_start += (sz+1); // +1 for '\0' +1 to set it beyond
++ }
++
++ ::close(fd);
++
++ return;
++
++/* error code */
++error_out:
++ cmdline = new char*[2];
++ cmdline[0] = "unknown_app";
++ cmdline[1] = '\0';
++ size = 1;
++}
++
++static void free_cmd_line() {
++ /*
++ * free each string and then free the array
++ */
++ for ( int i = 0; i < size; ++i )
++ delete [] cmdline[i];
++
++ delete [] cmdline;
++}
++
++static void __attribute__((constructor)) initialize_qpe_app() {
++ parse_cmd_line();
++
++ theApp = new QPEApplication( size, cmdline );
++ dummyW = new QWidget;
++ theApp->showMainWidget(dummyW);
++}
++
++static void __attribute__((destructor)) deinitialize_qpe_app() {
++ free_cmd_line();
++ delete dummyW;
++ delete theApp;
++}
++
++
++#endif
diff --git a/recipes/libsdl/files/remove_path.patch b/recipes/libsdl/files/remove_path.patch
new file mode 100644
index 0000000000..f5bee40bbd
--- /dev/null
+++ b/recipes/libsdl/files/remove_path.patch
@@ -0,0 +1,18 @@
+OE goes to great lengths to set PATH correctly and this just breaks
+things since local sdl-config binaries will suddenly be preferred
+rather than those in staging.
+
+RP - 27/02/2008
+
+Index: SDL-1.2.9/sdl.m4
+===================================================================
+--- SDL-1.2.9.orig/sdl.m4 2008-02-27 10:08:38.000000000 +0000
++++ SDL-1.2.9/sdl.m4 2008-02-27 10:08:51.000000000 +0000
+@@ -33,7 +33,6 @@
+ fi
+
+ AC_REQUIRE([AC_CANONICAL_TARGET])
+- PATH="$prefix/bin:$prefix/usr/bin:$PATH"
+ AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
+ min_sdl_version=ifelse([$1], ,0.11.0,$1)
+ AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
diff --git a/recipes/libsdl/files/sdl-cdfix.patch b/recipes/libsdl/files/sdl-cdfix.patch
new file mode 100644
index 0000000000..a6a36483d4
--- /dev/null
+++ b/recipes/libsdl/files/sdl-cdfix.patch
@@ -0,0 +1,11 @@
+--- /tmp/SDL_syscdrom.c 2008-08-11 21:56:58.000000000 +0200
++++ SDL-1.2.11/src/cdrom/linux/SDL_syscdrom.c 2008-08-11 21:57:07.813198000 +0200
+@@ -51,6 +51,8 @@
+ #ifdef __SVR4
+ #include <sys/cdio.h>
+ #endif
++#include <linux/cdrom.h>
++
+
+ /* Define this to use the alternative getmntent() code */
+ #ifndef __SVR4