changeset 3935:00959c391aa6 SDL-1.2

There are several subsystems that need IOKit linked in on Mac OS X, so handle cases where one or more of them are disabled.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 04 Apr 2007 10:34:42 +0000
parents f8cc7c7ccf95
children c5c3c772f5aa
files configure.in
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Wed Apr 04 10:30:07 2007 +0000
+++ b/configure.in	Wed Apr 04 10:34:42 2007 +0000
@@ -2462,8 +2462,8 @@
         if test x$enable_joystick = xyes; then
             AC_DEFINE(SDL_JOYSTICK_IOKIT)
             SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
-            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
             have_joystick=yes
+            need_iokit_framework=yes
         fi
         # Set up files for the cdrom library
         if test x$enable_cdrom = xyes; then
@@ -2483,6 +2483,7 @@
         SDL_LIBS="-lSDLmain $SDL_LIBS"
         if test x$enable_video_cocoa = xyes; then
             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
+            need_iokit_framework=yes
         fi
         if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then
             # The Cocoa backend still needs Carbon, and the YUV code QuickTime
@@ -2493,6 +2494,10 @@
         if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then
             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
         fi
+        # Some subsystems reference IOKit...
+        if test x$need_iokit_framework = xyes; then
+            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
+        fi
         ;;
     *-*-mint*)
         ARCH=mint