check for HAVE_ROAPI_H in cmake and autotools, and update SDL_config_windows.h and SDL_config_winrt.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6ca97b7..b0dce6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1600,6 +1600,7 @@ elseif(WINDOWS)
# headers needed elsewhere
check_include_file(tpcshrd.h HAVE_TPCSHRD_H)
+ check_include_file(roapi.h HAVE_ROAPI_H)
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
check_include_file(sensorsapi.h HAVE_SENSORSAPI_H)
diff --git a/configure b/configure
index 7611d78..3bf0e00 100755
--- a/configure
+++ b/configure
@@ -24779,6 +24779,30 @@ $as_echo "$have_wince" >&6; }
# This fixes Windows stack alignment with newer GCC
CheckStackBoundary
+
+ # headers needed elsewhere
+ ac_fn_c_check_header_mongrel "$LINENO" "tpcshrd.h" "ac_cv_header_tpcshrd_h" "$ac_includes_default"
+if test "x$ac_cv_header_tpcshrd_h" = xyes; then :
+ have_tpcshrd_h=yes
+fi
+
+
+ if test x$have_tpcshrd_h = xyes; then
+
+$as_echo "#define HAVE_TPCSHRD_H 1" >>confdefs.h
+
+ fi
+ ac_fn_c_check_header_mongrel "$LINENO" "roapi.h" "ac_cv_header_roapi_h" "$ac_includes_default"
+if test "x$ac_cv_header_roapi_h" = xyes; then :
+ have_roapi_h=yes
+fi
+
+
+ if test x$have_roapi_h = xyes; then
+
+$as_echo "#define HAVE_ROAPI_H 1" >>confdefs.h
+
+ fi
}
CheckOS2()
@@ -26255,17 +26279,6 @@ $as_echo "#define SDL_HAPTIC_DINPUT 1" >>confdefs.h
have_haptic=yes
fi
fi
- ac_fn_c_check_header_mongrel "$LINENO" "tpcshrd.h" "ac_cv_header_tpcshrd_h" "$ac_includes_default"
-if test "x$ac_cv_header_tpcshrd_h" = xyes; then :
- have_tpcshrd_h=yes
-fi
-
-
- if test x$have_tpcshrd_h = xyes; then
-
-$as_echo "#define HAVE_TPCSHRD_H 1" >>confdefs.h
-
- fi
# Set up files for the sensor library
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 :
diff --git a/configure.ac b/configure.ac
index 1d96004..117715c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3198,6 +3198,16 @@ CheckWINDOWS()
# This fixes Windows stack alignment with newer GCC
CheckStackBoundary
+
+ # headers needed elsewhere
+ AC_CHECK_HEADER(tpcshrd.h,have_tpcshrd_h=yes)
+ if test x$have_tpcshrd_h = xyes; then
+ AC_DEFINE(HAVE_TPCSHRD_H, 1, [ ])
+ fi
+ AC_CHECK_HEADER(roapi.h,have_roapi_h=yes)
+ if test x$have_roapi_h = xyes; then
+ AC_DEFINE(HAVE_ROAPI_H, 1, [ ])
+ fi
}
dnl Determine whether the compiler can produce OS/2 executables
@@ -3999,10 +4009,6 @@ case "$host" in
have_haptic=yes
fi
fi
- AC_CHECK_HEADER(tpcshrd.h,have_tpcshrd_h=yes)
- if test x$have_tpcshrd_h = xyes; then
- AC_DEFINE(HAVE_TPCSHRD_H, 1, [ ])
- fi
# Set up files for the sensor library
AC_CHECK_HEADER(sensorsapi.h,have_winsensors=yes,have_winsensors=no)
if test x$have_winsensors = xyes; then
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index f82b0a2..fcd18e5 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
@@ -253,6 +253,7 @@
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
#cmakedefine HAVE_TPCSHRD_H @HAVE_TPCSHRD_H@
#cmakedefine HAVE_SENSORSAPI_H @HAVE_SENSORSAPI_H@
+#cmakedefine HAVE_ROAPI_H @HAVE_ROAPI_H@
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index 195b988..f912e41 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -242,6 +242,7 @@
#undef HAVE_AUDIOCLIENT_H
#undef HAVE_TPCSHRD_H
#undef HAVE_SENSORSAPI_H
+#undef HAVE_ROAPI_H
/* SDL internal assertion support */
#undef SDL_DEFAULT_ASSERT_LEVEL
diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h
index efb246d..770b190 100644
--- a/include/SDL_config_windows.h
+++ b/include/SDL_config_windows.h
@@ -104,6 +104,7 @@ typedef unsigned int uintptr_t;
#endif
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0602 /* Windows 8 SDK */
#define HAVE_D3D11_H 1
+#define HAVE_ROAPI_H 1
#endif
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
diff --git a/include/SDL_config_winrt.h b/include/SDL_config_winrt.h
index c548fd6..f3901a5 100644
--- a/include/SDL_config_winrt.h
+++ b/include/SDL_config_winrt.h
@@ -195,6 +195,8 @@ typedef unsigned int uintptr_t;
#define HAVE_TRUNCF 1
#define HAVE__FSEEKI64 1
+#define HAVE_ROAPI_H 1
+
/* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_WASAPI 1
#define SDL_AUDIO_DRIVER_DISK 1