mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-04 14:24:57 +08:00
Fixed building without linux/input.h
https://github.com/libsdl-org/SDL/issues/6169
This commit is contained in:
+8
-6
@@ -329,7 +329,7 @@ if test x$enable_libc = xyes; then
|
||||
dnl Check for C library headers
|
||||
dnl AC_CHECK_INCLUDES_DEFAULT is an autoconf-2.7x thing where AC_HEADER_STDC is deprecated.
|
||||
m4_ifdef([AC_CHECK_INCLUDES_DEFAULT], [AC_CHECK_INCLUDES_DEFAULT], [AC_HEADER_STDC])
|
||||
AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h wchar.h inttypes.h stdint.h limits.h ctype.h math.h float.h iconv.h signal.h)
|
||||
AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h wchar.h inttypes.h stdint.h limits.h ctype.h math.h float.h iconv.h signal.h linux/input.h)
|
||||
|
||||
dnl Check for typedefs, structures, etc.
|
||||
AC_TYPE_SIZE_T
|
||||
@@ -3900,13 +3900,15 @@ case "$host" in
|
||||
if test x$enable_joystick = xyes; then
|
||||
case $ARCH in
|
||||
linux)
|
||||
AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
|
||||
have_joystick=yes
|
||||
if test "x$ac_cv_header_linux_input_h" = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
|
||||
have_joystick=yes
|
||||
fi
|
||||
;;
|
||||
freebsd)
|
||||
if test x$use_input_events = xyes; then
|
||||
if test x$use_input_events = xyes -a x$ac_cv_header_linux_input_h = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
|
||||
|
||||
Reference in New Issue
Block a user