summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2017-08-13 18:12:06 -0700
committerSam Lantinga <slouken@libsdl.org>2017-08-13 18:12:06 -0700
commitde3717509a4edeb6768e8a1fb1ae71a4920627f1 (patch)
tree58ea9a14fa057e94092123e7c8b38cfea43c22cb /configure
parent447d9971644c6f35c9d2581d17c39b28b1cca087 (diff)
Fixed bug 2812 - Make libSDL2main.a usable on Android via a dummy symbol
Jonas Kulla This eliminates the need to manually compile in SDL_main_android.c. Instead, add "-lSDL2main -Wl,-u,SDL_main_dummy" when linking. I don't know how the nkd-build process works, but unless it was for some reason linking libSDL2main.a it should be unaffected.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure b/configure
index 6c9bebda8c..f8ee03db3a 100755
--- a/configure
+++ b/configure
@@ -23555,8 +23555,10 @@ case "$host" in
ANDROID_CFLAGS="-DGL_GLEXT_PROTOTYPES"
CFLAGS="$CFLAGS $ANDROID_CFLAGS"
SDL_CFLAGS="$SDL_CFLAGS $ANDROID_CFLAGS"
+ SDL_LIBS="$SDL_LIBS -lSDL2main -Wl,-u,SDL_main_dummy"
EXTRA_CFLAGS="$EXTRA_CFLAGS $ANDROID_CFLAGS"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl -lGLESv1_CM -lGLESv2 -llog -landroid"
+ SDLMAIN_SOURCES="$srcdir/src/main/android/*.c"
if test x$enable_video = xyes; then
SOURCES="$SOURCES $srcdir/src/core/android/*.c $srcdir/src/video/android/*.c"