summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2020-11-24 07:22:29 -0800
committerSam Lantinga <slouken@libsdl.org>2020-11-24 07:22:29 -0800
commit8e95b97251fdab6f75a584982d7b4eff043e8b4e (patch)
tree1f21110a17127929f03173ddfec6aa0b8ece969e /configure.ac
parent7be21e1e89edf819516bb5c4c21f1e4913f803cf (diff)
downloadsdl-8e95b97251fdab6f75a584982d7b4eff043e8b4e.tar.gz
Enable -fobjc-weak when building MFI controller code
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index be7272491..5b357a0bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2801,7 +2801,7 @@ AS_HELP_STRING([--enable-joystick-mfi], [include macOS MFI joystick support [[de
if test x$enable_joystick_mfi = xyes; then
save_CFLAGS="$CFLAGS"
dnl Work around that we don't have Objective-C support in autoconf
- CFLAGS="$CFLAGS -x objective-c"
+ CFLAGS="$CFLAGS -x objective-c -fobjc-weak"
AC_MSG_CHECKING(for GameController framework)
enable_joystick_mfi=no
AC_TRY_COMPILE([
@@ -2823,6 +2823,7 @@ AS_HELP_STRING([--enable-joystick-mfi], [include macOS MFI joystick support [[de
AC_MSG_RESULT($enable_joystick_mfi)
if test x$enable_joystick_mfi = xyes; then
AC_DEFINE(SDL_JOYSTICK_MFI, 1, [ ])
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -fobjc-weak"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-weak_framework,CoreHaptics -Wl,-weak_framework,GameController"
fi
fi