diff --git a/configure.in b/configure.in index 550e46681..318262a59 100644 --- a/configure.in +++ b/configure.in @@ -2084,6 +2084,7 @@ case "$target" in if test x$enable_joystick = xyes; then JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS darwin" JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS darwin/libjoystick_darwin.la" + SDL_LIBS="$SDL_LIBS -framework IOKit" fi # Set up files for the cdrom library if test x$enable_cdrom = xyes; then diff --git a/src/joystick/darwin/Makefile.am b/src/joystick/darwin/Makefile.am index 06093550f..97b646e8e 100644 --- a/src/joystick/darwin/Makefile.am +++ b/src/joystick/darwin/Makefile.am @@ -6,3 +6,5 @@ libjoystick_darwin_la_SOURCES = $(SRCS) # The SDL joystick driver sources SRCS = SDL_sysjoystick.c + +AM_CPPFLAGS = -no-cpp-precomp -I/System/Library/Frameworks/Kernel.framework/Headers/ diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c index 29f61fd58..8bffed83b 100644 --- a/src/joystick/darwin/SDL_sysjoystick.c +++ b/src/joystick/darwin/SDL_sysjoystick.c @@ -20,7 +20,7 @@ slouken@devolution.com */ -/* SDL joystick driver for Darwn / MacOS X, based on the IOKit HID API */ +/* SDL joystick driver for Darwin / MacOS X, based on the IOKit HID API */ /* Written 2001 by Max Horn */ #include @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include