summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan C. Gordon <icculus@icculus.org>2007-04-04 10:28:14 +0000
committerRyan C. Gordon <icculus@icculus.org>2007-04-04 10:28:14 +0000
commitc85ed2520f159c085e6622f6ff88b22a92059066 (patch)
tree0e4ba56e0415b254f88d34411a1f69b414c95a38
parent6069261c7f2899dcc5942239cf96e3d8712ba8a8 (diff)
downloadsdl-c85ed2520f159c085e6622f6ff88b22a92059066.tar.gz
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.
-rw-r--r--configure.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index c2a2ff325..4ac580c40 100644
--- a/configure.in
+++ b/configure.in
@@ -196,7 +196,6 @@ SOURCES="$SOURCES $srcdir/src/cdrom/*.c"
SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
SOURCES="$SOURCES $srcdir/src/events/*.c"
SOURCES="$SOURCES $srcdir/src/file/*.c"
-SOURCES="$SOURCES $srcdir/src/joystick/*.c"
SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
SOURCES="$SOURCES $srcdir/src/thread/*.c"
SOURCES="$SOURCES $srcdir/src/timer/*.c"
@@ -215,6 +214,8 @@ AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
, enable_video=yes)
if test x$enable_video != xyes; then
AC_DEFINE(SDL_VIDEO_DISABLED)
+else
+ SOURCES="$SOURCES $srcdir/src/joystick/*.c"
fi
AC_ARG_ENABLE(events,
AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
@@ -2576,6 +2577,7 @@ esac
if test x$enable_joystick = xyes; then
if test x$have_joystick != xyes; then
# Wants joystick subsystem, but doesn't have a platform-specific backend...
+ AC_DEFINE(SDL_JOYSTICK_DUMMY)
SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
fi
fi