configure.in
changeset 2713 0906692aa6a4
parent 2710 44e49d3fa6cf
child 2714 1d1be6137875
     1.1 --- a/configure.in	Mon Aug 25 08:50:37 2008 +0000
     1.2 +++ b/configure.in	Mon Aug 25 09:55:03 2008 +0000
     1.3 @@ -235,6 +235,14 @@
     1.4  else
     1.5      SOURCES="$SOURCES $srcdir/src/joystick/*.c"
     1.6  fi
     1.7 +AC_ARG_ENABLE(haptic,
     1.8 +AC_HELP_STRING([--enable-haptic], [Enable the haptic (force feedback) subsystem [[default=yes]]]),
     1.9 +              , enable_haptic=yes)
    1.10 +if test x$enable_haptic != xyes; then
    1.11 +    AC_DEFINE(SDL_HAPTIC_DISABLED)
    1.12 +else
    1.13 +    SOURCES="$SOURCES $srcdir/src/haptic/*.c"
    1.14 +fi
    1.15  AC_ARG_ENABLE(cdrom,
    1.16  AC_HELP_STRING([--enable-cdrom], [Enable the cdrom subsystem [[default=yes]]]),
    1.17                , enable_cdrom=yes)
    1.18 @@ -2179,6 +2187,18 @@
    1.19              ;;
    1.20            esac
    1.21          fi
    1.22 +        # Set up files for the haptic library
    1.23 +        if test x$enable_haptic = xyes; then
    1.24 +           if test x$use_input_events = xyes; then
    1.25 +             case $ARCH in
    1.26 +               linux)
    1.27 +                   AC_DEFINE(SDL_HAPTIC_LINUX)
    1.28 +                   SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c"
    1.29 +                   have_haptic=yes
    1.30 +               ;;
    1.31 +             esac
    1.32 +           fi
    1.33 +        fi
    1.34          # Set up files for the cdrom library
    1.35          if test x$enable_cdrom = xyes; then
    1.36            case $ARCH in
    1.37 @@ -2316,6 +2336,13 @@
    1.38              fi
    1.39              have_joystick=yes
    1.40          fi
    1.41 +        if test x$enable_haptic = xyes; then
    1.42 +            if test x$have_dinput = xyes; then
    1.43 +                AC_DEFINE(SDL_HAPTIC_DINPUT)
    1.44 +                SOURCES="$SOURCES $srcdir/src/haptic/win32/SDL_syshaptic.c"
    1.45 +                have_haptic=yes
    1.46 +            fi
    1.47 +        fi
    1.48          # Set up files for the cdrom library
    1.49          if test x$enable_cdrom = xyes; then
    1.50              AC_DEFINE(SDL_CDROM_WIN32)
    1.51 @@ -2457,6 +2484,13 @@
    1.52              SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
    1.53              have_joystick=yes
    1.54          fi
    1.55 +        # Set up files for the haptic library
    1.56 +        if test x$enable_haptic = xyes; then
    1.57 +            AC_DEFINE(SDL_HAPTIC_IOKIT)
    1.58 +            SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
    1.59 +            have_haptic=yes
    1.60 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
    1.61 +        fi
    1.62          # Set up files for the cdrom library
    1.63          if test x$enable_cdrom = xyes; then
    1.64              AC_DEFINE(SDL_CDROM_MACOSX)
    1.65 @@ -2565,6 +2599,12 @@
    1.66      SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
    1.67    fi
    1.68  fi
    1.69 +if test x$have_haptic != xyes; then
    1.70 +    if test x$enable_haptic = xyes; then
    1.71 +        AC_DEFINE(SDL_HAPTIC_DISABLED)
    1.72 +    fi
    1.73 +    SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c"
    1.74 +fi
    1.75  if test x$have_cdrom != xyes; then
    1.76      if test x$enable_cdrom = xyes; then
    1.77          AC_DEFINE(SDL_CDROM_DISABLED)