build: fix / update sensors (windows) configuration

- SDL_config.h.in: add missing defines SDL_SENSOR_COREMOTION
  and SDL_SENSOR_WINDOWS (configure did set SDL_SENSOR_WINDOWS
  but it never went in SDL_config.h or Makefile.)
- SDL_config.h.cmake: remove duplicated SDL_SENSOR_XXX cmake
  defines.
- autofoo, cmake: check for sensorsapi.h header before enabling
  windows sensors.
This commit is contained in:
Ozkan Sezer
2020-10-12 01:02:28 +03:00
parent 10eb5108b6
commit 196cda69f2
6 changed files with 29 additions and 9 deletions

15
configure vendored
View File

@@ -24965,7 +24965,20 @@ $as_echo "#define SDL_HAPTIC_DINPUT 1" >>confdefs.h
fi
fi
# Set up files for the sensor library
if test x$enable_sensor = xyes; then
ac_fn_c_check_header_mongrel "$LINENO" "sensorsapi.h" "ac_cv_header_sensorsapi_h" "$ac_includes_default"
if test "x$ac_cv_header_sensorsapi_h" = xyes; then :
have_winsensors=yes
else
have_winsensors=no
fi
if test x$have_winsensors = xyes; then
$as_echo "#define HAVE_SENSORSAPI_H 1" >>confdefs.h
fi
if test x$enable_sensor = xyes -a x$have_winsensors = xyes; then
$as_echo "#define SDL_SENSOR_WINDOWS 1" >>confdefs.h