Fixed building without linux/input.h

https://github.com/libsdl-org/SDL/issues/6169
This commit is contained in:
Sam Lantinga
2022-11-11 10:24:17 -08:00
parent b7e65a81f1
commit 9f8b68a278
12 changed files with 39 additions and 19 deletions

16
configure vendored
View File

@@ -18816,6 +18816,12 @@ if test "x$ac_cv_header_signal_h" = xyes
then :
printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h
fi
ac_fn_c_check_header_compile "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_input_h" = xyes
then :
printf "%s\n" "#define HAVE_LINUX_INPUT_H 1" >>confdefs.h
fi
@@ -28492,15 +28498,17 @@ printf "%s\n" "#define SDL_AUDIO_DRIVER_AAUDIO 1" >>confdefs.h
if test x$enable_joystick = xyes; then
case $ARCH in
linux)
if test "x$ac_cv_header_linux_input_h" = xyes; then
printf "%s\n" "#define SDL_JOYSTICK_LINUX 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
have_joystick=yes
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
printf "%s\n" "#define SDL_JOYSTICK_LINUX 1" >>confdefs.h