There are several subsystems that need IOKit linked in on Mac OS X, so handle SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Wed, 04 Apr 2007 10:34:42 +0000
branchSDL-1.2
changeset 393500959c391aa6
parent 3934 f8cc7c7ccf95
child 3936 c5c3c772f5aa
There are several subsystems that need IOKit linked in on Mac OS X, so handle
cases where one or more of them are disabled.
configure.in
     1.1 --- a/configure.in	Wed Apr 04 10:30:07 2007 +0000
     1.2 +++ b/configure.in	Wed Apr 04 10:34:42 2007 +0000
     1.3 @@ -2462,8 +2462,8 @@
     1.4          if test x$enable_joystick = xyes; then
     1.5              AC_DEFINE(SDL_JOYSTICK_IOKIT)
     1.6              SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
     1.7 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
     1.8              have_joystick=yes
     1.9 +            need_iokit_framework=yes
    1.10          fi
    1.11          # Set up files for the cdrom library
    1.12          if test x$enable_cdrom = xyes; then
    1.13 @@ -2483,6 +2483,7 @@
    1.14          SDL_LIBS="-lSDLmain $SDL_LIBS"
    1.15          if test x$enable_video_cocoa = xyes; then
    1.16              EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
    1.17 +            need_iokit_framework=yes
    1.18          fi
    1.19          if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then
    1.20              # The Cocoa backend still needs Carbon, and the YUV code QuickTime
    1.21 @@ -2493,6 +2494,10 @@
    1.22          if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then
    1.23              EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
    1.24          fi
    1.25 +        # Some subsystems reference IOKit...
    1.26 +        if test x$need_iokit_framework = xyes; then
    1.27 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
    1.28 +        fi
    1.29          ;;
    1.30      *-*-mint*)
    1.31          ARCH=mint