| Summary: | Dummy joystick driver not compiled in for Unix platforms which are not Linux | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Patrice Mandin <patmandin> |
| Component: | joystick | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | laurent |
| Version: | 1.2.11 | ||
| Hardware: | Other | ||
| OS: | Solaris | ||
Oops, latest phrase finish is "so dummy joystick driver will *NOT* be compiled". Fixed in svn revision #2897 for 1.3 branch and svn revision #2898 for 1.2 branch. Thanks, --ryan. |
--Some part of configure.in-- AC_ARG_ENABLE(joystick, AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]), , enable_joystick=yes) if test x$enable_joystick != xyes; then AC_DEFINE(SDL_JOYSTICK_DISABLED) fi [snip] /* For all Unix-like, be it Linux, Bsd, Solaris, ... */ if test x$enable_joystick = xyes; then case $ARCH in linux) AC_DEFINE(SDL_JOYSTICK_LINUX) SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c" have_joystick=yes ;; esac fi [snip] if test x$have_joystick != xyes; then if test x$enable_joystick = xyes; then AC_DEFINE(SDL_JOYSTICK_DISABLED) fi SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c" fi -- In src/joystick/dummy/SDL_sysjoystick.c #if defined(SDL_JOYSTICK_DUMMY) || defined(SDL_JOYSTICK_DISABLED) /* dummy joystick support */ #endif By default, we have --enable-joystick, which sets enable_joystick=yes. Only Linux has joystick support, so have_joystick=no. In the latest test, SDL_JOYSTICK_DISABLED is not defined (enable_joystick=yes), and SDL_JOYSTICK_DUMMY is not defined anywhere in configure.in, so dummy joystick driver will be compiled.