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 356 - Dummy joystick driver not compiled in for Unix platforms which are not Linux
Summary: Dummy joystick driver not compiled in for Unix platforms which are not Linux
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 1.2.11
Hardware: Other Solaris
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
: 350 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-03 08:14 UTC by Patrice Mandin
Modified: 2007-02-12 06:57 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrice Mandin 2006-11-03 08:14:48 UTC
--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.
Comment 1 Patrice Mandin 2006-11-03 08:17:01 UTC
Oops, latest phrase finish is "so dummy joystick driver will *NOT* be compiled".
Comment 2 Ryan C. Gordon 2006-11-03 12:59:09 UTC
Fixed in svn revision #2897 for 1.3 branch and svn revision #2898 for 1.2 branch.

Thanks,
--ryan.

Comment 3 Ryan C. Gordon 2007-02-12 06:57:24 UTC
*** Bug 350 has been marked as a duplicate of this bug. ***