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.
This commit is contained in:
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 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() CheckIBus()
{ {
# Check whether --enable-ibus was given. # Check whether --enable-ibus was given.
@ -23097,14 +23117,6 @@ else
fi 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" CFLAGS="$save_CFLAGS"
if test x$have_ibus_ibus_h_hdr = xyes; then if test x$have_ibus_ibus_h_hdr = xyes; then
if test x$enable_ime != xyes; then if test x$enable_ime != xyes; then
@ -24604,7 +24616,6 @@ $as_echo "#define SDL_JOYSTICK_VIRTUAL 1" >>confdefs.h
fi fi
} }
CheckWarnAll CheckWarnAll
CheckNoStrictAliasing CheckNoStrictAliasing
@ -24683,6 +24694,7 @@ case "$host" in
CheckLibUDev CheckLibUDev
CheckDBus CheckDBus
CheckIME CheckIME
CheckInotify
CheckIBus CheckIBus
CheckFcitx CheckFcitx
case $ARCH in case $ARCH in
@ -24750,7 +24762,7 @@ $as_echo "#define SDL_AUDIO_DRIVER_ANDROID 1" >>confdefs.h
# Set up files for the joystick library # Set up files for the joystick library
if test x$enable_joystick = xyes; then if test x$enable_joystick = xyes; then
case $ARCH in case $ARCH in
linux|freebsd) linux)
$as_echo "#define SDL_JOYSTICK_LINUX 1" >>confdefs.h $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" SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
have_joystick=yes 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) android)
$as_echo "#define SDL_JOYSTICK_ANDROID 1" >>confdefs.h $as_echo "#define SDL_JOYSTICK_ANDROID 1" >>confdefs.h

14
test/configure vendored
View File

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