Allow haptic subsystem to build on mac. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Tue, 22 Jul 2008 10:58:27 +0000
branchgsoc2008_force_feedback
changeset 2545 0e63e7e4a986
parent 2544 2a61a38dd138
child 2546 daf40497dcd4
Allow haptic subsystem to build on mac.
configure.in
include/SDL_config.h.in
--- a/configure.in	Tue Jul 22 10:51:24 2008 +0000
+++ b/configure.in	Tue Jul 22 10:58:27 2008 +0000
@@ -2472,6 +2472,13 @@
             SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
             have_joystick=yes
         fi
+        # Set up files for the haptic library
+        if test x$enable_haptic = xyes; then
+            AC_DEFINE(SDL_HAPTIC_IOKIT)
+            SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
+            have_haptic=yes
+            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
+        fi
         # Set up files for the cdrom library
         if test x$enable_cdrom = xyes; then
             AC_DEFINE(SDL_CDROM_MACOSX)
--- a/include/SDL_config.h.in	Tue Jul 22 10:51:24 2008 +0000
+++ b/include/SDL_config.h.in	Tue Jul 22 10:58:27 2008 +0000
@@ -218,6 +218,7 @@
 #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
 #undef SDL_HAPTIC_DUMMY
 #undef SDL_HAPTIC_LINUX
+#undef SDL_HAPTIC_IOKIT
 
 /* Enable various shared object loading systems */
 #undef SDL_LOADSO_BEOS