Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation

Jonas Kulla

The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c.

I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
This commit is contained in:
Philipp Wiesemann 2015-01-26 22:00:29 +01:00
parent d2aee7d409
commit 1419eb12a4
3 changed files with 26 additions and 5 deletions

15
configure vendored
View file

@ -23091,11 +23091,22 @@ $as_echo "#define SDL_POWER_ANDROID 1" >>confdefs.h
fi
# Set up files for the filesystem library
if test x$enable_filesystem = xyes; then
case $ARCH in
linux)
$as_echo "#define SDL_FILESYSTEM_UNIX 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/filesystem/unix/*.c"
have_filesystem=yes
SOURCES="$SOURCES $srcdir/src/filesystem/unix/*.c"
have_filesystem=yes
;;
android)
$as_echo "#define SDL_FILESYSTEM_ANDROID 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/filesystem/android/*.c"
have_filesystem=yes
;;
esac
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then

View file

@ -2971,9 +2971,18 @@ case "$host" in
fi
# Set up files for the filesystem library
if test x$enable_filesystem = xyes; then
AC_DEFINE(SDL_FILESYSTEM_UNIX, 1, [ ])
SOURCES="$SOURCES $srcdir/src/filesystem/unix/*.c"
have_filesystem=yes
case $ARCH in
linux)
AC_DEFINE(SDL_FILESYSTEM_UNIX, 1, [ ])
SOURCES="$SOURCES $srcdir/src/filesystem/unix/*.c"
have_filesystem=yes
;;
android)
AC_DEFINE(SDL_FILESYSTEM_ANDROID, 1, [ ])
SOURCES="$SOURCES $srcdir/src/filesystem/android/*.c"
have_filesystem=yes
;;
esac
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then

View file

@ -349,6 +349,7 @@
#undef SDL_FILESYSTEM_UNIX
#undef SDL_FILESYSTEM_WINDOWS
#undef SDL_FILESYSTEM_NACL
#undef SDL_FILESYSTEM_ANDROID
#undef SDL_FILESYSTEM_EMSCRIPTEN
/* Enable assembly routines */