Commit a198a2d8 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Don't compile the joystick code if --disable-joystick is specified at

 ./configure time, and define SDL_JOYSTICK_DUMMY if the subsystem is wanted
 but there aren't any drivers available for the platform.

 Fixes Bugzilla #403.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402300
parent 3ce0d260
...@@ -196,7 +196,6 @@ SOURCES="$SOURCES $srcdir/src/cdrom/*.c" ...@@ -196,7 +196,6 @@ SOURCES="$SOURCES $srcdir/src/cdrom/*.c"
SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c" SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
SOURCES="$SOURCES $srcdir/src/events/*.c" SOURCES="$SOURCES $srcdir/src/events/*.c"
SOURCES="$SOURCES $srcdir/src/file/*.c" SOURCES="$SOURCES $srcdir/src/file/*.c"
SOURCES="$SOURCES $srcdir/src/joystick/*.c"
SOURCES="$SOURCES $srcdir/src/stdlib/*.c" SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
SOURCES="$SOURCES $srcdir/src/thread/*.c" SOURCES="$SOURCES $srcdir/src/thread/*.c"
SOURCES="$SOURCES $srcdir/src/timer/*.c" SOURCES="$SOURCES $srcdir/src/timer/*.c"
...@@ -215,6 +214,8 @@ AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]), ...@@ -215,6 +214,8 @@ AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
, enable_video=yes) , enable_video=yes)
if test x$enable_video != xyes; then if test x$enable_video != xyes; then
AC_DEFINE(SDL_VIDEO_DISABLED) AC_DEFINE(SDL_VIDEO_DISABLED)
else
SOURCES="$SOURCES $srcdir/src/joystick/*.c"
fi fi
AC_ARG_ENABLE(events, AC_ARG_ENABLE(events,
AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]), AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
...@@ -2576,6 +2577,7 @@ esac ...@@ -2576,6 +2577,7 @@ esac
if test x$enable_joystick = xyes; then if test x$enable_joystick = xyes; then
if test x$have_joystick != xyes; then if test x$have_joystick != xyes; then
# Wants joystick subsystem, but doesn't have a platform-specific backend... # Wants joystick subsystem, but doesn't have a platform-specific backend...
AC_DEFINE(SDL_JOYSTICK_DUMMY)
SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c" SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
fi fi
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment