add 'Misc' subsystem II.
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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
diff --git a/configure b/configure
index 5276429..f0f27a2 100755
--- a/configure
+++ b/configure
@@ -822,6 +822,7 @@ enable_filesystem
enable_threads
enable_timers
enable_file
+enable_misc
enable_loadso
enable_cpuinfo
enable_assembly
@@ -1599,6 +1600,7 @@ Optional Features:
--enable-threads Enable the threading subsystem [default=yes]
--enable-timers Enable the timer subsystem [default=yes]
--enable-file Enable the file subsystem [default=yes]
+ --enable-misc Enable the misc subsystem [default=yes]
--enable-loadso Enable the shared object loading subsystem
[default=yes]
--enable-cpuinfo Enable the cpuinfo subsystem [default=yes]
@@ -18100,6 +18102,20 @@ $as_echo "#define SDL_FILESYSTEM_DISABLED 1" >>confdefs.h
else
SUMMARY_modules="${SUMMARY_modules} filesystem"
fi
+# Check whether --enable-misc was given.
+if test "${enable_misc+set}" = set; then :
+ enableval=$enable_misc;
+else
+ enable_misc=yes
+fi
+
+if test x$enable_misc != xyes; then
+
+$as_echo "#define SDL_MISC_DISABLED 1" >>confdefs.h
+
+else
+ SUMMARY_modules="${SUMMARY_modules} misc"
+fi
# Check whether --enable-threads was given.
if test "${enable_threads+set}" = set; then :
enableval=$enable_threads;
@@ -25818,8 +25834,11 @@ $as_echo "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
CheckRPATH
CheckVivanteVideo
- SOURCES="$SOURCES $srcdir/src/misc/unix/*.c"
- have_misc=yes
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/unix/*.c"
+ have_misc=yes
+ fi
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
have_locale=yes
@@ -26035,8 +26054,11 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
# Set up the core platform files
SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
- SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
- have_misc=yes
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
+ have_misc=yes
+ fi
# Use the Windows locale APIs.
SOURCES="$SOURCES $srcdir/src/locale/windows/*.c"
have_locale=yes
@@ -26323,10 +26345,11 @@ $as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc"
have_filesystem=yes
fi
-
- SOURCES="$SOURCES $srcdir/src/misc/haiku/*.cc"
- have_misc=yes
-
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/haiku/*.cc"
+ have_misc=yes
+ fi
# Set up files for the locale library
SOURCES="$SOURCES $srcdir/src/locale/haiku/*.cc"
have_locale=yes
@@ -26350,9 +26373,11 @@ $as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h
CheckVulkan
CheckPTHREAD
- SOURCES="$SOURCES $srcdir/src/misc/ios/*.m"
- have_misc=yes
-
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/ios/*.m"
+ have_misc=yes
+ fi
# Set up files for the locale library
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
have_locale=yes
@@ -26484,9 +26509,11 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
CheckPTHREAD
CheckHIDAPI
- SOURCES="$SOURCES $srcdir/src/misc/macosx/*.m"
- have_misc=yes
-
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/macosx/*.m"
+ have_misc=yes
+ fi
# Set up files for the locale library
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
have_locale=yes
@@ -26673,9 +26700,11 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
CheckPTHREAD
CheckClockGettime
- SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
- have_misc=yes
-
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
+ have_misc=yes
+ fi
# Set up files for the video library
if test x$enable_video = xyes; then
diff --git a/configure.ac b/configure.ac
index b54e8b2..8b9388e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -527,6 +527,14 @@ if test x$enable_file != xyes; then
else
SUMMARY_modules="${SUMMARY_modules} file"
fi
+AC_ARG_ENABLE(misc,
+[AS_HELP_STRING([--enable-misc], [Enable the misc subsystem [default=yes]])],
+ , enable_misc=yes)
+if test x$enable_misc != xyes; then
+ AC_DEFINE(SDL_MISC_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} misc"
+fi
AC_ARG_ENABLE(loadso,
[AS_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [default=yes]])],
, enable_loadso=yes)
@@ -3715,8 +3723,11 @@ case "$host" in
CheckRPATH
CheckVivanteVideo
- SOURCES="$SOURCES $srcdir/src/misc/unix/*.c"
- have_misc=yes
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/unix/*.c"
+ have_misc=yes
+ fi
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
have_locale=yes
@@ -3898,8 +3909,11 @@ case "$host" in
# Set up the core platform files
SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
- SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
- have_misc=yes
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
+ have_misc=yes
+ fi
# Use the Windows locale APIs.
SOURCES="$SOURCES $srcdir/src/locale/windows/*.c"
have_locale=yes
@@ -4086,10 +4100,11 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc"
have_filesystem=yes
fi
-
- SOURCES="$SOURCES $srcdir/src/misc/haiku/*.cc"
- have_misc=yes
-
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/haiku/*.cc"
+ have_misc=yes
+ fi
# Set up files for the locale library
SOURCES="$SOURCES $srcdir/src/locale/haiku/*.cc"
have_locale=yes
@@ -4113,9 +4128,11 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
CheckVulkan
CheckPTHREAD
- SOURCES="$SOURCES $srcdir/src/misc/ios/*.m"
- have_misc=yes
-
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/ios/*.m"
+ have_misc=yes
+ fi
# Set up files for the locale library
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
have_locale=yes
@@ -4225,9 +4242,11 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
CheckPTHREAD
CheckHIDAPI
- SOURCES="$SOURCES $srcdir/src/misc/macosx/*.m"
- have_misc=yes
-
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/macosx/*.m"
+ have_misc=yes
+ fi
# Set up files for the locale library
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
have_locale=yes
@@ -4386,9 +4405,11 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
CheckPTHREAD
CheckClockGettime
- SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
- have_misc=yes
-
+ # Set up files for the misc library
+ if test x$enable_misc = xyes; then
+ SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
+ have_misc=yes
+ fi
# Set up files for the video library
if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS, 1, [ ])