Fixed bug 5335 - Patch: enable joystick/haptic/evdev support by default on FreeBSD

Alex S

Ah, that's not quite enough. You need to:
  1. rename src/joystick/bsd/SDL_sysjoystick.c to something;
  2. regenerate configure.
Sam Lantinga 2020-11-23 23:03:55 -08:00
parent 1e943e2ad2
commit 34bea84a54
3 changed files with 33 additions and 23 deletions

42
configure vendored
View File

@ -23008,6 +23008,26 @@ $as_echo "#define SDL_USE_IME 1" >>confdefs.h
fi
}
CheckInotify()
{
ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
have_inotify_inotify_h_hdr=yes
fi
if test x$have_inotify_inotify_h_hdr = xyes; then
$as_echo "#define HAVE_INOTIFY_H 1" >>confdefs.h
case "$host" in
*-*-freebsd*)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -linotify"
;;
esac
fi
}
CheckIBus()
{
# Check whether --enable-ibus was given.
@ -23097,14 +23117,6 @@ else
fi
ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
have_inotify_inotify_h_hdr=yes
else
have_inotify_inotify_h_hdr=no
fi
CFLAGS="$save_CFLAGS"
if test x$have_ibus_ibus_h_hdr = xyes; then
if test x$enable_ime != xyes; then
@ -24604,7 +24616,6 @@ $as_echo "#define SDL_JOYSTICK_VIRTUAL 1" >>confdefs.h
fi
}
CheckWarnAll
CheckNoStrictAliasing
@ -24683,6 +24694,7 @@ case "$host" in
CheckLibUDev
CheckDBus
CheckIME
CheckInotify
CheckIBus
CheckFcitx
case $ARCH in
@ -24750,7 +24762,7 @@ $as_echo "#define SDL_AUDIO_DRIVER_ANDROID 1" >>confdefs.h
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
case $ARCH in
linux|freebsd)
linux)
$as_echo "#define SDL_JOYSTICK_LINUX 1" >>confdefs.h
@ -24758,6 +24770,16 @@ $as_echo "#define SDL_JOYSTICK_LINUX 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
have_joystick=yes
;;
freebsd)
if test x$use_input_events = xyes; then
$as_echo "#define SDL_JOYSTICK_LINUX 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
have_joystick=yes
fi
;;
android)
$as_echo "#define SDL_JOYSTICK_ANDROID 1" >>confdefs.h

14
test/configure vendored
View File

@ -640,7 +640,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
@ -721,7 +720,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
@ -974,15 +972,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@ -1120,7 +1109,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@ -1273,7 +1262,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]