Skip to content

Commit

Permalink
Fixed bug 5335 - Patch: enable joystick/haptic/evdev support by defau…
Browse files Browse the repository at this point in the history
…lt 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.
  • Loading branch information
slouken committed Nov 24, 2020
1 parent 1e943e2 commit 34bea84
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 23 deletions.
42 changes: 32 additions & 10 deletions configure
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -24604,7 +24616,6 @@ $as_echo "#define SDL_JOYSTICK_VIRTUAL 1" >>confdefs.h
fi
}


CheckWarnAll
CheckNoStrictAliasing

Expand Down Expand Up @@ -24683,6 +24694,7 @@ case "$host" in
CheckLibUDev
CheckDBus
CheckIME
CheckInotify
CheckIBus
CheckFcitx
case $ARCH in
Expand Down Expand Up @@ -24750,14 +24762,24 @@ $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

SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
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
Expand Down
File renamed without changes.
14 changes: 1 addition & 13 deletions test/configure
Expand Up @@ -640,7 +640,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -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}'
Expand Down Expand Up @@ -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=* \
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 34bea84

Please sign in to comment.