We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1756

Summary: Mac OS X: Completely remove Carbon dependency.
Product: SDL Reporter: Ryan C. Gordon <icculus>
Component: buildAssignee: Ryan C. Gordon <icculus>
Status: ASSIGNED --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sdl-bugzilla
Version: HG 2.0   
Hardware: x86   
OS: Mac OS X (All)   
Bug Depends on: 3127    
Bug Blocks:    

Description Ryan C. Gordon 2013-03-15 01:51:36 UTC
The configure script on Mac OS X has this...

       EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_CARBON"

...do we still need that (and/or is it causing us compatibility problems)?

--ryan.
Comment 1 Ryan C. Gordon 2015-02-19 05:22:22 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though!
Comment 2 Ryan C. Gordon 2015-02-19 21:22:46 UTC
Ok, it builds fine without that #define, apparently, but we still actually link against Carbon in any case.

Here's where we still use it:

  "_KBGetLayoutType", referenced from:
      _Cocoa_HandleKeyEvent in SDL_cocoakeyboard.o
  "_LMGetKbdType", referenced from:
      _UpdateKeymap in SDL_cocoakeyboard.o
      _Cocoa_HandleKeyEvent in SDL_cocoakeyboard.o
  "_TISCopyCurrentKeyboardLayoutInputSource", referenced from:
      _UpdateKeymap in SDL_cocoakeyboard.o
  "_TISGetInputSourceProperty", referenced from:
      _UpdateKeymap in SDL_cocoakeyboard.o
  "_kTISPropertyUnicodeKeyLayoutData", referenced from:
      _UpdateKeymap in SDL_cocoakeyboard.o

...and here's where we still #include <Carbon/Carbon.h> ...

    src/video/cocoa/SDL_cocoakeyboard.m
    src/video/cocoa/SDL_cocoamodes.m

...so I'm leaving this alone for now, and removing the triage-2.0.4 tag, and renaming this bug "completely remove Carbon dependency."

--ryan.
Comment 3 Dominik Reichardt 2015-09-21 22:42:23 UTC
Add to this https://bugzilla.libsdl.org/show_bug.cgi?id=3127 which fixes a deprecated Carbon component dependency.